betaFeedback

WorksMathematics

An ODE to Changing Variables: v=y/xv = y/x Is For Victory

Abstract

Most first courses in differential equations introduce students to very special differential equations which can be solved in closed form from a small set of techniques (such as separable equations and integrating factors). Frequently other equations can be converted to one of these forms through a change of variable; however, these transformations are usually just given without any explanation of how people found them, or why problems of these forms have nice solutions, but not related ones. We consider the first order differential equation dy/dx=f(x,y)dy/dx = f(x,y) where f(x,y)f(x,y) does not factor as A(x)B(y)A(x)B(y), and assume f(x,y)=g(y/xr)f(x,y) = g(y/x^r) for some nice function gg and some real number rr. This can be reduced to a separable equation only when r=1r=1. We then discuss generalizations and what conditions on ff lead to a change of variables yielding a separable equation. Our goals are twofold. First, to encourage students and instructors to be active, questioning the methods and results, seeing how far they can be extended and why they work. Second, we discuss how to appropriately use AI to take ideas and special cases as prompts and quickly create extensions and editable notes that can be shared with students, freeing up professors (and students) from straightforward calculations without sacrificing learning and understanding.

Introduction

Students frequently meet differential equations in their first year of calculus, studying simple problems (such as bacteria growth) with easily computed closed form solutions. Not surprisingly the situation changes quickly when they take a class devoted to the subject. Similar to the arsenal of integration techniques learned in calculus, they now see that equations of certain forms can be “solved” (see Appendix § 4 for a brief discussion on when we consider something “solved”).

We study first order differential equations of the form dy/dx=f(x,y)dy/dx=f(x,y). This of course leads to the following, natural question: how to convert the equation we need to study to one of the forms we know how to study? For example, an equation is separable if f(x,y)=A(x)B(y)f(x,y)=A(x)B(y), as in that case we have

∫dyB(y)=∫A(x) dx.\int\frac{dy}{B(y)}=\int A(x)\,dx.

While we may not have nice closed forms for the resulting integrals, there are at least simple numerical techniques or frequently series expansions that are available, and we’ll thus consider any problem that can be reduced to a separable one a success. Even determining whether or not a given first order differential equation is separable can be a difficult task for undergraduate students, and systematic techniques for answering this question has been explored in previous expository articles [2, 4].1 Our paper tackles a related question: When can an ordinary differential equation be made separable through a change of variables?

Our first result concerns f(x,y)f(x,y) of the form g(y/xr)g(y/x^r). Note assuming we’re of this form excludes two extreme cases, namely f(x,y)f(x,y) is a function only of xx or only of yy, but of course in those cases it’s already separable and there’s nothing to do! If we had f(x,y)f(x,y) is a function only of ya/xby^a/x^b with a,ba,b non-zero, setting r=b/ar=b/a we see ya/xb=(y/xr)ay^a/x^b=(y/x^r)^a, and thus ff depends only on y/xry/x^r. There is thus no loss in looking at functions of y/xry/x^r over the more general case ya/xby^a/x^b.

Remark 1.1. We could of course have chosen to write v=xsyv=x^sy and would then find the only tractable case is s=−1s=-1. We prefer to write the change of variable as v=y/xrv=y/x^r as this aligns with the formulation seen in books, but of course it doesn’t matter. The key idea is to have a free parameter, and explore what choices lead to good outcomes.

Theorem 1.2. Assume dy/dx=f(x,y)\mathrm{d}y/\mathrm{d}x=f(x,y) with f(x,y)=g(y/xr)f(x,y)=g(y/x^r) for some r≠0r\ne0, and f(x,y)f(x,y) does not factor as A(x)B(y)A(x)B(y) (in that case the equation is already separable). Then the differential equation is separable for all gg only if r=1r=1. Explicitly, the change of variable v=y/xv=y/x works when r=1r=1, and there’s no similar choice that works if r=−1r=-1 (i.e., the case f(x,y)f(x,y) is a function of just the product xyxy).

Building on this success, it’s natural to ask what happens for more complicated relations. Is there a nice change of variable if perhaps f(x,y)f(x,y) depends only on y/exy/e^x? Or perhaps sin⁡(y)/cos⁡(x)\sin(y)/\cos(x)? A more careful argument yields the following.

