Separable Differential Equation Calculator

Type y' = g(x)h(y), and optionally an initial condition, to separate and integrate.

Write y' and y'' (or dy/dx and d^2y/dx^2): y' + 2y = 4 or y'' - 3y' + 2y = 0. Type powers with ^ and functions with brackets: e^x, sin(x), ln(x).

Optional: one condition such as y(0) = 2. Leave empty for the general solution, with its constant C.

Try

Result

You enteredy′=xyy' = \frac{x}{y}

y2=x2+C\displaystyle y^{2} = x^{2} + C

This solution is implicit: it gives y as a relation in x, not as a single formula.

Solved for y

y=±x2+C\displaystyle y = \pm\sqrt{x^{2} + C}
Show the work
  1. Type of equation

    The right side of y' is a product g(x)h(y), so this equation is separable.

  2. Separation of variables

    The right side is a product of a function of xx and a function of yy, g(x)=xg(x) = x and h(y)=1yh(y) = \frac{1}{y}, so the variables can be separated.

    Using dyh(y)=g(x) dx\frac{dy}{h(y)} = g(x)\,dx

    dydx=g(x) h(y)  ⇒  dyh(y)=g(x) dx\begin{aligned} \frac{dy}{dx} &= g(x)\,h(y) \;\Rightarrow\; \frac{dy}{h(y)} \\ &= g(x)\,dx \end{aligned}
  3. Integrate both sides

    With h(y)=1yh(y) = \frac{1}{y} the yy side integrates by the power rule.

    ∫dyh(y)=∫y dy=y22=x22+C\begin{aligned} \int \frac{dy}{h(y)} &= \int y\,dy \\ &= \frac{y^{2}}{2} \\ &= \frac{x^{2}}{2} + C \end{aligned}
  4. Implicit solution

    The relation cannot be solved for yy in one step, so it is left as an implicit solution.

    y2=x2+Cy^{2} = x^{2} + C
  5. Result

    The general solution, with arbitrary constants.

Worked examples