The Separable Variables Method

Let’s solve differential equations. This is arguably the most applied use of calculus in the STEM fields, especially in physics and engineering.

The objective is simple: Given an equation involving the variable x, the function y \equiv y(x), and its derivative \displaystyle \frac{\mathrm dy}{\mathrm dx} \equiv y'(x), can we find an equation involving just x and y?

Example 1. Find the general solution to the differential equation \displaystyle \frac{\mathrm dy}{\mathrm dx} = x.

Solution. What this equation tells us is that the derivative of y is x. Since integrals un-do derivatives,

\displaystyle y = \int \frac{\mathrm dy}{\mathrm dx}\, \mathrm dx = \int x\, \mathrm dx = \frac 12 x^2 + C.

This yields our first solving technique: direct integration. For the rest of this writeup, we will assume that y' is continuous in x.

Theorem 1. For any continuous f, the general solution to the differential equation \displaystyle \frac{\mathrm dy}{\mathrm dx} = f(x) is

\displaystyle y =\int f(x)\, \mathrm dx.

Proof. By the fundamental theorem of calculus (i.e. integration being the reverse of differentiation),

\displaystyle y = \int \mathrm dy = \int \frac{\mathrm dy}{\mathrm dx}\, \mathrm dx = \int f(x)\, \mathrm dx.

Here, we abbreviate

\displaystyle \int f(x)\, \mathrm dx = y(0) + \int_0^x f(t)\, \mathrm dt,

where y(0) serves as the arbitrary constant of integration.

What is intriguing about this proof is the second =, which suggests a “cancelation” of sorts between the \mathrm dx terms. This is obviously an abuse of notation, but it does hint toward a kosher solution via the chain rule.

Theorem 2. For any continuous f, g and g(y) \neq 0, the general solution to the differential equation \displaystyle \frac{\mathrm dy}{\mathrm dx} = f(x)g(y) is

\displaystyle \int \frac{1}{g(y)}\, \mathrm dy =\int f(x)\, \mathrm dx.

This is known as the method of separable variables.

Proof. By the chain rule,

\displaystyle \begin{aligned} \frac{\mathrm d}{\mathrm dx} \int \frac{1}{g(y)}\, \mathrm dy &= \left( \frac{\mathrm d}{\mathrm dy} \int \frac{1}{g(y)}\, \mathrm dy \right) \cdot \frac{\mathrm dy}{\mathrm dx} \\ &= \frac{1}{g(y)} \cdot f(x)g(y) \\ &= f(x).\end{aligned}

Integrating with respect to x on both sides,

\displaystyle  \int \frac{1}{g(y)}\, \mathrm dy = \int f(x)\, \mathrm dx.

Example 2. Solve the equation \displaystyle \frac{\mathrm dy}{\mathrm dx} = y.

Solution. By the method of separable variables,

\displaystyle \begin{aligned} \int \frac 1y\, \mathrm dy &= \int \, \mathrm dx \\ \ln|y| + C_1 &= x + C_2 \\ e^{\ln |y|} &= e^{x + C_1 - C_2} \\ |y| &= e^{x} e^C \\ y &= \pm e^C \cdot e^{x} \\ y &= Ae^{x},\end{aligned}

where C = C_1 - C_2 and A = \pm e^C \neq 0 are constants.

It is because we can write C_1 - C_2 = C that we only need to write +C on one side of the equation, since this means we get to write less. Math people are exceedingly lazy.

Example 3. For any continuous P, find the general solution to the differential equation

\displaystyle \frac{\mathrm dy}{\mathrm dx} + P(x)y = 0.

Solution. By the method of separable variables,

\displaystyle \begin{aligned} \int \frac 1{y}\, \mathrm dy &= \int -P(x)\, \mathrm dx \\ \ln |y| &= \int -P(x)\, \mathrm dx \\  |y| &= e^{\int -P(x)\, \mathrm dx} \\ y &= Ae^{\int -P(x)\, \mathrm dx},\end{aligned}

where A = \pm 1.

In the next post, we apply the method of separable variables to solve more general differential equations, known as linear differential equations.

—Joel Kindiak, 27 Jan 2025, 1627H

,

Published by


Responses

  1. Differential Equation Magic – KindiakMath

    […] the method of separable variables, which […]

    Like

  2. The Power of Substitutions – KindiakMath

    […] can be solved by the method of separable variables. In […]

    Like

  3. Two-Dimensional Differential Equations – KindiakMath

    […] the method of separable variables, , so […]

    Like

  4. Launching Calculus – KindiakMath

    […] on both sides the integrating (this is known as the method of separable […]

    Like

  5. Kindiak Gauntlet (Differential Equations) – KindiakMath

    […] Solution. By the method of separable variables, […]

    Like

Leave a comment