AP Calculus AB and BC · Unit 7 · Topic 7.6

    7.6 Finding General Solutions Using Separation of Variables

    Reviewed by P V Satish, Senior Faculty of Science and Academic Consultant · PG Life Sciences, PGD Biotechnology · 20+ years teaching NEET and AP · Special interest in biotechnology, biochemistry and the basics of physics
    Updated

    In short

    A differential equation is separable if it can be written as dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y). Move all the yy's to one side with dydy and all the xx's to the other with dxdx, integrate both sides, add one constant, and solve for yy if possible. The result is the general solution, a family with one arbitrary constant.

    What you need to know

    • Recognise separable differential equations.
    • Separate the variables correctly, including dy and dx.
    • Integrate both sides and include a constant of integration.
    • Solve for y and simplify the constant.

    The method

    • Write the equation as dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y).
    • Separate: 1h(y) dy=g(x) dx\frac{1}{h(y)}\,dy = g(x)\,dx.
    • Integrate both sides; add CC to one side only.
    • Solve for yy if the question asks or if possible.

    Example. dydx=xy\frac{dy}{dx} = xy. Separate: 1y dy=x dx\frac{1}{y}\,dy = x\,dx. Integrate: ln⁡∣y∣=x22+C\ln|y| = \frac{x^2}{2} + C. Exponentiate: ∣y∣=eCex2/2|y| = e^{C}e^{x^2/2}, so y=Aex2/2y = Ae^{x^2/2}, where A=±eCA = \pm e^C. The value A=0A = 0 gives y=0y = 0, which is also a solution, so AA can be any real number.

    More examples

    dydx=xy\frac{dy}{dx} = \frac{x}{y}: y dy=x dxy\,dy = x\,dx, so y22=x22+C\frac{y^2}{2} = \frac{x^2}{2} + C, or y2=x2+Ky^2 = x^2 + K. The solutions are hyperbolas (or the lines y=±xy = \pm x when K=0K = 0).

    dydx=y2\frac{dy}{dx} = y^2: y−2 dy=dxy^{-2}\,dy = dx, so −1y=x+C-\frac{1}{y} = x + C and y=−1x+Cy = -\frac{1}{x + C}. The constant solution y=0y = 0 was lost when dividing by y2y^2; it is a solution too.

    dydx=ex−y\frac{dy}{dx} = e^{x - y}: rewrite as exe−ye^x e^{-y}, separate to ey dy=ex dxe^y\,dy = e^x\,dx, integrate to ey=ex+Ce^y = e^x + C, and solve: y=ln⁡(ex+C)y = \ln(e^x + C).

    Handling the constant

    Only one constant is needed: constants from both sides combine into one. After exponentiating or multiplying, rename the constant (eCe^C becomes AA, 2C2C becomes KK) to keep the answer tidy. What matters is that it stays arbitrary.

    Why it works

    Writing 1h(y) dy=g(x) dx\frac{1}{h(y)}\,dy = g(x)\,dx looks like splitting a fraction, but it is shorthand for the chain rule. If HH is an antiderivative of 1h\frac{1}{h}, then ddxH(y)=1h(y)dydx=g(x)\frac{d}{dx}H(y) = \frac{1}{h(y)}\frac{dy}{dx} = g(x), so H(y)H(y) and ∫g(x) dx\int g(x)\,dx differ by a constant. Separation of variables is substitution in disguise, which is why it is reliable.

    In practice, the method has three places where mistakes happen: separating a sum as if it were a product, forgetting the constant, and mishandling logarithms when solving for yy. If you check each of those three every time, separation of variables becomes one of the most dependable sources of points on the exam. Topic 7.7 adds the last step, using a given point to pin down the constant.

    Key terms

    Separable equation
    A differential equation of the form dy/dx = g(x)h(y).
    Separation of variables
    Moving all y-terms to one side and x-terms to the other, then integrating.
    General solution
    The family of solutions containing one arbitrary constant.
    Lost solution
    A constant solution removed by dividing by h(y), such as y = 0.

    Common mistakes

    • Adding C only after solving for y.

      Add C immediately after integrating.

    • Separating sums as if they were products.

      Only products g(x)h(y) separate.

    • Writing ln⁡y\ln y without absolute value, then losing negative solutions.

      Use ln⁡∣y∣\ln|y| and let the constant absorb the sign.

    How this topic is tested

    • Keep dy with y and dx with x.
    • Write the antiderivatives clearly on each side.
    • Simplify the constant after solving for y.

    Practice questions

    Original AP-style multiple-choice questions. Pick an answer to see the explanation.

    1. Question 1 · MP 1 · Implementing Mathematical Processes

      What is the general solution of dydx=xy\frac{dy}{dx} = xy?

    2. Question 2 · MP 3 · Justification

      Which equation is separable?

    3. Question 3 · MP 1 · Implementing Mathematical Processes

      After separating dydx=xy\frac{dy}{dx} = \frac{x}{y} and integrating, what is the result?

    4. Question 4 · MP 1 · Implementing Mathematical Processes

      What is the general solution of dydx=ex−y\frac{dy}{dx} = e^{x - y}?

    5. Question 5 · MP 3 · Justification

      Why is y=ex2/2+Cy = e^{x^2/2} + C not the general solution of dydx=xy\frac{dy}{dx} = xy?

    Free-response practice

    Write your answer first, then mark it against the scoring guide.

    Free response (no calculator) · 4 points

    Find the general solution of dydx=3x22y\frac{dy}{dx} = \frac{3x^2}{2y} for y>0y > 0.

    1. (a) Separate the variables.
    2. (b) Integrate both sides.
    3. (c) Solve for y.

    Connected topics

    Frequently asked questions

    Do I always have to solve for y?

    Only if the question asks. An implicit answer like y² = x³ + C is a valid general solution otherwise.

    Why only one constant?

    Constants on both sides combine into one.

    Is dy/dx really a fraction?

    No, but the separated notation is a reliable shorthand for the chain rule.

    How this shows up on the exam42 multiple-choice and 6 free-response questions, with and without a calculator. See how the exam is laid out.

    Free Unit 7 cheat sheet

    Every topic in Unit 7: Differential Equations on a few printable pages: the core idea, key terms, the two traps students fall into and what the exam asks.

    We'll use your email to tell you when new AP Calculus AB practice material is ready. No spam, and we'll delete it if you ask.

    Full-length AP Calculus AB practice examsUnit 7 is one of 8 units on the exam. Two timed exams in the 2027 format (42 MCQ + 6 FRQ, with calculator and no-calculator parts), worked explanations, scoring guides and an estimated 1–5 score. $14.99 · try 5 questions free.

    Related lessons in other AP courses

    All topics in Unit 7: Differential Equations

    1. 7.1 Modeling Situations with Differential Equations
    2. 7.2 Verifying Solutions for Differential Equations
    3. 7.3 Sketching Slope Fields
    4. 7.4 Reasoning Using Slope Fields
    5. 7.6 Finding General Solutions Using Separation of Variables
    6. 7.7 Finding Particular Solutions Using Initial Conditions and Separation of Variables
    7. 7.8 Exponential Models with Differential Equations

    Other units in AP Calculus AB

    AP® is a trademark registered by College Board, which is not affiliated with, and does not endorse, this website.