Theorem 1.3. Suppose that the right hand side of the differential equation dy/dx=f(x,y)\mathrm{d}y/\mathrm{d}x=f(x,y) can be rewritten f(x,y)=g(h(x,y))f(x,y)=g(h(x,y)) for gg which is continuously differentiable on an interval JJ and hh which is twice continuously differentiable. Then the substitution v=h(x,y)v=h(x,y) leads to a separable differential equation for every hh if and only if hh has one of the two following forms:

h(x,y)=H(kx+y)org(x,y)=H(y−y0x−x0),(1)h(x,y)=H(kx+y) \quad\text{or} \quad g(x,y)=H\left(\frac{y-y_0}{x-x_0}\right), \tag*{(1)}

with constants k,x0,y0k,x_0,y_0 where HH is twice continuously differentiable and H′≠0H'\ne0 on JJ. We note that the particular form of the differential equation obtained by this substitution is heavily dependent on the function hh, and that additional substitutions may work for some, but not all, functions gg.

We first prove Theorem 1.2 in §2, and then discuss how to guide students in proving its extension in §3.

The genesis of this note is a suggested problem by the first named author to the second named author, a student in his Math 309 Differential Equations and Non-linear Dynamics class at Williams in Fall ’26: solve

dydx=x2+xy+y2x2.(2)\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{x^2+xy+y^2}{x^2}. \tag*{(2)}

Times have changed greatly since the third named author took such a class at Yale in the mid-90’s. Then, a huge part of the class emphasized techniques, including how to convert a problem to a form in a reference book. As computer programs and online resources have advanced magnitudes since then, and since many real world equations don’t have

(x,y)∈D(x,y)\in D then there are continuously differentiable functions ϕ(x)\phi(x) and ψ(y)\psi(y) such that f(x,y)=ϕ(x)ψ(y)f(x,y)=\phi(x)\psi(y) for all (x,y)∈D(x,y)\in D. nice closed form solutions, classes emphasize specific techniques less and spend more on applications (such as non-linear dynamics). Giving additional problems such as this, which are not graded, is a great way to alert students to the methods and techniques that exist while still allowing time to get to the interesting applications. For this problem, she shared the problem with the third named author. He remarked that when he was a student, the class used the fifth edition of [1] (his father used the first edition, so keeping it in the family), and there was a section that if f(x,y)f(x,y) can be written as a function of just v=y/xv=y/x then one can transform to a separable equation. This prompted the following excellent questions from the second to the third author: When else can you change variables and get an equation you can solve? Can you do it for v=xyv=xy? The two of them explored the case of f(x,y)f(x,y) a function of y/xry/x^r, and she reported back to her professor, who then worked with AI to generalize the argument to find general conditions for when f(x,y)f(x,y) leads to a separable equation. We hope this note helps other instructors and students in seeing the value of asking questions and actively engaging in the material.

It also leads us to the second reason for writing this argument. In addition to highlighting the importance of asking good questions and exploring the consequences, and not just passively accepting the math that comes one’s way, this provides an excellent opportunity to discuss how to use AI well in a classroom. Extending the argument is straightforward and almost surely in the literature, though not necessarily written in a friendly way for beginning students. By feeding good prompts one can quickly generate high quality notes, complete with good citations to the literature. This frees up time for other activities, but not at the cost of understanding.

The Standard Case: Why only y/xy/x?

A Standard Example

A Standard Example. Let’s explore the suggested problem, where f(x,y)=(x2+xy+y2)/x2f(x,y)=(x^2+xy+y^2)/x^2. Thus we wish to solve

dydx=x2+xy+y2x2.(3)\frac{dy}{dx}=\frac{x^2+xy+y^2}{x^2}. \tag*{(3)}

Recalling the sage advice of the great New England transcendentalist2 Henry David Thoreau, our first thought whenever we see something should be: Simplify, simplify.3

How does that help us here? Simplifying the right hand side of (3) by doing the division gives

x2+xy+y2x2=1+yx+(yx)2.\frac{x^2+xy+y^2}{x^2}=1+\frac{y}{x}+\left(\frac{y}{x}\right)^2.

Thus f(x,y)f(x,y) depends on xx and yy very weakly – it only depends on their ratio. This suggests that it might be worthwhile changing variables and letting v=y/xv=y/x, as now the

(1701x24+601x)(5x3+2x+1)(1701x^{24}+601x)(5x^3+2x+1)

it’s natural to use the product rule, which yields

(1701⋅24x23+601)(5x3+2x+1)+(1701x24+601x)(5⋅3x2+2).(1701\cdot24x^{23}+601)(5x^3+2x+1)+(1701x^{24}+601x)(5\cdot3x^2+2).

However, rather than use the product rule if we first expand we get

