# 1.5: Substitution

- Page ID
- 337

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

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

## Substitution

The equation

\[ y' = (x-y + 1)^2 \label{1.5.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. \label{1.5.2}\]

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' = v^2 \label{1.5.3}\]

In other words,

\[ v' = 1 - v^2 . \label{1.5.4}\]

Such an equation we know how to solve by separating variables:

\[ \dfrac {1}{1 -v^2} dv = dx \label{1.5.5}\]

So

\[ \dfrac {1}{2} \ln \left \vert {\dfrac {v + 1}{v -1}} \right \vert = x + C \label{1.5.6}\]

\[ \left \vert {\dfrac {v + 1}{v -1}} \right \vert = e^{2x +2C} \label{1.5.7}\]

Now we need to “unsubstitute” to obtain

\[ \dfrac {x - y + 2}{x -y} = De^{2x} \label{1.5.8}\]

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 = \left ( x - y \right ) De^{2x}, \label{1.5.9}\]

\[ x - y + 2 = Dxe^{2x} - yDe^{2x},\label{1.5.10}\]

\[-y + yDe^{2x} = Dxe^{2x} - x - 2,\label{1.5.11}\]

\[ y( -1 + De^{2x}) = Dxe^{2x} - x - 2,\label{1.5.12}\]

\[ y = \dfrac {Dxe^{2x} - x - 2}{De^{2x} - 1}.\label{1.5.13}\]

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 things 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.

## 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.^{2}

\[y' + p(x)y = q(x)y^n \label{1.5.14}\]

\[ y' + p(x)\,y = q(x)\, y^n \label{1.5.15}\]

This equation looks a lot like a linear equation except for the \(y^n\). If \(n = 0\) or \(n =1\), 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: Bernoulli Equation

Solve

\[xy' + y(x +1) + xy^5 = 0, ~~ y(1) = 1\]

**Solution**

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

\[v = y^{1 - 5} = y^{-4}, ~~ v' = -4y^{-5}y'\]

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

\[ xy' + y(x + 1) + xy^5 = 0,\]

\[ \dfrac {-xy^5}{4} v' + y(x + 1) + xy^5 = 0,\]

\[ \dfrac {-x}{4} v' + y^{-4} (x + 1) + x = 0,\]

\[ \dfrac {-x}{4} v' + v(x + 1) + x = 0,\]

\[ v' - \dfrac {4(x + 1)}{x} v = 4 \]

Now the equation is linear. We can use the integrating factor method. In particular, we use formula (\(\ref{1.4.2}\)). Let us assume that \(x > 0 \) so \( \left \vert x \right \vert = 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.2) is \( \dfrac {-4(s + 1)}{s}\).

\[ e^{\int _1^x p(s) ds} = \text {exp} \left ( \int ^x_1 \dfrac {-4(s + 1)}{s} ds \right ) = e^{-4x - 4ln(x) + 4} = e^{-4x + 4} x^{-4} = \dfrac {e^{-4x + 4}}{x^4} \]

\[ e^{- \int_1^x p(s) ds} = e^{4x + 4ln(x) - 4} = e^{4x - 4} x^4\]

We now plug in to (1.4.2)

\[ v(x) = e^{- \int_1^x p(s)ds} \left ( \int_1^x e^{\int_1^t p(s)ds} 4 dt + 1\right )\]

\[ = e^{4x - 4} x^4 \left ( \int_1^x 4 \dfrac {e^{-4t+4}}{t^4} dt + 1 \right ) \]

Note that 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”

\[ y^{-4} = e^{4x - 4} x^{4} \left ( 4 \int_1^x \dfrac {e^{-4t + 4}}{t^4} dt + 1 \right ) \]

\[ y = \dfrac {e^{-x+1}}{x \left (4 \int_1^x \dfrac {e^{-4t+4}}{t^4} dt + 1\right )^{1/4}} \]

## 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 \left ( \dfrac {y}{x} \right ) \label{1.5.16}\]

Here we try the substitutions

\[ v = \dfrac {y}{x} {\rm{~and ~therefore~}} y' = v + xv' \label{1.5.17}\]

We note that the equation is transformed into

\[ v + xv' = F(v) ~ {\rm{~or~}}~ xv' = F(v) - v ~ {\rm{~or~}}~ \dfrac {v'}{F(v) - v} = \dfrac {1}{x} \label{1.5.18}\]

Hence an implicit solution is

\[ \int \dfrac {1}{F(v) - v} dv = \ln \left \vert x \right \vert + C \label{1.5.19}\]

Example 1.5.2

Solve

\[ x^2y' = y^2 + xy ~~~ y(1) = 1\]

**Solution**

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

\[ xv' = v^2 + v - v = v^2\]

which has a solution

\[ \int \dfrac {1}{v^2} dv = ln \left \vert x \right \vert + C \]

\[ \dfrac{-1}{v} = ln \left \vert x \right \vert + C \]

\[ v = \dfrac {-1}{ ln \left \vert x \right \vert + C} \]

We unsubstitute

\[ \dfrac {y}{x} = \dfrac {-1}{ ln \left \vert x \right \vert + C }\]

\[ y = \dfrac {-x}{ln \left \vert x \right \vert + C }\]

We want \( y(1) = 1\), so

\[ 1 = y(1) = \dfrac {-1}{ln \left \vert 1 \right \vert + C } = \dfrac {-1}{C} \]

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

\[ y = \dfrac {-x}{ ln \left \vert x \right \vert - 1} \]

## Contributors

- Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.