First-Order Differential Equations
Solve a first-order differential equation step by step: linear equations with an integrating factor, separable equations by separating the variables. Add a starting value for the particular solution, and see the slope field the equation draws.
What is a Differential Equation?
An ordinary equation asks for a number; a differential equation asks for a whole function, described by how it changes. y′ = 0.05·y says “y grows by 5% of itself per unit of x”: money at interest, a growing population, a cooling cup of tea all follow equations like it.
The equation fixes the slope at every point, so it has a whole family of solutions, one for every value of the constant C. A starting value y(x0) = y0 picks one of them: the particular solution.
Slope Field, Step by Step
y′Step-by-Step Solution
Key Methods
Multiplying by μ turns the left side into the derivative of a product, which can be integrated directly.
Put everything with y on one side and everything with x on the other, then integrate both sides.
Put the answer back into the equation. This page does that for every answer, and also follows the slopes numerically (Runge–Kutta) to compare.
Sources & Verification
- W. E. Boyce & R. C. DiPrima, Elementary Differential Equations and Boundary Value Problems, 10th ed., Wiley, 2012 — Sec. 1.1 (direction fields), 2.1 (integrating factors), 2.2 (separable equations).
- J. Stewart, Calculus: Early Transcendentals, 8th ed., Cengage, 2015 — Ch. 9 (Differential Equations).
Frequently Asked Questions
How do you solve a first-order linear differential equation?
Write it as y′ + p(x)·y = q(x) and multiply by the integrating factor μ = e^(∫p dx). The left side becomes (μ·y)′, so you can integrate. For y′ + 2y = 4x: μ = e^(2x), (e^(2x)·y)′ = 4x·e^(2x), integrating gives e^(2x)·y = (2x − 1)·e^(2x) + C, so y = 2x − 1 + C·e^(−2x). With y(0) = 1, C = 2.
What is a separable differential equation?
One that can be written as y′ = f(x)·g(y): the x-part and the y-part are multiplied. Put dy/g(y) on one side and f(x) dx on the other and integrate both. For y′ = x·y: ∫ dy/y = ∫ x dx gives ln|y| = x²/2 + C, so y = A·e^(x²/2).
What is the difference between the general and the particular solution?
The general solution contains a free constant C: it describes a whole family of curves, one for every value of C. A starting value y(x₀) = y₀ picks one member of the family, the particular solution. A first-order equation needs one starting value, a second-order equation two.
What is a slope field?
A grid of short dashes, each with the slope that the differential equation gives at that point. Solutions follow the dashes like a boat follows the current, so you can sketch them without solving anything. Because every point has only one slope, two different solution curves never cross.
How do you model a cooling cup of tea?
Newton's law of cooling: dT/dt = −k·(T − T_room). It is separable, with solution T = T_room + (T₀ − T_room)·e^(−kt). Tea at 90 °C in a 20 °C room with k = 0.1 per minute is at 20 + 70·e^(−1) ≈ 45.8 °C after 10 minutes.
Can every differential equation be solved with a formula?
No. Many have no solution in terms of the usual functions, even simple-looking ones such as y′ = e^(x²). Then the solution is calculated numerically, by following the slopes in small steps. This calculator uses the Runge–Kutta (RK4) method for that, and also to check every formula it finds.