(1701x24+601x)(5x3+2x+1)=8505x27+3402x25+1701x24+3005x4+1202x2+601x,(1701x^{24}+601x)(5x^3+2x+1)=8505x^{27}+3402x^{25}+1701x^{24}+3005x^4+1202x^2+601x,

and we can now easily take the derivative term by term using the sum and constant rules and thus avoid having to use the more involved product rule. right hand side is only explicitly a function of one variable, vv (as y=y(x)y = y(x) of course v=y/xv = y/x means vv depends on xx; this dependence is often suppressed in expositions, and textbooks frequently talk about the variables xx and yy or after the transformation xx and vv). We now have

dydx=1+v+v2.(4)\frac{dy}{dx}=1+v+v^2. \tag*{(4)}

To make further progress, we need to replace dy/dxdy/dx with an expression that’s a function of just xx, vv and dv/dxdv/dx. As v=y/xv=y/x (or v(x)=y(x)/xv(x)=y(x)/x), the quotient rule gives

dvdx=dydxx−yx2.(5)\frac{dv}{dx}=\frac{\frac{dy}{dx}x-y}{x^2}. \tag*{(5)}

Solving for dy/dxdy/dx gives

dydx=x2dvdx+yx,(6)\frac{dy}{dx}=\frac{x^2\frac{dv}{dx}+y}{x}, \tag*{(6)}

and then recalling that v=y/xv=y/x yields

dydx=xdvdx+v.(7)\frac{dy}{dx}=x\frac{dv}{dx}+v. \tag*{(7)}

Substituting for dy/dxdy/dx into our problem gives

xdvdx+v=1+v+v2orxdvdx=1+v2.(8)x\frac{dv}{dx}+v=1+v+v^2 \quad\text{or}\quad x\frac{dv}{dx}=1+v^2. \tag*{(8)}

The above is separable! After dividing we get

dv1+v2=dxx.(9)\frac{dv}{1+v^2}=\frac{dx}{x}. \tag*{(9)}

Not only is our equation separable, but both integrals are relatively nice. The right hand side integrates to the well-known ln⁡x\ln x, while the left hand integrand is the less remembered (but quite important) anti-derivative of arctan. Thus the solution is

arctan⁡(v)=ln⁡x+Cor, since v=y/x,arctan⁡(y/x)=ln⁡x+C,(10)\arctan(v)=\ln x+C \quad\text{or, since }v=y/x,\quad\arctan(y/x)=\ln x+C, \tag*{(10)}

where CC is determined by the initial conditions.

Our problem had a nice cancellation: when replacing dy/dxdy/dx we had xdv/dx+vxdv/dx+v, and the vv cancelled with a vv on the right hand side. If instead of 1+v+v21+v+v^2 on the right we had any function of vv, we would still have obtained a separable equation; all that matters is the right hand side depended only on vv, and thus it could easily absorb the vv term from the left. Mark Twain has sage advice for situations such as these.

Good judgement is the result of experience and experience the result of bad judgement. We should be careful to get out of an experience only the wisdom that is in it and stop there lest we be like the cat that sits down on a hot stove lid.

General Power Relation

We now prove Theorem 1.2. Thus dy/dx=f(x,r)dy/dx=f(x,r) and there’s a non-zero rr and a nice function gg such that f(x,y)=g(v)f(x,y)=g(v) for v=y/xrv=y/x^r. Obviously if f(x,y)=A(x)B(y)f(x,y)=A(x)B(y) then the equation is already separable, so there’s no need to further explore. The consequences of that observation for us is that if g(v)=cvg(v)=cv for some constant cc then our initial equation is already separable, as we then have dy/dx=(c/xr)⋅ydy/dx=(c/x^r)\cdot y, leading to

dyy=c dxxr.(11)\frac{dy}{y}=\frac{c\,dx}{x^r}. \tag*{(11)}

As before, the first step is to replace dy/dxdy/dx with an expression involving dv/dxdv/dx. Using the quotient rule to differentiate v=y/xrv = y/x^r (which we can view as v(x)=y(x)/xrv(x) = y(x)/x^r) we have

dvdx=dydxxr−yrxr−1x2r=1xrdydx−rxryxxr−1.(12)\frac{dv}{dx} = \frac{\frac{dy}{dx}x^r-yrx^{r-1}}{x^{2r}} = \frac{1}{x^r}\frac{dy}{dx} - \frac{r}{x^r}\frac{y}{x}x^{r-1}. \tag*{(12)}

