Skip to content
Marlbridge

AP® Calculus AB · Unit 7 · Topic 7.6

Finding General Solutions Using Separation of Variables: Study Guide (Calculus AB 7.6)

Learn how to spot a separable differential equation, separate the variables, antidifferentiate both sides with one constant, and write the general solution.

Course scope. This topic is shared by Calculus AB and Calculus BC. Everything here is examinable for both.

A note on notation

This page has no equation renderer, so integrals are written in a compact form. ∫ f(x) dx is the indefinite integral (the family of antiderivatives) of f. ln|y| is the natural logarithm of the absolute value of y. A general solution always contains an arbitrary constant, written C, A or K.

From “checking” solutions to “finding” them

In Topic 7.2 you were given a function and checked that it satisfies a differential equation. In Topics 7.3 and 7.4 you drew slope fields and saw that a differential equation has a whole family of solution curves. Now you find that family with algebra.

A general solution of a differential equation is a formula that describes every solution, using one arbitrary constant. Each value of the constant gives one curve in the family.

The simplest case: the right side depends on x only

If dy/dx = f(x), you are asked for a function whose derivative is f. That is exactly an antiderivative. So

y = ∫ f(x) dx = F(x) + C, where F is any antiderivative of f.

Example: dy/dx = 3x² + cos x. Then y = x³ + sin x + C. Check: d/dx (x³ + sin x + C) = 3x² + cos x. Every value of C works, so there are infinitely many solutions, all vertical shifts of one curve.

This is pure antidifferentiation. The new idea in this topic is what to do when y also appears on the right.

Separable differential equations

A differential equation is separable if you can write it as

dy/dx = g(x) · h(y)

where g depends only on x and h depends only on y. The right side must be a product (or a quotient) of an x-part and a y-part, not a sum.

Differential equation Separable? Reason
dy/dx = x²y Yes g(x) = x², h(y) = y
dy/dx = y/x (x ≠ 0) Yes g(x) = 1/x, h(y) = y
dy/dx = xy + 2x Yes Factor first: x(y + 2)
dy/dx = e^(x + y) Yes Exponent law: e^(x + y) = eˣ · eʸ
dy/dx = x + y No A sum of an x-term and a y-term cannot be split into a product
dy/dx = cos(x + y) No cos(x + y) = cos x cos y − sin x sin y, which is a difference, not a single product

Two of the “yes” rows only look separable after you rewrite them. Always try factoring and the exponent laws before you decide.

The method

For dy/dx = g(x) · h(y):

  1. Separate. Divide by h(y) and “multiply by dx” so that all the y’s are with dy and all the x’s are with dx: (1/h(y)) dy = g(x) dx
  2. Antidifferentiate both sides: ∫ (1/h(y)) dy = ∫ g(x) dx.
  3. Add one constant of integration, on the x side: H(y) = G(x) + C.
  4. Solve for y if you can. Otherwise leave the answer in implicit form.
  5. Check by differentiating.

Why this is valid

Writing dy and dx separately is shorthand. Here is the reason it gives correct answers. Suppose y is a solution, so (1/h(y)) · dy/dx = g(x). Let H be an antiderivative of 1/h(y), so H′(y) = 1/h(y). By the chain rule,

d/dx [H(y)] = H′(y) · dy/dx = (1/h(y)) · dy/dx = g(x)

So H(y) and G(x) have the same derivative with respect to x. Two functions with equal derivatives on an interval differ by a constant. That gives H(y) = G(x) + C, which is exactly what step 3 writes down.

One constant is enough

If you write C₁ on the left and C₂ on the right, you can move C₁ across: H(y) = G(x) + (C₂ − C₁). The difference of two arbitrary constants is one arbitrary constant. Write just C.

Not every fraction gives a logarithm

A very common error is to answer every fraction with ln. Only ∫ (1/y) dy = ln|y| + C. Compare:

Integral Correct result Note
∫ (1/y) dy ln|y| + C The only power of y whose antiderivative is a logarithm
∫ (1/y²) dy −1/y + C Power rule with y⁻², not ln(y²)
∫ (1/(1 + y²)) dy arctan y + C Not ln(1 + y²)
∫ (2y/(1 + y²)) dy ln(1 + y²) + C A logarithm, because the top is the derivative of the bottom

For example, dy/dx = xy² separates to (1/y²) dy = x dx. Then −1/y = x²/2 + C. Multiply by −1 and flip: y = −1/(x²/2 + C) = −2/(x² + K), where K = 2C is still an arbitrary constant.

Worked example 1: a cube that solves cleanly

Question. Find the general solution of dy/dx = (2x + 1)/(3y²).

  1. Is it separable? Yes: (2x + 1) × 1/(3y²).
  2. Separate. Multiply both sides by 3y² and by dx: 3y² dy = (2x + 1) dx
  3. Antidifferentiate both sides. ∫ 3y² dy = y³. ∫ (2x + 1) dx = x² + x.
  4. Add one constant: y³ = x² + x + C
  5. Solve for y. Take the cube root of both sides. A cube root is defined for every real number, so no sign choice is needed: y = ∛(x² + x + C)

Check. Differentiate y³ = x² + x + C implicitly: 3y² · dy/dx = 2x + 1, so dy/dx = (2x + 1)/(3y²). That is the original equation.

Interpretation. Each value of C gives a different solution curve. C = 0 gives y = ∛(x² + x); C = 8 gives y = ∛(x² + x + 8); and so on.

Worked example 2: the logarithm and the constant

Question. Find the general solution of dy/dx = −2xy.

  1. Separate. Divide by y (for now, assume y ≠ 0): (1/y) dy = −2x dx
  2. Antidifferentiate: ∫ (1/y) dy = ln|y|; ∫ −2x dx = −x². ln|y| = −x² + C
  3. Undo the logarithm. Raise e to the power of each side. Use the exponent law on the right: |y| = e^(−x² + C) = e^C · e^(−x²)
  4. Remove the absolute value. |y| = e^C e^(−x²) means y = e^C e^(−x²) or y = −e^C e^(−x²). Both ±e^C are just nonzero constants, so call the constant A: y = A e^(−x²)
  5. The case we set aside. We divided by y, which assumed y ≠ 0. But y = 0 also works: its derivative is 0 and −2x · 0 = 0. That is the solution with A = 0. So the general solution is y = A e^(−x²), for any real A.

Check. If y = A e^(−x²), the chain rule gives dy/dx = A e^(−x²) · (−2x) = −2x · y. Correct.

Watch the constant. e^(−x² + C) is e^C · e^(−x²), a multiplier. It is not e^(−x²) + C. Try y = e^(−x²) + C in the equation: dy/dx = −2x e^(−x²), but −2xy = −2x e^(−x²) − 2Cx. They are not equal unless C = 0.

Four members of the family y = A e^(−x²), for A = 2, 1, 0 and −1 Axes with x from −2.5 to 2.5 and y from −1.5 to 2.5. Three bell-shaped curves are symmetric about the y-axis and flatten towards the x-axis on both sides. The solid curve has its peak at (0, 2) and is labelled A = 2. The long-dashed curve has its peak at (0, 1) and is labelled A = 1. The dotted curve is upside down, with its lowest point at (0, −1), and is labelled A = −1. The x-axis itself is the solution with A = 0. No two curves cross. −2−112x 21−1y A = 2 A = 1 A = −1 solid: A = 2 · dashed: A = 1 · dotted: A = −1 · x-axis: A = 0
Figure 1. Some solutions of dy/dx = −2xy. Every curve has the form y = A e^(−x²). Changing A stretches the curve vertically (A = 2 is twice as tall as A = 1) or flips it (A = −1). A = 0 gives the constant solution y = 0, which lies along the x-axis. Axes are unitless.

