[Notes on Diffy Qs home] [PDF version] [Buy paperback on Amazon]

[next] [prev] [prev-tail] [tail] [up]

1.5 Substitution

Note: 1 lecture, §1.6 in [EP], not in [BD]

Just as when solving integrals, one method to try is to change variables to end up with a simpler equation to solve.

1.5.1 Substitution

The equation

 ′ 2 y = (x − y + 1)

is neither separable nor linear. What can we do? How about trying to change variables, so that in the new variables the equation is simpler. We use another variable v , which we treat as a function of x . Let us try

v = x − y + 1.

We need to figure out y′ in terms of v′ , v and x . We differentiate (in x ) to obtain v′ = 1 − y′ . So y′ = 1 − v′ . We plug this into the equation to get

1 − v′ = v2.

In other words, v′ = 1 − v2 . Such an equation we know how to solve by separating variables:

 1 ----2-dv = dx. 1 − v

So

 | | 1- ||v +-1-|| 2 ln||v − 1 || = x + C, ||v + 1 || ||-----||= e2x+2C, |v − 1 |
or v+1 = De 2x v−1 for some constant D . Note that v = 1 and v = −1 are also solutions.

Now we need to “unsubstitute” to obtain

x − y + 2 ---------= De 2x, x − y

and also the two solutions x − y + 1 = 1 or y = x , and x − y + 1 = −1 or y = x + 2 . We solve the first equation for y .

 x − y + 2 = (x − y)De 2x, 2x 2x x − y + 2 = Dxe − yDe , −y + yDe 2x = Dxe 2x − x − 2, y(− 1 + De 2x) = Dxe 2x − x − 2, Dxe 2x − x − 2 y = -------------. De2x − 1
Note that D = 0 gives y = x + 2 , but no value of D gives the solution y = x .

Substitution in differential equations is applied in much the same way that it is applied in calculus. You guess. Several different substitutions might work. There are some general patterns to look for. We summarize a few of these in a table.

When you see Try substituting
yy′ v = y2
y2y′ v = y3
(co sy)y′ v = siny
(siny)y′ v = cos y
 ′y ye  y v = e

Usually you try to substitute in the “most complicated” part of the equation with the hopes of simplifying it. The above table is just a rule of thumb. You might have to modify your guesses. If a substitution does not work (it does not make the equation any simpler), try a different one.

1.5.2 Bernoulli equations

There are some forms of equations where there is a general rule for substitution that always works. One such example is the so-called Bernoulli equation2:

y′ + p(x)y = q(x)yn.

This equation looks a lot like a linear equation except for the  n y . If n = 0 or n = 1 , then the equation is linear and we can solve it. Otherwise, the substitution  1−n v = y transforms the Bernoulli equation into a linear equation. Note that n need not be an integer.

Example 1.5.1: Solve

xy′ + y(x + 1 ) + xy5 = 0, y(1) = 1.

First, the equation is Bernoulli (p (x) = (x + 1)∕x and q(x) = −1 ). We substitute

v = y1−5 = y−4, v′ = − 4y−5y′.

In other words,  −1 5 ′ ′ ( ∕4)y v = y . So

 ′ 5 xy + y(x + 1) + xy = 0, −xy5 ′ 5 -4--v + y(x + 1) + xy = 0, −x --v′ + y−4(x + 1) + x = 0, 4 −-xv′ + v(x + 1) + x = 0, 4
and finally
 ′ 4(x + 1) v − --------v = 4. x

The equation is now linear. We can use the integrating factor method. In particular, we use formula (1.4). Let us assume that x > 0 so |x| = x . This assumption is OK, as our initial condition is x = 1 . Let us compute the integrating factor. Here p(s) from formula (1.4) is −4(s+1) s .

 (∫ x ) −4x+4 ∫x1 p(s)ds −-4(s +-1) −4x−4ln(x)+4 −4x+4 −4 e----- e = exp 1 s ds = e = e x = x4 , −∫xp(s)ds 4x+4ln(x)−4 4x−4 4 e 1 = e = e x .
We now plug in to (1.4)
 ( ) −∫xp(s)ds ∫ x ∫tp(s)ds v(x) = e 1 e 1 4 dt + 1 (∫ 1 ) 4x−4 4 x e−4t+4 = e x 4 t4 dt + 1 . 1

The integral in this expression is not possible to find in closed form. As we said before, it is perfectly fine to have a definite integral in our solution. Now “unsubstitute”

 ( ∫ x −4t+4 ) y−4 = e4x−4x4 4 e-----dt + 1 , 1 t4 −x+1 y = --(-∫---e--------)--. x 4 x e−4t+44dt + 1 1∕4 1 t

1.5.3 Homogeneous equations

Another type of equations we can solve by substitution are the so-called homogeneous equations. Suppose that we can write the differential equation as

 ( ) y′ = F y-. x

Here we try the substitutions

 y v = -- and therefore y′ = v + xv′. x

We note that the equation is transformed into

 ′ ′ ′ ---v---- 1- v + xv = F(v) or xv = F(v) − v or F (v) − v = x .

Hence an implicit solution is

∫ 1 --------dv = ln |x| + C. F (v) − v

Example 1.5.2: Solve

x2y′ = y2 + xy, y(1 ) = 1.

We put the equation into the form y′ = (y∕x)2 + y∕x . We substitute v = y∕x to get the separable equation

 ′ 2 2 xv = v + v − v = v ,

which has a solution

∫ 1 -2 dv = ln|x| + C, v −1- v = ln|x| + C, − 1 v = --------. ln |x| + C
We unsubstitute
y-= ---−-1---, x ln|x| + C ---−-x--- y = ln|x| + C .
We want y(1) = 1 , so
 − 1 −1 1 = y(1) =--------- = ---. ln |1| + C C

Thus C = −1 and the solution we are looking for is

y = ---−x---. ln|x| − 1

1.5.4 Exercises

Hint: Answers need not always be in closed form.

Exercise 1.5.1: Solve y′ + y(x2 − 1) + xy6 = 0 , with y(1) = 1 .

Exercise 1.5.2: Solve 2yy′ + 1 = y2 + x , with y(0) = 1 .

Exercise 1.5.3: Solve y′ + xy = y4 , with y(0) = 1 .

Exercise 1.5.4: Solve  ∘ ------- yy′ + x = x2 + y2 .

Exercise 1.5.5: Solve y′ = (x + y − 1)2 .

Exercise 1.5.6: Solve  ′ x2−y2 y = xy , with y(1) = 2 .

Exercise 1.5.101: Solve xy′ + y + y2 = 0 , y(1) = 2 .

Exercise 1.5.102: Solve xy′ + y + x = 0 , y(1) = 1 .

Exercise 1.5.103: Solve  2 ′ 3 y y = y − 3x , y(0) = 2 .

Exercise 1.5.104: Solve  2 2 2yy′ = ey−x + 2x .

2There are several things called Bernoulli equations, this is just one of them. The Bernoullis were a prominent Swiss family of mathematicians. These particular equations are named for Jacob Bernoulli (1654–1705).