# Ordinary Differential Equations/Substitution 2

Substitution methods are really applicable anywhere you can find a differential equation. However, there's very few instances where you will always give a certain substitution. You generally pick one and plug it in as needed. So I'll give situations where you could use a substitution method, although you may later learn better methods.

## Parametric equations

One time where you may need it is when solving parametric equations. Lets say we're given functions for velocity in two dimensions- $v_{x}(t)$  and $v_{y}(t)$ . If we want to solve for $y(x)$ , you have to divide ${\frac {v_{y}}{v_{x}}}$ . This works out to be ${\frac {\frac {dv_{y}}{dx}}{\frac {dv_{x}}{dx}}}={\frac {dy}{dx}}$ . When you do this, you will frequently (although not always) get a chance to use ${\frac {y}{x}}$  substitution.

### Constant velocity

Lets say we're swimming across a river with constant velocity $v_{0}$ . The river has no current. We start swimming at an angle of $\theta$  with respect to the shore. Solve for $y(x)$

The first thing we need to do is break the velocity into x and y components. This is fairly simple.

$v_{x}=v_{0}cos(\theta )$
$v_{y}=v_{0}sin(\theta )$

Using simple trig, we can remove the theta.

$v_{x}=v_{0}{\frac {x}{\sqrt {x^{2}+y^{2}}}}$
$v_{y}=v_{0}{\frac {y}{\sqrt {x^{2}+y^{2}}}}$

Now we divide the two to find ${\frac {dy}{dx}}$ .

${\frac {dy}{dx}}={\frac {v_{0}{\frac {y}{\sqrt {x^{2}+y^{2}}}}}{v_{0}{\frac {x}{\sqrt {x^{2}+y^{2}}}}}}={\frac {y}{x}}$

Now this is simple to solve separably. It could also be solved via substitution. This is a trivial example, but it can be made more complicated.

### Motion against a current

Imagine the same swimmer. Now there is a current with speed r going straight up the river (positive y direction). How does this change our example?

The x component is still the same.

${\frac {dx}{dt}}=v_{0}cos(\theta )={\frac {v_{0}x}{\sqrt {x^{2}+y^{2}}}}$

And in the y direction we also have a term due to the current.

${\frac {dy}{dt}}=v_{0}sin(\theta )+r={\frac {v_{0}y}{\sqrt {x^{2}+y^{2}}}}+r$

You can get ${\frac {dy}{dx}}$  by dividing the two equations

${\frac {dy}{dx}}={\frac {y}{x}}+{\frac {r{\sqrt {x^{2}+y^{2}}}}{v_{0}x}}$

We can move the x into the root to simplify the equation a bit

${\frac {dy}{dx}}={\frac {y}{x}}+{\frac {r{\sqrt {{\frac {x^{2}}{x^{2}}}+{\frac {y^{2}}{x^{2}}}}}}{v_{0}}}$
${\frac {dy}{dx}}={\frac {y}{x}}+{\frac {r}{v_{0}}}{\sqrt {1+{\frac {y^{2}}{x^{2}}}}}$

Well, this complicated equation looks like a case for ${\frac {y}{x}}$  substitution.

$v={\frac {y}{x}}$
$y=vx$
$y'=v+v'x$
$v+v'x=v+{\frac {r}{v_{0}}}{\sqrt {1+v^{2}}}$
$v'={\frac {r}{xv_{0}}}{\sqrt {1+v^{2}}}$

That looks like a nice, easily solved separable equation. Let solve it.

${\frac {dv}{\sqrt {1+v^{2}}}}={\frac {r}{xv_{0}}}$
$\int {\frac {dv}{\sqrt {1+v^{2}}}}=\int {\frac {r}{xv_{0}}}$

The left end is an ugly integral. Just trust me on it.

$ln(v+{\sqrt {1+v^{2}}})={\frac {r}{v_{0}}}ln(x)+C$
$v+{\sqrt {1+v^{2}}}=e^{ln(x^{\frac {r}{v_{0}}})+C}$
$v+{\sqrt {1+v^{2}}}=Cx^{\frac {r}{v_{0}}}$

Lets try to get rid of that root. Isolate it, and square both sides.

${\sqrt {1+v^{2}}}=Cx^{\frac {r}{v_{0}}}-v$
$1+v^{2}=Cx^{2{\frac {r}{v_{0}}}}-2vCx^{\frac {r}{v_{0}}}+v^{2}$
$2vCx^{\frac {r}{v_{0}}}=C^{2}x^{2{\frac {r}{v_{0}}}}-1$
$v={\frac {Cx^{\frac {r}{v_{0}}}}{2}}-{\frac {1}{2Cx^{\frac {r}{v_{0}}}}}$

Plugging in for v, we get

${\frac {y}{x}}={\frac {Cx^{\frac {r}{v_{0}}}}{2}}-{\frac {1}{2Cx^{\frac {r}{v_{0}}}}}$

We can solve for y by multiplying through by x

$y={\frac {Cx^{{\frac {r}{v_{0}}}+1}}{2}}-{\frac {x}{2Cx^{\frac {r}{v_{0}}}}}$
$y={\frac {C}{2}}x^{{\frac {r}{v_{0}}}+1}-{\frac {1}{2C}}x^{{\frac {-r}{v_{0}}}+1}$

This complicated equation does make sense- the bigger the current, the further you go in the y direction as a portion of the x.

If you ever find an equation this evil in real life, do yourself a favor and buy a computer program to solve it.