Separation of Variables
Separation of Variables is a method for solving first-order differential equations of the form:
$$\frac{dy}{dx}=f(x)g(y)$$
The idea is simple:
Put all the y-terms on one side and all the x-terms on the other,
then integrate both sides.
This method gives a general solution and often leads to exponential, logarithmic, or trigonometric functions depending on the equation.
General Steps for Separation of Variables
-
Start with the differential equation
$$\frac{dy}{dx}=f(x)\cdot{g(y)}$$
-
Separate variables
$$\frac{1}{g(y)}dy=f(x)dx$$
-
Integrate both sides
$$\int\frac{1}{g(y)}dy=\int f(x)dx$$
-
Add the constant of integration (usually on the x-side)
-
Solve for y if possible (This creates the explicit solution.)
This method is widely used in growth/decay models, cooling laws, logistic equations, and many AP exam questions.
Example 1 (Simple Exponential Growth)
Solve:
$$\frac{dy}{dx}=3y$$
Step 1: Separate
$$\frac{1}{y}\frac{dy}{dx}=3 \longrightarrow \frac{1}{y}dy=3dx$$
Step 2: Integrate
$$\int\frac{1}{y}dy=\int3dx$$
$$\ln|y|=3x+C$$
Step 3: Solve for y
Exponentiate: $$e^{\ln|y|)=e^{3x+C} \longrightarrow |y|=e^{3x+C}=e^{3x}\cdot{e^{c}}=C\cdot{e^{3x}}$$
$$e^{c}=constant$$
So:
Example 2 (Product Form)
Solve:
$$\frac{dy}{dx}=x^{2}y^{3}$$
Step 1: Separate
$$\frac{1}{y^{3}}dy=x^{2}dx$$
Step 2: Integrate
$$\int\frac{1}{y^{3}}dy=\int x^{2}dx$$
$$-\frac{1}{y^{2}}=\frac{x^{3}}{3}+C$$
Step 3: Solve for y
$$-\frac{1}{y^{2}}=\frac{x^{3}}{3}+C$$
This is the general implicit form of the solution.
Example 3 (Logarithmic Form)
Solve:
Step 1: Separate
$$y dy=x dx$$
Step 2: Integrate
$$\int y dy=\int x dx$$
$$\frac{1}{2}y^{2}=\frac{1}{2}x^{2}+C$$
Step 3: Solve
Multiply by 2:
$$y=\pm\sqrt{x^{2}+C}$$
Initial Conditions problem
If a problem gives an initial value:
you plug it in AFTER finding the general solution.
Example:
$$\frac{dy}{dx}=3y , y(0)=4$$
General solution:
$$y=Ce^{3x}$$
Use initial condition:
$$4=C\cdot{e^{0}} \longrightarrow C=4$$