Lecture 8 - Substitution methods In this lecture, we will learn to use various substitution techniques to transform a differential equation into one of the forms that we can solve using previously studied algorithms. We will use one kind of substitution to transform a non-separable equation into a separable one. We will use another kind of substitution to transform a non-linear equation into a linear equation. The idea behind the substitution methods is exactly the same as the idea behind the substitution rule of integration: by performing a substitution, we transform a differential equation into a simpler one. y − 4x dy = x−y . dx Solution: This is not a linear differential equation and it is also not separable! So no method we learned so far applies outright. But through a substitution, we will transform this equation into a separable one. Step 1: Make the substitution u(x) = y/x. First we calculate du . dx  du = dy · 1 + y · − 1 = dy · 1 − y dx dx x dx x x2 x2 Next, we rewrite the differential equation in terms of u instead of y. On the right side, the most straightforward way to do this is to solve y = ux and substitute ux for y. A quicker way is to multiply the numerator and the denominator of the expression by 1/x. On the left side, the way to do this is to solve for dy in terms of du . dx dx y −4 (1/x) · (y − 4x) y − 4x −4 Right side: x − y = = x y =u 1 − u (1/x) · (x − y) 1− x dy y y Left side: = ( du + 2 ) · x = x du + x = x du + u dx dx x dx dx So we have: du u−4 x +u= dx 1−u We perform some algebra: − 4 − u = u − 4 − u(1 − u) = u − 4 − u + u2 = u2 − 4 x du = 1u − u 1−u 1−u 1−u dx So we have: du u2 − 4 x = dx 1−u (Note: using this substitution implies x 6= 0!) Problem: Solve the differential equation

Step 2: Check whether the equation is separable. 1. This equation is separable: 12− u du = x u − 4 dx 1. Step 3: Solve 12− u du = x dx R 1−u Ru 1− 4 du = x dx u2 − 4 R 1 dx = ln |x| + C Right side: x R 1−u Left side: du u2 − 4 We use integration by partial fractions. 1 − u = A + B = A(u + 2) + B(u − 2) . u−2 u+2 u2 − 4 u2 − 4 A(u + 2) + B(u − 2) = 1 − u u(A + B) + 2A − 2B = 1 − u A + B = −1 and 2A − 2B = 1 A = −1/4 and B = −3/4 R 1−u R 1 R 1 du = −1/4 u − du − 3/4 u + 2 2 2 du = −1/4 ln |u − 2| − 3/4 ln |u + 2| + D u −4 So we have: −1/4 ln |u − 2| − 3/4 ln |u + 2| = ln |x| + E −1/4(ln |u − 2| + ln |u + 2|3 ) = ln |x| + E 1

2

ln(|u − 2||u + 2|3 ) = −4 ln |x| + E ln(|u − 2||u + 2|3 ) = ln |x|−4 + E 3 −4 −4 eln(|u−2||u+2| ) = eln |x| +E = eln |x| eE = F |x|−4 |u − 2||u + 2|3 = F |x|−4 Step 4: Substitute back u(x) = y/x. |y − 2x||y + 2x|3 y − 2x y + 2x 3 = F 14 |y/x − 2||y/x + 2|3 = x x = |x|4 |x| |(y − 2x)(y + 2x)3 | = F (y − 2x)(y + 2x)3 = ±F (y − 2x)(y + 2x)3 = G Notice that if the original equation was even slightly different, for example: dy y 2 − 4x = dx x−y the substitution u(x) = y/x would not turn it into a separable equation and our method would fail! dy x2 + 3y 2 Problem: Solve the differential equation = 2xy . dx Solution: Step 1: Make the substitution u(x) = y/x. y dy 1 We already calculated du in the previous problem: du = · − dx dx dx x x2 Next, we rewrite the differential equation in terms of u instead of y. In this case, the quick way to do this is to multiply the numerator and the denominator of the expression on the left by 1/x2 ! (The slow way is to use the equation y = ux.) 2 (1/x2 )(x2 + 3y 2 ) 1 + 3(y/x)2 x2 + 3y 2 Right side: = 1 +2u3u 2xy = (1/x2 )(2xy) = 2y/x dy Left side: = x du + u as before! dx dx So we have: du 1 + 3u2 x +u= dx 2u 2 2 du 1 + 3u 1 + 3u − 2u2 = 1 + u2 We perform some algebra: x = 2u − u = 2u 2u dx du 1 + u2 = dx 2u Step 2: Check whether the equation is separable. 1. The equation is separable: 2u 2 du = x 1 + u dx x

1. Step 3: Solve 2u 2 du = x dx 1 + u R 2u R 1 du = x dx 1 + u2 R 1 Right side: x dx = ln |x| + C R 2u Left side: du 1 + u2 We use the substitution rule of integration. w(u) = 1 + w2 dw = 2u. du dw R 2u R du R 1 du = w dw = ln |w| + D = ln(1 + u2 ) + D. 2 du = w 1+u Notice that we removed the absolute value since 1 + u2 > 0! So we have: ln(1 + u2 ) = ln |x| + E

3

eln(1+u

2

)

= eln |x|+E = eln |x| eE = F eln |x| 1 + u2 = F |x|

Step 4: Substitute back u(x) = y/x. 1 + (y/x)2 = F |x| x2 + y 2 = F |x| x2 2 2 x + y = F |x|3 1 2 2 3 F (x + y ) = |x| 1 (x2 + y 2 ) = x3 ±F 1 2 2 3 G (x + y ) = x (G = ±F ) 2

