Separation of variables [10.FT]

Using separation of variables

To use the method:

  1. Write $y'(x)=\frac{dy}{dx}$.
  2. Pretend that you can do algebra with things like $dy$ and $dx$.
  3. Re-arrange to get $dy$ and all the $y$-related things on one side of the equation and $dx$ and all the $x$-related things on the other side.
  4. Integrate and solve for $y$!

Solve a familiar diff eq:

$$\frac{dy}{dx}=y$$ Re-arrange this to: $$\frac 1y dy = dx$$

Integrate both sides: $$\begineq \int\frac 1y dy =& \int dx\\ \ln y =& x + B\\ \endeq $$

Now, solve for $y$: $$\begineq e^{\ln y} =& e^{x + B}\\ y =& e^x e^B \endeq $$ Since $B$ was a constant, $e^B$ is just another constant. Let's call it $C$, and now the solution is:

$$y=Ce^x$$

Justification for separation of variables

Actually, what's going on is substitution (chain rule) to do this. Let's say that: $$\frac{dy}{dx}=f(x)g(y)=\frac{f(x)}{h(y)}.$$ Where $h(y)=1/g(y)$ will be fine as long as $g(y)\neq 0$.

Then we can use regular old algebra to multiply both sides by $h(y)$: $$h(y)\frac{dy}{dx} = f(x)$$

Let's think of $y=y(x)$ as a function of $x$, then we can write this as $$\begineq h(y(x))\,y'(x) =& f(x)\\ \int h(y(x))\,y'(x)\,dx =& \int f(x)\,dx \endeq $$

We can solve the integral on the left side using substitution. Instead of "$w(x)$" we'll use $y(x)$ as our substitution, because we already see under the integral $y'(x)\,dx=dy$, so:

$$\int h(y)\,dy = \int f(x)\,dx.$$

Unfortunately, not all differential equations can be solved by the method of separation of variables!