Mastering Differential Equations: Separation of Variables

Understanding Separable Differential Equations

Definitions & Concepts

In AP Calculus AB, a major component of Unit 7 is solving differential equations algebraically. A differential equation is an equation involving a function and its derivative. The goal is to find the function y=f(x)y = f(x) that satisfies the relationship.

Not all differential equations can be solved easily, but in this course, we focus on Separable Differential Equations. These are equations where the variables xx and yy can be algebraically separated onto opposite sides of the equation.

Formally, a differential equation is separable if it can be written in the form:

dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y)

Here, the derivative is the product of a function of xx and a function of yy. By dividing and multiplying, we can rearrange this into:

1h(y)dy=g(x)dx\frac{1}{h(y)} dy = g(x) dx

Once in this form, we can integrate both sides to find the solution.

Visual representation of General vs. Particular Solutions

General vs. Particular Solutions
  • General Solution: Represents a family of functions involving an arbitrary constant, +C+C. Graphically, this looks like many parallel or related curves (as seen in the image above).
  • Particular Solution: A specific function derived from the general solution using an Initial Condition (e.g., y(0)=5y(0) = 5). This solution represents the single curve that passes through a specific point on the coordinate plane.

Finding General Solutions Using Separation of Variables

The Step-by-Step Algorithm

On the AP Exam Free Response Questions (FRQ), separating variables effectively accounts for the majority of points in differential equation problems. Follow this strict protocol:

  1. Separate: Algebraically move all terms involving yy (including dydy) to one side and all terms involving xx (including dxdx) to the other.
  2. Integrate: Apply the integral symbol ∫\int to both sides. Find the antiderivative of each side independently.
  3. Add Constant: Add +C+C to the side with the independent variable (usually xx). Do not wait—add it immediately after integrating.
  4. Solve for y: Use algebra to isolate yy. This typically involves exponentiation to remove natural logs or taking roots to remove powers.
Important Formulas & Integration Rules

When separating variables, you will frequently encounter these integration rules:

Power Rule (Reverse):
∫xndx=xn+1n+1+C,(n≠−1)\int x^n dx = \frac{x^{n+1}}{n+1} + C, \quad (n \neq -1)

Logarithmic Rule (Key Concept):
∫1ydy=ln⁡∣y∣+C\int \frac{1}{y} dy = \ln|y| + C
Note: The absolute value bars are mandatory until determined otherwise by initial conditions.

Exponential Relationship:
If ln⁡∣y∣=x+C\ln|y| = x + C, then ∣y∣=ex+C|y| = e^{x+C}. This simplifies to y=Aexy = Ae^x (where A=±eCA = \pm e^C).

Worked Example: General Solution

Problem: Find the general solution for the differential equation dydx=xy2\frac{dy}{dx} = xy^2.

Solution:

  1. Separate: Divide by y2y^2 and multiply by dxdx.
    y−2dy=xdxy^{-2} dy = x dx

  2. Integrate:
    ∫y−2dy=∫xdx\int y^{-2} dy = \int x dx
    y−1−1=12x2+C\frac{y^{-1}}{-1} = \frac{1}{2}x^2 + C
    −1y=12x2+C-\frac{1}{y} = \frac{1}{2}x^2 + C

  3. Solve for y:
    Multiply by -1:
    1y=−12x2−C\frac{1}{y} = -\frac{1}{2}x^2 - C
    Take the reciprocal:
    y=1−12x2+C2y = \frac{1}{-\frac{1}{2}x^2 + C_2}
    (Note: Since CC is arbitrary, −C-C is just another constant, often relabeled or left as CC).


Finding Particular Solutions Using Initial Conditions

Finding the particular solution requires finding the specific value of CC that satisfies a given point (x<em>0,y</em>0)(x<em>0, y</em>0).

Procedure
  1. Perform the separation and integration steps as usual.
  2. Once you have the equation with +C+C, plug in the initial condition x<em>0x<em>0 and y</em>0y</em>0 immediately.
  3. Solve for CC.
  4. Plug CC back into the equation and isolate yy.
Worked Example: Particular Solution

Problem: Find the particular solution y=f(x)y = f(x) to the differential equation dydx=xy\frac{dy}{dx} = \frac{x}{y} with initial condition f(0)=−2f(0) = -2.

Step 1: Separate Variables
ydy=xdxy dy = x dx

Step 2: Integrate Both Sides
∫ydy=∫xdx\int y dy = \int x dx
12y2=12x2+C\frac{1}{2}y^2 = \frac{1}{2}x^2 + C

Step 3: Apply Initial Condition
Use x=0x = 0 and y=−2y = -2 to solve for CC.
12(−2)2=12(0)2+C\frac{1}{2}(-2)^2 = \frac{1}{2}(0)^2 + C
12(4)=0+C  ⟹  2=C\frac{1}{2}(4) = 0 + C \implies 2 = C

So, the equation is:
12y2=12x2+2\frac{1}{2}y^2 = \frac{1}{2}x^2 + 2

Step 4: Solve for yy
Multiply by 2:
y2=x2+4y^2 = x^2 + 4
Take the square root:
y=±x2+4y = \pm\sqrt{x^2 + 4}

Crucial Step: Which sign do we choose? Look at the initial condition f(0)=−2f(0) = -2. Since yy must be negative, we choose the negative branch.

Final Answer:
y=−x2+4y = -\sqrt{x^2 + 4}


The Logic of Exponential Growth and Decay

A very common pattern on the AP exam involves relationships where the rate of change is proportional to the amount present: dydt=ky\frac{dy}{dt} = ky.

When you separate this, you get:
∫1ydy=∫kdt\int \frac{1}{y} dy = \int k dt
ln⁡∣y∣=kt+C\ln|y| = kt + C
∣y∣=ekt+C=ekteC|y| = e^{kt+C} = e^{kt}e^C
y=Aekty = Ae^{kt}

Here, AA represents the initial value y(0)y(0). This derivation is frequent enough that you should be comfortable reproducing it quickly.

Exponential Growth and Decay Solutions


Common Mistakes & Pitfalls

In the context of the AP Calculus AB exam, students frequently lose points on the following errors. Be vigilant!

1. The Separation Sin (0 Points)
If you do not algebraically separate xx and yy correctly (e.g., trying to subtract terms instead of dividing), you will receive zero points for the entire problem, even if your integration is correct later. Separation handles multiplication/division, not addition/subtraction.

  • Wrong: dydx=x+y→dy−y=xdx\frac{dy}{dx} = x + y \rightarrow dy - y = x dx (This is invalid).

2. Forgetting the Constant of Integration (+C)
If you forget +C+C, you cannot mathematically solve for the initial condition. On FRQs, if +C+C is not present, you are usually capped at gaining only half the available points.

3. The Absolute Value Trap
When integrating ∫1ydy\int \frac{1}{y} dy, you MUST write ln⁡∣y∣\ln|y|.

  • If yy is positive based on the initial condition, the bars drop: ln⁡(y)\ln(y).
  • If yy is negative, the bars effectively negate yy: ln⁡(−y)\ln(-y).

4. Improper Algebra with Logs
Remember log properties:

  • ea+b≠ea+ebe^{a+b} \neq e^a + e^b. It is ea⋅ebe^a \cdot e^b.
  • e3ln⁡x≠3xe^{3\ln x} \neq 3x. It is eln⁡x3=x3e^{\ln x^3} = x^3.

5. Domain of Validity
Sometimes a question asks for the "domain over which the solution is valid." The domain of a geometric series solution typically depends on the vertical asymptotes. A particular solution to a differential equation is only valid on the single continuous interval that contains the initial condition.