Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

How do I actually solve this differential equation?

Exact symbolic methods when the equation allows one, Euler's method as the numerical fallback.

Check whether the equation is SEPARABLE first (can every y, including dy, be moved to one side and every x to the other?) — if so, that's almost always the fastest path. If it's linear in y but NOT separable (y'+P(x)y=Q(x)), use an integrating factor instead. If neither symbolic method applies, or a numerical approximation is all that's asked for, fall back to Euler's Method, trading exactness for a technique that always works given a starting point and a step size.

Symbolic methods

If a first-order equation can be written as \frac{dy}{dx} = g(x)\,h(y), with h(y) \neq 0, divide both sides by h(y) and integrate each side with respect to its own variable. This produces \int \frac{1}{h(y)}\,dy = \int g(x)\,dx, an equation relating y and x (implicitly or explicitly) that solves the original equation.

Show proof

Treat \frac{dy}{dx} as a genuine ratio for a moment (this is a shortcut that a full proof by the chain rule justifies rigorously): dividing both sides by h(y) gives \frac{1}{h(y)}\,dy = g(x)\,dx. Integrate the left side with respect to y and the right side with respect to x — the two sides need not share a variable of integration at all, since each is being integrated on its own. The chain rule confirms this is legitimate: if H(y) is an antiderivative of \frac{1}{h(y)}, differentiating H(y(x)) = \int g(x)\,dx + C implicitly with respect to x gives H'(y)\cdot\frac{dy}{dx} = g(x), i.e. \frac{1}{h(y)}\cdot\frac{dy}{dx} = g(x) — exactly the original equation, recovered.

Every first-order linear equation can be written in standard form \frac{dy}{dx} + P(x)y = Q(x). Multiplying both sides by the integrating factor \mu(x) = e^{\int P(x)\,dx} collapses the left side into the derivative of a single product: \dfrac{d}{dx}\big[\mu(x)y\big] = \mu(x)Q(x). That gives y = \frac{1}{\mu(x)}\int \mu(x)Q(x)\,dx.

Show proof

By the product rule, \dfrac{d}{dx}\big[\mu(x)y\big] = \mu(x)y' + \mu'(x)y. Choosing \mu(x) = e^{\int P(x)\,dx} gives \mu'(x) = P(x)e^{\int P(x)\,dx} = P(x)\mu(x) by the chain rule, so \dfrac{d}{dx}\big[\mu(x)y\big] = \mu(x)y' + P(x)\mu(x)y = \mu(x)\big(y'+P(x)y\big) — exactly \mu(x) times the left side of the standard-form equation. Multiplying the whole equation by \mu(x) therefore turns it into \dfrac{d}{dx}\big[\mu(x)y\big] = \mu(x)Q(x), which integrates directly to \mu(x)y = \int \mu(x)Q(x)\,dx + C, and dividing by \mu(x) (never zero, since it's an exponential) isolates y.

A differential equation plus a known starting point, together pinning down ONE specific solution.

When no closed form is needed (or possible)

For an initial value problem \dfrac{dy}{dx} = f(x,y), y(x_0)=y_0, and a chosen step size h, Euler's method builds an approximate solution one step at a time by x_{n+1} = x_n + h, \qquad y_{n+1} = y_n + h\cdot f(x_n, y_n).

Show proof

The construction is exactly the tangent-line approximation, applied repeatedly instead of once. At (x_n, y_n) the differential equation itself hands over the slope, f(x_n,y_n), since that's what \frac{dy}{dx} evaluates to there. Walking a horizontal distance h along the line through (x_n,y_n) with that slope lands at height y_n + h\cdot f(x_n,y_n) — the linear approximation formula y \approx y_n + f'(x_n)(x-x_n) with x - x_n = h. Treating that new point as the start of the next step and repeating is the entire method; no higher-order information is ever used, which is exactly why the approximation drifts from the true solution as the curve bends away from each step's tangent line.

A grid of short line segments, each showing dy/dx at that point — a visual map of a differential equation's solutions.

Sketch this first — it previews every solution's shape before computing a single numerical step.

Graph settings

Calculator