Figure 1 shows why the answer is a family. Each curve is a valid solution, and a slope field for dy/dx = −2xy would fit all of them. Picking out one curve needs an extra piece of information, a point on the curve. That is Topic 7.7.

Worked example 3: splitting an exponential

Question. Find the general solution of dy/dx = e^(x − y).

  1. Make it separable. Use the exponent law: e^(x − y) = eˣ · e^(−y). So dy/dx = eˣ e^(−y).
  2. Separate. Divide by e^(−y), which is the same as multiplying by eʸ: eʸ dy = eˣ dx
  3. Antidifferentiate and add one constant: eʸ = eˣ + C
  4. Solve for y. Take the natural log of both sides: y = ln(eˣ + C)

Check. dy/dx = eˣ/(eˣ + C). And e^(x − y) = eˣ/eʸ = eˣ/(eˣ + C). They match.

Note on the domain. The logarithm needs eˣ + C > 0. If C ≥ 0, that is true for every x. If C is negative, the solution exists only for some x values. Domain restrictions like this are a focus of Topic 7.7.

A trap. Do not “cancel the e’s” to get dy/dx = x − y. The exponential function does not cancel like a common factor.

When you cannot solve for y

Sometimes the y side does not rearrange. For dy/dx = 2x/(cos y + 3y²), separating gives (cos y + 3y²) dy = 2x dx, so

sin y + y³ = x² + C

There is no way to isolate y using familiar functions. This implicit general solution is still correct and complete. You can check it with implicit differentiation, as in Topic 3.2.

Common misconceptions

  • Forgetting the constant. Without C you have found one solution, not the general solution. In Topic 7.7 you will also find that, without C, there is nothing to adjust to fit an initial condition, so every later step fails too.
  • Adding C at the end. The constant enters when you antidifferentiate, before you rearrange. Writing y = e^(−x²) + C (instead of A e^(−x²)) gives functions that are not solutions.
  • Treating e^(G(x) + C) as e^(G(x)) + C. By the exponent law, e^(G + C) = e^C · e^G. The constant becomes a multiplier.
  • Answering every fraction with ln. ∫ (1/y²) dy is −1/y, not ln(y²). Check that the top is the derivative of the bottom before writing a logarithm.
  • Calling a sum separable. dy/dx = x + y cannot be separated. A product or quotient of an x-part and a y-part is needed.
  • Integrating y with respect to x. In dy = (x + y) dx you cannot write ∫ y dx = xy. y is a function of x, not a constant. This is exactly why you must separate first.
  • Losing a constant solution. Dividing by h(y) assumes h(y) ≠ 0. Values where h(y) = 0, such as y = 0 in Worked example 2, give constant solutions. Often the constant A = 0 brings them back.
  • Two constants. One constant per equation is enough.

Where this leads

You can now find the general solution of a separable differential equation. In Topic 7.7, Finding Particular Solutions Using Initial Conditions and Separation of Variables, you will use one known point to find the value of the constant, choose the right sign, and state the domain of the solution. In Topic 7.8, the same method gives the exponential growth and decay models. The slope fields in Topic 7.4 show these families as pictures. Students in either course can return to the Calculus AB roadmap or the Calculus BC roadmap.

Try the practice questions now, then use the revision notes and the checklist to consolidate.

Quick questions

Is this page for Calculus AB or Calculus BC?

Both. Topic 7.6 is common content, so the same page serves AB and BC students.

Why do I add only one constant when I integrate two sides?

You could write C₁ on the left and C₂ on the right, but moving C₁ across gives C₂ − C₁, which is still just one unknown constant. Call it C.

Do I always have to solve for y?

Solve for y when it is reasonable. If the equation cannot be rearranged (for example sin y + y³ = x² + C), leave it in implicit form. That is still a correct general solution.

Is writing dy and dx on separate sides legal?

It is shorthand. The chain rule shows that antidifferentiating both sides gives a correct result, so the shorthand is safe for separable equations.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.