Separable Differential Equations

Solve differential equations where the rate of change is a product of a function of xx and a function of yy by separating variables and integrating.

dydx=g(x)h(y)    dyh(y)=g(x)dx\frac{dy}{dx} = g(x)h(y) \implies \int \frac{dy}{h(y)} = \int g(x)\,dx

Solve a problem with Separable Differential Equations

Type the problem. The solver will use Separable Differential Equations where Separable Differential Equations is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Separable Differential Equations takes
gg
hh
xx
yy
Separable Differential Equations
SymbolMeaning
ggA function of xx only; appears as a factor in the differential equation. If you confuse this with h(y)h(y), you'll separate incorrectly and your integrals will be with respect to the wrong variable.
hhA function of yy only; appears as the other factor in the differential equation. Treating this as a function of xx will prevent you from separating the equation.
xxThe independent variable; typically represents input values or (in word problems) time. Using yy as the independent variable reverses the role of everything in the method.
yyThe dependent variable; the function you are solving for (expressed in terms of xx). Swapping the roles of xx and yy will make the method not work.

When to use it

A differential equation fits this method when you can write it as dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y)—a product of separate functions.

Level

Usually taught in: Calculus II · Appears on: AP Calculus

Worked examples

1. Solve $\frac{dy}{dx} = 2xy$

Problem

Solve the differential equation dydx=2xy\frac{dy}{dx} = 2xy.
  1. 1ydy=2xdx\frac{1}{y} \, dy = 2x \, dx

    Separate variables by dividing both sides by yy and multiplying by dxdx.

  2. 1ydy=2xdx\int \frac{1}{y} \, dy = \int 2x \, dx

    Set up integrals on both sides.

  3. lny=x2+C\ln|y| = x^2 + C

    Integrate the left side using the standard result 1ydy=lny\int \frac{1}{y} \, dy = \ln|y| and the right side using the power rule to get 2xdx=x2\int 2x \, dx = x^2.

  4. y=Aex2y = Ae^{x^2}

    Exponentiate both sides; A=±eCA = \pm e^C is an arbitrary constant.

Answer: y=Aex2y = Ae^{x^2}

We can separate this equation because the right side is a product of a function of xx alone (which is 2x2x) and a function of yy alone (which is yy). Once separated, we integrate both sides and solve for yy.

2. Solve with negatives, fractions, and an initial condition

Problem

Solve dydx=3xy\frac{dy}{dx} = -\frac{3x}{y} with the initial condition y(0)=2y(0) = 2.
  1. ydy=3xdxy \, dy = -3x \, dx

    Separate variables by multiplying both sides by yy and dxdx.

  2. ydy=3xdx\int y \, dy = \int -3x \, dx

    Set up integrals on both sides.

  3. y22=3x22+C\frac{y^2}{2} = -\frac{3x^2}{2} + C

    Integrate using the power rule: ydy=y22\int y \, dy = \frac{y^2}{2} and 3xdx=3x22\int -3x \, dx = -\frac{3x^2}{2}.

  4. y2+3x2=2Cy^2 + 3x^2 = 2C

    Multiply both sides by 2 and rearrange (treating 2C2C as a single constant).

  5. 4+0=2C    2C=44 + 0 = 2C \implies 2C = 4

    Apply the initial condition y(0)=2y(0) = 2 to find the constant.

Answer: y2+3x2=4y^2 + 3x^2 = 4

This example requires care because yy appears in the denominator on the right side—we must move it to the left before integrating. Also, applying the initial condition y(0)=2y(0) = 2 finds the specific constant, giving us a particular solution instead of the general form.

3. Exponential growth: savings account

Problem

A savings account grows at a rate proportional to the amount of money in it. If the account currently has $1000\$1000 and grows at a rate of 5%5\% per year, find A(t)A(t), the amount after tt years.
  1. dAdt=0.05A\frac{dA}{dt} = 0.05A

    Set up the differential equation: the rate of change (left side) equals the proportionality constant (0.05, or 5% per year) times the current amount.

  2. 1AdA=0.05dt\frac{1}{A} \, dA = 0.05 \, dt

    Separate variables by dividing both sides by AA.

  3. lnA=0.05t+C\ln A = 0.05t + C

    Integrate both sides (we can drop the absolute value since A>0A > 0).

  4. A=Ke0.05tA = Ke^{0.05t}

    Exponentiate both sides; K=eCK = e^C is the arbitrary constant.

  5. K=1000K = 1000

    Apply the initial condition A(0)=1000A(0) = 1000 to find that 1000=Ke0=K1000 = Ke^0 = K.

Answer: A(t)=1000e0.05tA(t) = 1000e^{0.05t}

This real-world scenario leads to an exponential growth equation. Separable differential equations are essential for modeling compound growth because the differential equation naturally separates into a function of time alone and a function of the amount alone.

Common mistakes

Where Separable Differential Equations usually goes wrong
Answer came out wrong
Writing dyh(y)dx=g(x)dx\int \frac{dy}{h(y)} \, dx = \int g(x) \, dx
Always match the variable of integration to the differential: dyh(y)=g(x)dx\int \frac{dy}{h(y)} = \int g(x) \, dx. The left side integrates over yy, the right over xx.
When solving dydx=x2+y\frac{dy}{dx} = x^2 + y, separating as dyx2+y=dx\frac{dy}{x^2 + y} = dx
Separable equations must have the form dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y) (a product). If you see a sum, you need a different method such as an integrating factor, which works for linear equations.
Finding 1ydy=1y\int \frac{1}{y} \, dy = \frac{1}{y} instead of lny\ln|y|
Remember that 1ydy=lny\int \frac{1}{y} \, dy = \ln|y|, not y1y^{-1}. The power rule yndy=yn+1n+1\int y^n \, dy = \frac{y^{n+1}}{n+1} does not apply when n=1n = -1; the logarithm is the exception.
The mistakeWhy it is wrongThe fix
Writing dyh(y)dx=g(x)dx\int \frac{dy}{h(y)} \, dx = \int g(x) \, dxYou cannot integrate dyh(y)\frac{dy}{h(y)} with respect to xx; the left side has dydy and must be integrated with respect to yy.Always match the variable of integration to the differential: dyh(y)=g(x)dx\int \frac{dy}{h(y)} = \int g(x) \, dx. The left side integrates over yy, the right over xx.
When solving dydx=x2+y\frac{dy}{dx} = x^2 + y, separating as dyx2+y=dx\frac{dy}{x^2 + y} = dxThis equation does not separate because x2+yx^2 + y is not a product of a function of xx alone and a function of yy alone; the equation is additive, not multiplicative.Separable equations must have the form dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y) (a product). If you see a sum, you need a different method such as an integrating factor, which works for linear equations.
Finding 1ydy=1y\int \frac{1}{y} \, dy = \frac{1}{y} instead of lny\ln|y|This is a common integration error that breaks the entire solution; the integral of 1y\frac{1}{y} is the natural logarithm, not a power rule.Remember that 1ydy=lny\int \frac{1}{y} \, dy = \ln|y|, not y1y^{-1}. The power rule yndy=yn+1n+1\int y^n \, dy = \frac{y^{n+1}}{n+1} does not apply when n=1n = -1; the logarithm is the exception.

Tips and when to use something else

  • Before separating, check that the equation truly factors into a product of a function of xx and a function of yy. If it does not, the equation is not separable and you need a different method such as an integrating factor, which works for linear equations.
  • Always include the constant of integration CC on one side when you integrate; forgetting it will lose the entire family of solutions.
  • When you integrate 1ydy\int \frac{1}{y} \, dy, you get lny\ln|y|, not 1y\frac{1}{y}. This is the only case where the power rule breaks down (n=1n = -1), so be extra careful.
  • After integrating, you may end up with an implicit solution (like x2+y2=4x^2 + y^2 = 4) rather than an explicit one (y=4x2y = \sqrt{4 - x^2}). Both are valid; choose whichever is easier to work with.

Frequently asked questions

How do I know if a differential equation is separable?
A differential equation is separable if you can write it in the form dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y), where the right side is a product of a function depending only on xx and a function depending only on yy. If the right side is a sum or other combinations, the equation is not separable.
Do I always get a constant of integration on both sides when I integrate?
You can write a constant of integration on both sides (like lny=x2+C1\ln|y| = x^2 + C_1 and lny+C2=x2\ln|y| + C_2 = x^2), but it simplifies to keep just one constant CC on the right side: lny=x2+C\ln|y| = x^2 + C.
What if my answer is implicit, not explicit?
Many separable differential equations lead to implicit solutions (relations between xx and yy rather than yy as a function of xx). Both implicit and explicit solutions are valid. Use whichever form is more convenient for your problem or further analysis.
Why do I have to be careful with the constant of integration?
The constant of integration CC represents the entire family of solutions to the differential equation. Forgetting it means you are missing infinitely many solutions, and an initial condition later will have no way to determine which solution fits your specific situation.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18