3

x2 + y 2 = Gx3

2

y = Gx − x

p y = ± Gx3 − x2 Our next problem will require a different kind of substitution. dy Problem: Solve the differential equation = (4x − y + 1)2 . dx Solution: As was the case with the previous examples, this equation is not linear and neither it is separable. Also, the substitution u(x) = y/x is not going to work here because the resulting equation will not be separable. Step 1: Make the substitution u(x) = 4x − y. dy First we calculate du = 4 − . dx dx Next, we rewrite the differential equation in terms of u. Right side: (4x − y + 1)2 = (u + 1)2 dy Left side: = 4 − du dx dx So we have: 4 − du = (u + 1)2 dx du = 4 − (u + 1)2 dx Step 2: Check whether the equation is separable. du dx The equation is separable: = 1. 4 − (u + 1)2 du dx Step 3: Solve = 1. 4 − (u + 1)2 R R 1 1 dx 2 du = 4 − (u + 1) R Right side: 1 dx = x + C R 1 Left side: du 4 − (u + 1)2 We will use integration by partial fractions. R R R R 1 1 1 1 du = du = du = − du (u + 3)(u − 1) 4 − (u + 1)2 4 − (u2 + 2u + 1) −(u2 + 2u − 3) A(u − 1) + B(u + 3) 1 B = uA +3 + u−1 = (u + 3)(u − 1) (u + 3)(u − 1) A(u − 1) + B(u + 3) = 1 u(A + B) − A + 3B = 1 A + B = 0 and −A + 3B = 1 A = −1/4 and B = 1/4 R R R 1 1 1 (− ln |u +3|+ ln |u −1|+D) = − 1 ln u − 1 +E − du = − 14 ( u−1 du + du) = − +3 u−1 4 4 u+3 (u + 3)(u − 1) 1 (E = − 4 D) u − 1 So we have: − 1 4 ln u + 3 = x + F (F = C − E)

4

− 1 ln u = G − 4x (G = −4F ) ˛u + 3 ˛ ˛u − 1˛ ˛ ln˛˛ ˛ e u + 3 = eG−4x u − 1 u + 3 = He−4x (H = eG ) back u(x) = 4x − y. Step 4: Substitute 4x − y − 1 −4x 4x − y + 3 = He 4x − y − 1 −4x 4x − y + 3 = ±He 4x − y − 1 −4x 4x − y + 3 = Ie 4x − y − 1 = Ie−4x (4x − y + 3) 4x − y − 1 = 4Ixe−4x − Iye−4x + 3Ie−4x −y − Iye−4x = 4Ixe−4x + 3Ie−4x − 4x − 1 y=

4Ixe−4x + 3Ie−4x − 4x − 1 −1 − Ie−4x

Our next problem requires yet a different kind of substitution! This substitution is used for equations of a very specific form, called Bernoulli equations in honor of the mathematician Jakob Bernoulli who discovered the separable equations method and the method to solve these equations as well in 1690! dy + p(t)y = q(t)y n dt Using Bernoulli’s substitution, we will transform an equation of this form into a linear equation! dy Problem: Solve the differential equation t2 + 2ty − y 3 = 0. dt Solution: dy Step 0: Rewrite the equation in the form + p(t)y = q(t)y n . dt dy 2 + t y = 12 y 3 dt t Step 1: Make the substitution u(t) = y −(n−1) . Since n = 3, we make the substitution u(t) = y −2 . dy Next, we calculate du = −2y −3 . dt dt Next, we rewrite the differential equation in terms of u. The trick here is to multiply every term of the original equation by y −n , in our case y −3 . dy 2 −2 y −3 + t y = 12 dt t du dt + 2 u = 1 . So we have −2 t t2 du 4 2 − u=− 2 dt t t This is a linear equation! Step 2: Solve du − 4t u = − 22 . dt t −4 R 4 − t dt µ(t) = e = e−4 ln |t| = eln(t ) = 14 t R R u · 14 = − 22 · 14 dt + C = −2 16 dt + C = 25 + C t t t t 5t 2 u= + Ct4 5t Step 3: Substitute back u(t) = y −2 . 2 + Ct4 = 2 + Ct5 y −2 = 5t 5t 5t y2 = 2 + Ct5

5

r y=±

5t 2 + Ct5

dy Problem: Solve the differential equation + 4 y = x3 y 2 , x > 0. dx x Solution: Step 1: Make a substitution u(x) = y −(n−1) . Since n = 2, we make the substitution u(t) = y −1 . dy Next, we calculate du = −y −2 . dx dx Next, we rewrite the differential equation in terms of u. We multiply every term of the original equation by y −n , in our case y −2 . dy + 4 y −1 = x3 y −2 dx x 4 u = x3 . So we have: − du + x dx du 4 − u = −x3 dx x This is a linear equation! 4 u = −x3 . Step 2: Solve du − x dx R 4 −4 µ(x) = e − x dx = e−4 ln(x) = eln(x ) = x−4 = 14 x 1 u = R − 1 x3 dx + C = − R x dx + C = − ln(x) + C 4 4 x x Notice that ln |x| = ln(x) since x > 0. u = −x4 ln(x) + Cx4 Step 3: Substitute back u(x) = y −1 . y −1 = −x4 ln(x) + Cx4 y=

1 −x4 ln(x) + Cx4