We can simplify the above. On the right hand side we can replace y/xry/x^r with vv, and then multiplying both sides by xrx^r yields

xrdvdx=dydx−rvxr−1,ordydx=xrdvdx+rvxr−1.(13)x^r\frac{dv}{dx} = \frac{dy}{dx} - rvx^{r-1}, \quad\text{or} \quad\frac{dy}{dx} = x^r\frac{dv}{dx} + rvx^{r-1}. \tag*{(13)}

We substitute this into dy/dx=f(x,y)=g(v)dy/dx = f(x,y) = g(v) and find

xrdvdx+rvxr−1=g(v),orxrdvdx=g(v)−rvxr−1.(14)x^r\frac{dv}{dx} + rvx^{r-1} = g(v), \quad\text{or} \quad x^r\frac{dv}{dx} = g(v) - rvx^{r-1}. \tag*{(14)}

The above is separable if and only if the right hand side factors as a function of xx times a function of vv, say Φ(x)Ψ(v)\Phi(x)\Psi(v), as in that case we obtain

xrdvdx=Φ(x)Ψ(v)ordvΨ(v)=Φ(x)dxxr.(15)x^r\frac{dv}{dx} = \Phi(x)\Psi(v) \quad\text{or} \quad\frac{dv}{\Psi(v)} = \frac{\Phi(x)dx}{x^r}. \tag*{(15)}

So we need to find functions Φ\Phi and Ψ\Psi such that

g(v)−rvxr−1=Φ(x)Ψ(v).(16)g(v) - rvx^{r-1} = \Phi(x)\Psi(v). \tag*{(16)}

If r=1r = 1 we can take Φ(x)=1\Phi(x) = 1 and Ψ(v)=g(v)−v\Psi(v) = g(v) - v. The other possibility is if g(v)=cvg(v) = cv for some constant cc, as then

g(v)−rvxr−1=cv−rvxr−1=(c−rxr−1)v.(17)g(v) - rvx^{r-1} = cv - rvx^{r-1} = (c-rx^{r-1})v. \tag*{(17)}

However, we’ve already excluded that case as we’re assuming f(x,y)f(x,y) does not factor as A(x)B(y)A(x)B(y), which we showed above would be the case if g(v)=cvg(v) = cv.

Thus, if ff doesn’t factor, only when r=1r = 1 will g(v)−rvxr−1g(v) - rvx^{r-1} have no explicit xx-dependence and factor as needed. In that case, and that case only, we can then re-arrange and find

dvg(v)−v=dxx.(18)\frac{dv}{g(v)-v} = \frac{dx}{x}. \tag*{(18)}

Letting G\mathcal{G} be any anti-derivative of 1/(g(v)−v)1/(g(v)-v) we find

G(v)=ln⁡x+C,(19)\mathcal{G}(v) = \ln x + C, \tag*{(19)}

solving the problem.

The General Case: When ff Leads to Separable

As one of the main reasons for writing this article is to encourage students and teachers to actively engage with mathematics, we leave the proof of the general case to the reader. We’ve provided a hint by writing down the answer, but of course feel free to ignore and try to discover on your own.

We end with a few suggestions. First, it greatly helps to explore first to build intuition and understand the problem. We started with a specific problem, and then extended from a specific f(x,y)f(x,y) that’s a function of y/xy/x to looking at situations that are functions of y/xry/x^r. Building on this, try a more general relation: f(x,y)=f(h(x,y))f(x,y) = f(h(x,y)), and try to find conditions on hh that lead to a separable equation.

Such investigations provide an outstanding opportunity to use AI in a good way. We are not outsourcing understanding; we’ve done some cases actively first, and can now prompt AI to try to push these further. Thus one approach is to write up some cases, and feed those arguments into AI and ask it to try to extend. While for a simple problem like this there’s almost surely no need to give AI a good starting point by including our initial work, this is a good habit to get in. Namely, by doing some work first we can use AI to help us see just how far an idea can be extended and pushed.

What's a Solution?

We have to be careful about what we mean when we say we can solve something. Most students leave Calculus II believing they can integrate. Sadly most functions don’t have nice closed-form anti-derivatives. However, if we allow ourselves to “name” the anti-derivative, then yes we can say many of these are solved! We give an example from probability, which is based on the fact that while there’s no nice anti-derivative of e−t2e^{-t^2}, there is a rapidly converging series expansion.

