Solving Differential Equations by Substitution

by Justin Skycak (@justinskycak) on

Non-separable differential equations can be sometimes converted into separable differential equations by way of substitution.

This post is part of the book Justin Math: Calculus. Suggested citation: Skycak, J. (2019). Solving Differential Equations by Substitution. In Justin Math: Calculus. https://justinmath.com/solving-differential-equations-by-substitution/

Want to get notified about new posts? Join the mailing list and follow on X/Twitter.


Sometimes, non-separable differential equations can be converted into separable differential equations by way of substitution.

For example, yβ€²+y=x is a non-separable differential equation as-is. However, we can make a variable substitution u=xβˆ’y to turn it into a separable differential equation. Differentiating both sides of u=xβˆ’y with respect to x, and interpreting y as a function of x, we have uβ€²=1βˆ’yβ€², so yβ€²=1βˆ’uβ€². Substituting, the equation becomes separable and thus solvable in terms of u.

yβ€²+y=xyβ€²=xβˆ’y1βˆ’uβ€²=uuβ€²=1βˆ’ududx=1βˆ’udu=(1βˆ’u)dx11βˆ’udu=1dx∫11βˆ’udu=∫1dxβˆ’ln(1βˆ’u)=x+Cln(1βˆ’u)=βˆ’x+C1βˆ’u=eβˆ’x+Cu=1βˆ’eβˆ’x+C


Lastly, to find what y is, we can solve for y in our original substitution u=xβˆ’y.

u=xβˆ’yu+y=xy=xβˆ’uy=xβˆ’(1βˆ’eβˆ’x+C)y=xβˆ’1+eβˆ’x+C


Choosing the Right Substitution

In general, to determine what substitution we need to perform, it is helpful to rearrange the equation until we see a group of terms whose derivative also appears in the equation.

2yyβ€²βˆ’y2=x2βˆ’2x2yyβ€²+2x=x2+y2(y2+x2)β€²=x2+y2


After rearranging the above equation, we see that u=x2+y2 is a good substitution. We rewrite the equation in terms of u, solve it, and then solve for y in terms of x.

uβ€²=uu=Cexx2+y2=Cexy2=Cexβˆ’x2y=±√Cexβˆ’x2


We don’t always have to use addition in our substitutions. In the equation below, for example, we require the substitution u=xy.

xyβ€²=3βˆ’yxyβ€²+y=3(xy)β€²=3uβ€²=3u=3x+Cxy=3x+Cy=3+Cx


Exercises

Use substitution to solve the following differential equations. (You can view the solution by clicking on the problem.)

1)1+yβ€²=(x+y)2
Solution:
u=x+yy=1Cβˆ’xβˆ’x


2)2(yβ€²βˆ’y)=1βˆ’x
Solution:
u=xβˆ’2yy=Cex+12x


3)x2βˆ’y2=12xβˆ’2yyβ€²
Solution:
u=x2βˆ’y2y=±√x2±√C+2x


4)3y2yβ€²=ex2+y3βˆ’2x
Solution:
u=x2+y3y=βˆ’3√x2+ln(Cβˆ’x)


5)2y+xyβ€²=1x
Solution:
u=x2yy=Cx2+1x


6)xy4+2x2y3yβ€²=1
Solution:
u=xy2y=±4√Cx2+2x



This post is part of the book Justin Math: Calculus. Suggested citation: Skycak, J. (2019). Solving Differential Equations by Substitution. In Justin Math: Calculus. https://justinmath.com/solving-differential-equations-by-substitution/


Want to get notified about new posts? Join the mailing list and follow on X/Twitter.