## Section 1.5 Substitution

¶*Note: 1 lecture, can safely be skipped, §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.

### Subsection 1.5.1 Substitution

The equation

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\text{,}\) which we treat as a function of \(x\text{.}\) Let us try

We need to figure out \(y'\) in terms of \(v'\text{,}\) \(v\) and \(x\text{.}\) We differentiate (in \(x\)) to obtain \(v' = 1 - y'\text{.}\) So \(y' = 1-v'\text{.}\) We plug this into the equation to get

In other words, \(v' = 1-v^2\text{.}\) Such an equation we know how to solve by separating variables:

So

for some constant \(D\text{.}\) Note that \(v=1\) and \(v=-1\) are also solutions.

Now we need to “unsubstitute” to obtain

and also the two solutions \(x-y+1=1\) or \(y=x\text{,}\) and \(x-y+1=-1\) or \(y=x+2\text{.}\) We solve the first equation for \(y\text{.}\)

Note that \(D=0\) gives \(y=x+2\text{,}\) but no value of \(D\) gives the solution \(y=x\text{.}\)

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=y^2\) |

\(y^2y'\) | \(v=y^3\) |

\((\cos y)y'\) | \(v=\sin y\) |

\((\sin y)y'\) | \(v=\cos y\) |

\(y'e^y\) | \(v=e^y\) |

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.

### Subsection 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 equation*^{ 1 }:

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

###### Example 1.5.1.

Solve

First, the equation is Bernoulli (\(p(x) = (x+1)/x\) and \(q(x) = -1\)). We substitute

In other words, \(\left( \nicefrac{-1}{4} \right) y^5 v' = y'\text{.}\) So

and finally

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

We now plug in to (4)

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”

### Subsection 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

Here we try the substitutions

We note that the equation is transformed into

Hence an implicit solution is

###### Example 1.5.2.

Solve

We put the equation into the form \(y'= {\left(\nicefrac{y}{x}\right)}^2+\nicefrac{y}{x}\text{.}\) We substitute \(v=\nicefrac{y}{x}\) to get the separable equation

which has a solution

We unsubstitute

We want \(y(1)=1\text{,}\) so

Thus \(C = -1\) and the solution we are looking for is

### Subsection 1.5.4 Exercises

Hint: Answers need not always be in closed form.

###### Exercise 1.5.1.

Solve \(y'+ y(x^2-1)+xy^6 = 0\text{,}\) with \(y(1)=1\text{.}\)

###### Exercise 1.5.2.

Solve \(2yy' + 1 = y^2 + x\text{,}\) with \(y(0)=1\text{.}\)

###### Exercise 1.5.3.

Solve \(y' + xy = y^4\text{,}\) with \(y(0)=1\text{.}\)

###### Exercise 1.5.4.

Solve \(yy' + x = \sqrt{x^2 + y^2}\text{.}\)

###### Exercise 1.5.5.

Solve \(y' = {(x+y-1)}^2\text{.}\)

###### Exercise 1.5.6.

Solve \(y' = \frac{x^2-y^2}{x y}\text{,}\) with \(y(1) = 2\text{.}\)

###### Exercise 1.5.101.

Solve \(xy'+y+y^2 = 0\text{,}\) \(y(1)=2\text{.}\)

\(y = \frac{2}{3x-2}\)

###### Exercise 1.5.102.

Solve \(xy'+y +x = 0\text{,}\) \(y(1)=1\text{.}\)

\(y = \frac{3-x^2}{2 x}\)

###### Exercise 1.5.103.

Solve \(y^2y' = y^3-3x\text{,}\) \(y(0)=2\text{.}\)

\(y = {\bigl(7 e^{3x} + 3x + 1 \bigr)}^{1/3}\)

###### Exercise 1.5.104.

Solve \(2yy' = e^{y^2-x^2} + 2x\text{.}\)

\(y = \sqrt{x^2-\ln(C-x)}\)