We say ff is a probability distribution if it’s non-negative and integrates to 1; thus if ff is the density for a random variable XX then the probability XX takes on a value in [a,b][a,b] is just ∫abf(x) dx\int_a^b f(x)\,dx. We frequently write F(x)F(x) for the associated cumulative distribution function, which is the probability of XX being at most xx; thus

F(x)≔∫−∞xf(t) dt.F(x) \coloneqq\int_{-\infty}^{x} f(t)\,dt.

Consider the cumulative distribution function of a normal with mean zero and variance 1/21/2. Thus

f(x)=1πe−x2,F(x)=1π∫−∞xe−t2 dt.f(x) = \frac{1}{\sqrt{\pi}}e^{-x^2}, \qquad F(x) = \frac{1}{\sqrt{\pi}}\int_{-\infty}^{x} e^{-t^2}\,dt.

the variance is taken to be 1/21/2 to make the argument of the exponential −t2-t^2 and not −t2/2-t^2/2. As we don’t have a closed form anti-derivative of e−t2e^{-t^2}, we’re in trouble. We could try to use the series expansion for eue^u and interchange the integral and the sum, but as the lower bound is −∞-\infty the resulting expression contains alternating signed infinities. Fortunately we know F(0)=1/2F(0)=1/2 as our density is symmetric about zero.

So if x≥0x \ge0 (the case x<0x < 0 is handled similarly with a subtraction now) we can write

F(x)=12+12erf⁡(x),F(x) = \frac{1}{2} + \frac{1}{2}\operatorname{erf}(x),

where (in a lovely set of normalizations!)

erf⁡(x)≔2π∫0xe−t2 dt.\operatorname{erf}(x) \coloneqq\frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt.

While it would’ve been disastrous to use eu=∑nun/n!e^u = \sum_n u^n/n! when integrating from −∞-\infty, now we can insert it with u=−t2u=-t^2 and interchange the integral and the sum (see for example [3] for a justification), yielding

erf⁡(x):=2π∫0xe−t2 dt=2π∫0x∑n=0∞(−t2)nn! dt=2π∑n=0∞(−1)nn!∫0xt2n dt=2π∑n=0∞(−1)nn!t2n+12n+1∣0x=2π∑n=0∞(−1)nx2n+1n!(2n+1),\begin{aligned} \operatorname{erf}(x) &:= \frac{2}{\sqrt{\pi}}\int_{0}^{x} e^{-t^2}\,\mathrm{d}t \\ &= \frac{2}{\sqrt{\pi}}\int_{0}^{x}\sum_{n=0}^{\infty}\frac{(-t^2)^n}{n!}\,\mathrm{d}t \\ &= \frac{2}{\sqrt{\pi}}\sum_{n=0}^{\infty}\frac{(-1)^n}{n!}\int_{0}^{x}t^{2n}\,\mathrm{d}t \\ &= \frac{2}{\sqrt{\pi}}\sum_{n=0}^{\infty}\frac{(-1)^n}{n!}\frac{t^{2n+1}}{2n+1}\bigg|_{0}^{x} \\ &= \frac{2}{\sqrt{\pi}}\sum_{n=0}^{\infty}\frac{(-1)^n x^{2n+1}}{n!(2n+1)}, \end{aligned}

which converges for all xx!

The point of the above is that we have to really think what it means to solve a problem. We have a very rapidly converging series that we’ve named, but it is an infinite sum. If this bothers you, think back to trig functions such as sine, cosine and tangent – we consider those nice, but to find a general value for any of these also requires evaluating an infinite sum.

Email address: [email protected]

Department of Mathematics, Williams College, Williamstown, MA 01267, USA

Email address: [email protected]

Department of Mathematics, Williams College, Williamstown, MA 01267, USA

Email address: [email protected], [email protected]

Department of Mathematics, Williams College, Williamstown, MA 01267, USA

References

  1. [1][BoDi] W. Boyce and R. DiPrima, Elementary differential equations and boundary value problems, 5th edition, John Wiley & Sons, New York, 2000.
  2. [2][Ci] J. A. Cid, A simple method to find out when an ordinary differential equation is separable, International Journal of Mathematical Education in Science and Technology 40 (2009), no. 5, 659–662.DOI
  3. [3][La] S. Lang, Undergraduate Analysis, 2nd edition, Undergraduate Texts in Mathematics, Springer, 1997.
  4. [4][Sc] D. Scott, When Is an Ordinary Differential Equation Separable?, The American Mathematical Monthly 92 (1985), no. 6, 422–423.DOI

Paper details

vlnc:W_q8b25cd2
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents