First-Order Ordinary Differential Equations

A first-order ordinary differential equation is the simplest dynamical statement one can write: it fixes the rate of change y′y' of a quantity in terms of the quantity itself and the variable it depends on. Cast in normal form, y′=f(x,y)y'=f(x,y), the equation assigns a slope to every point of the (x,y)(x,y) plane — a direction field of tiny arrows — and a solution is any curve that stays everywhere tangent to those arrows. Each such curve belongs to a one-parameter family, the parameter being the single constant of integration that first-order integration inevitably leaves behind; one initial condition y(x0)=y0y(x_0)=y_0 pins it down. The craft of the subject is recognition. A handful of structural forms each carry a closed-form recipe, and almost every solvable first-order equation is one of them wearing a disguise. Separable equations peel the two variables onto opposite sides of the equals sign and collapse to two independent integrals. Linear equations — the workhorses of physics — yield to one universal trick, the integrating factor, which folds the left-hand side into the derivative of a single product. Exact equations announce themselves through a curl-free condition and integrate as total differentials, their solutions the level curves of a hidden potential. Homogeneous, Bernoulli, and isobaric equations are none of these until a substitution turns them into one. Underneath every recipe sits the existence-and-uniqueness theorem: where ff and ∂f/∂y\partial f/\partial y are continuous, exactly one integral curve threads each point. That is what licenses the definite article in "the solution" and makes an initial-value problem in mechanics or circuit theory deterministic. First-order theory is also the doorway downstream — the integrating factor generalises, the arbitrary constant foreshadows the two-constant second-order solution, and the boundary-value view opens onto Sturm–Liouville theory.

Key takeaways
  • A first-order ODE relates an unknown y(x)y(x) to its first derivative, written in normal form as y′=f(x,y)y'=f(x,y); geometrically it is a slope field and its solutions are the curves tangent to it.
  • Three elementary solvable types dominate: separable y′=g(x)h(y)y'=g(x)h(y), linear y′+p(x)y=q(x)y'+p(x)y=q(x), and exact M dx+N dy=0M\,\mathrm{d}x+N\,\mathrm{d}y=0 with My=NxM_y=N_x.
  • Linear equations succumb universally to the integrating factor μ=exp⁡ ⁣∫p dx\mu=\exp\!\int p\,\mathrm{d}x, which turns the left side into the perfect derivative (μy)′(\mu y)' and reduces the problem to one integration.
  • Exactness My=NxM_y=N_x is the curl-free condition; it guarantees a potential Φ(x,y)\Phi(x,y) whose level curves Φ=C\Phi=C are the solutions, and many non-exact equations are rescued by their own integrating factor.
  • The general solution carries exactly one arbitrary constant, fixed by one initial condition, whose unique solvability the existence–uniqueness theorem guarantees when ff and ∂f/∂y\partial f/\partial y are continuous.
  • These few methods underlie radioactive decay, Newtonian cooling, RC and RL circuits, terminal velocity, and logistic growth — the canonical exactly solvable models of physics.
  • Key idea: classify the equation as separable, linear, or exact, then apply the matching reduction — separate and integrate, multiply by μ=e∫p dx\mu=e^{\int p\,\mathrm{d}x}, or recognise a total differential — each route ending in one integration and one constant fixed by an initial condition.
The core insight

Classify the equation as separable, linear, or exact, then apply the matching reduction: separate and integrate, multiply by μ=e∫p dx\mu=e^{\int p\,\mathrm{d}x}, or recognise a total differential. Each route ends in one integration and one arbitrary constant, fixed by a single initial condition.

Where this lives today

First-order equations are the innermost loop of computational science. Every general-purpose numerical integrator — the Runge–Kutta families, the adaptive Dormand–Prince method inside MATLAB's `ode45`, the backward-differentiation solvers for stiff systems — advances a first-order problem y˙=f(t,y)\dot{\mathbf y}=\mathbf f(t,\mathbf y) one small step at a time, and higher-order equations reach them only after being rewritten as first-order systems. The same mathematics tracks a drug through the body: first-order pharmacokinetics models plasma concentration by C˙=−keC\dot C=-k_eC, so the elimination half-life ln⁡2/ke\ln2/k_e sets the dosing interval that keeps a medicine in its therapeutic window. Radiocarbon dating inverts N˙=−λN\dot N=-\lambda N to read ages from the residual 14^{14}C fraction, and epidemiology opens every compartmental model with first-order transfer rates. The open frontier is stiffness and multiscale coupling — kinetics networks whose fastest and slowest first-order rates differ by billions, demanding the implicit solvers and error control that remain active research.

The physical picture

The equation y′=f(x,y)y'=f(x,y) is a machine that hands you a slope at every point without telling you the curves. Stand at any (x,y)(x,y), read off the number f(x,y)f(x,y), and draw a short line with that slope: repeat everywhere and the plane fills with a texture of tiny strokes, the direction field. A solution is a curve that never crosses the grain — everywhere its tangent matches the local stroke. The existence theorem is the promise that, wherever the field is smooth, you can drop a pebble at a point and exactly one such curve runs through it, so the strokes braid into a family of non-crossing curves, one per point, labelled by the single constant of integration.

Figure
Direction field of y′ = x − y. Every short stroke has slope f = x − y, the zero-slope isocline is the diagonal y = x, and the blue integral curve through the point 0, 2 stays tangent to the field, relaxing onto the particular solution y = x − 1
A first-order ODE is a slope field: y′ = f(x,y) assigns a direction to every point x y y = x − 1 one curve through (0, 2) isocline y = x has slope 0

Autonomous equations — where ff depends on yy alone — organise physics because their arrows repeat along every vertical. Radioactive decay, Newtonian cooling, RC charging, and terminal velocity are all of this kind: a stable equilibrium sits where the arrows reverse, and every curve is drawn exponentially toward it at a rate set directly by the equation's coefficient. The second figure makes that concrete with real numbers, plotting the solution family of T˙=−k(T−Ta)\dot T=-k(T-T_a) for a cup of coffee cooling in a room, together with the time constant 1/k1/k the coefficient alone dictates.

Figure
Solution family of Newton cooling, dT/dt = −k(T − Tₐ), with Tₐ = 20 °C and k = 0.0560 per minute. Curves from three initial temperatures all relax to the ambient dashed line; a body at 90 °C cools to 42.9 °C after 20 min, and 1/k = 17.9 min is the time to fall to within 1/e of the gap
Exponential relaxation: every solution of dT/dt = −k(T − Tₐ) is drawn to Tₐ 90 70 50 30 10 temperature T (°C) 0 10 20 30 40 time t (minutes) ambient Tₐ = 20 °C T₀ = 90 °C T(20) = 42.9 °C t = 1/k = 17.9 min

The core equations

Everything begins with the normal form, in which the derivative is isolated on the left and the whole content of the equation is packed into the single function ff on the right. Writing an equation this way is the first move of every method, because it reveals at a glance which structural type is present.

dydx=f(x,y)(1)\frac{\mathrm{d}y}{\mathrm{d}x} = f(x,y) \qquad (1)

where: y(x)y(x) — the unknown function to be determined; y′=dy/dxy'=\mathrm{d}y/\mathrm{d}x — its first derivative, the slope of the solution curve; f(x,y)f(x,y) — the given function that prescribes the slope field. Reading it: ff is the rule that turns a location into a direction, and solving means integrating that rule into curves. When ff factors as g(x)h(y)g(x)h(y) the variables separate: divide by hh, multiply by dx\mathrm{d}x, and each side becomes a one-variable integral. This is the oldest and most direct of the recipes.

∫dyh(y)=∫g(x) dx+C(2)\int \frac{\mathrm{d}y}{h(y)} = \int g(x)\,\mathrm{d}x + C \qquad (2)

where: g(x)g(x) — the xx-dependent factor; h(y)h(y) — the yy-dependent factor, which must stay nonzero along the path; CC — the single arbitrary constant. Reading it: two independent integrals, one per variable, with one constant absorbing both — but any root of hh is a constant equilibrium solution the division silently drops. For a linear equation y′+p(x)y=q(x)y'+p(x)y=q(x), no factoring is available, yet a universal device works: multiply through by the integrating factor μ\mu, engineered so the left side becomes a single derivative.

μ(x)=exp⁡ ⁣(∫p(x) dx)(3)\mu(x) = \exp\!\left(\int p(x)\,\mathrm{d}x\right) \qquad (3)

where: μ(x)\mu(x) — the integrating factor, which makes the left-hand side a perfect derivative; p(x)p(x) — the coefficient of yy once the equation is in normal form. Reading it: μ\mu is chosen precisely so that μ′=pμ\mu'=p\mu, the condition that makes (μy)′(\mu y)' reproduce μ(y′+py)\mu(y'+py). That single choice collapses the linear equation to one integration and delivers the general solution in closed form — one explicit formula covering every linear first-order problem.

y(x)=1μ(x)[∫μ(x) q(x) dx+C](4)y(x) = \frac{1}{\mu(x)}\left[\int \mu(x)\,q(x)\,\mathrm{d}x + C\right] \qquad (4)

where: q(x)q(x) — the forcing or inhomogeneous term; CC — the constant fixed by the initial condition. Reading it: the bracket is the homogeneous-plus-particular content, and dividing by the strictly positive μ\mu never introduces or loses a solution. An equation written as M dx+N dy=0M\,\mathrm{d}x+N\,\mathrm{d}y=0 is exact when its coefficients pass a symmetry test identical to the curl-free condition of a conservative field, and then a potential exists.

∂yM=∂xN  ⟺  ∃ Φ: dΦ=M dx+N dy(5)\partial_y M = \partial_x N \;\Longleftrightarrow\; \exists\,\Phi:\ \mathrm{d}\Phi = M\,\mathrm{d}x + N\,\mathrm{d}y \qquad (5)

where: M,NM,N — the coefficient functions of xx and yy; Φ(x,y)\Phi(x,y) — the potential whose level curves are the solutions. Reading it: the mixed second partials of Φ\Phi must agree, so My=NxM_y=N_x is exactly the integrability condition for a potential to exist. Given exactness, the potential is reconstructed by partial integration, and the solutions are simply its contour lines.

Φ(x,y)=∫M dx+∫ ⁣(N−∂y ⁣∫M dx)dy=C(6)\Phi(x,y) = \int M\,\mathrm{d}x + \int\!\left(N - \partial_y\!\int M\,\mathrm{d}x\right)\mathrm{d}y = C \qquad (6)

where: ∫M dx\int M\,\mathrm{d}x — the partial integral taken with yy held fixed; the second integral supplies the purely yy-dependent piece; CC — the constant labelling the level curve. Reading it: build Φ\Phi from MM, then correct it using whatever of NN the first step missed. Finally, two substitutions fold whole further classes back onto the recipes above: the ratio variable v=y/xv=y/x turns a homogeneous equation separable, and the power variable u=y1−nu=y^{1-n} turns a Bernoulli equation linear.

v=yx ⇒ y′=v+xv′;u=y1−n ⇒ u′+(1−n)p u=(1−n)q(7)v=\frac{y}{x}\ \Rightarrow\ y'=v+xv';\qquad u=y^{1-n}\ \Rightarrow\ u'+(1-n)p\,u=(1-n)q \qquad (7)

where: v=y/xv=y/x — the ratio variable reducing y′=F(y/x)y'=F(y/x) to separable form; u=y1−nu=y^{1-n} — the power variable linearising y′+py=qyny'+py=qy^{n} for n≠0,1n\neq0,1. Reading it: recognising the disguise is half the work; once substituted, the equation is a standard type.

Derivation AThe integrating factor as an engineered perfect derivative

The goal is to solve the general linear first-order equation y′+p(x)y=q(x)y'+p(x)y=q(x) in closed form by manufacturing, rather than stumbling upon, a total derivative on its left-hand side. The strategy is deliberate reverse-engineering: we multiply the whole equation by an as-yet-unknown positive function μ(x)\mu(x) and then impose the single condition that forces μy′+μpy\mu y'+\mu p y to be exactly (μy)′(\mu y)'. That condition determines μ\mu, after which the equation integrates in one stroke and every linear problem reduces to two integrals and one division.

Step 1. Write the product rule for the quantity we wish to see, (μy)′=μy′+μ′y(\mu y)'=\mu y'+\mu' y, and compare it with the equation after multiplication by μ\mu, namely μy′+μpy=μq\mu y'+\mu p y=\mu q. The two left sides match if and only if the coefficients of yy agree, that is μ′=pμ\mu'=p\mu. Why: we are not hoping the left side is a derivative — we are choosing μ\mu so that it is, converting a structural wish into one scalar equation for μ\mu.

Step 2. The condition μ′=pμ\mu'=p\mu is itself separable: dμ/μ=p dx\mathrm{d}\mu/\mu=p\,\mathrm{d}x, so ln⁡μ=∫p dx\ln\mu=\int p\,\mathrm{d}x and μ=exp⁡ ⁣∫p dx\mu=\exp\!\int p\,\mathrm{d}x. No constant of integration is needed here because any constant multiple of μ\mu works equally well and cancels later. Why: the integrating factor is fixed only up to an irrelevant scale, which is why the standard formula quietly sets that constant to one.

Step 3. With this μ\mu the equation reads (μy)′=μq(\mu y)'=\mu q. Integrate once to get μy=∫μq dx+C\mu y=\int\mu q\,\mathrm{d}x+C, the only place the arbitrary constant enters, as befits a first-order problem. Why: the entire purpose of μ\mu was to make the left side a bare derivative, so that a single antiderivative finishes the equation.

Step 4. Divide by μ\mu, which is strictly positive and therefore always invertible, to obtain y=μ−1 ⁣[∫μq dx+C]y=\mu^{-1}\!\left[\int\mu q\,\mathrm{d}x+C\right]. The bracket splits transparently into a particular response to the forcing qq and a homogeneous term C/μ=Ce−∫pC/\mu=Ce^{-\int p}. Why: because μ>0\mu>0 everywhere, this last step neither creates nor destroys solutions, which is what makes the formula an equivalence, not merely an implication. *Verified: differentiating y=μ−1[∫μq dx+C]y=\mu^{-1}[\int\mu q\,\mathrm{d}x+C] and using μ′=pμ\mu'=p\mu reproduces y′+py=qy'+py=q identically; the split matches the homogeneous-plus-particular decomposition of Arfken, Weber and Harris and of Riley, Hobson and Bence.*

Go deeper · Derivation B · 1 minSeparation of variables and the equilibria it hides
Derivation BSeparation of variables and the equilibria it hides

The goal is to justify, and to expose the one silent hazard in, the most elementary solution method — separation of variables — for an equation of the product form y′=g(x)h(y)y'=g(x)h(y). The manipulation of "moving dy\mathrm{d}y and dx\mathrm{d}x to opposite sides" looks like symbol-shuffling, so we ground it in the chain rule, and we track exactly which solutions the crucial division by h(y)h(y) discards, because those lost constant solutions are a recurring source of wrong or incomplete answers in physics.

Step 1. Assume h(y)≠0h(y)\neq0 on the arc of interest and divide, giving h(y)−1 y′=g(x)h(y)^{-1}\,y'=g(x). Integrate both sides with respect to xx: the right side is ∫g dx\int g\,\mathrm{d}x, and the left is ∫h(y)−1 (dy/dx) dx\int h(y)^{-1}\,(\mathrm{d}y/\mathrm{d}x)\,\mathrm{d}x. Why: writing the derivative explicitly shows the step is an honest integration in xx, not a mystical splitting of the differential.

Step 2. In the left integral change the integration variable from xx to yy using (dy/dx) dx=dy(\mathrm{d}y/\mathrm{d}x)\,\mathrm{d}x=\mathrm{d}y, so it becomes ∫h(y)−1 dy\int h(y)^{-1}\,\mathrm{d}y. The result is the compact statement ∫dy/h(y)=∫g dx+C\int\mathrm{d}y/h(y)=\int g\,\mathrm{d}x+C, one constant serving both integrals. Why: the change of variable is the rigorous content of "separating the differentials", and it is legitimate precisely while y′y' keeps a fixed sign so the substitution is monotone.

Step 3. Now restore what Step 1 assumed away. Wherever h(y∗)=0h(y_\ast)=0, the constant function y≡y∗y\equiv y_\ast satisfies y′=0=g(x)h(y∗)y'=0=g(x)h(y_\ast) and is a genuine solution — an equilibrium — yet it can never appear in the family generated above because dividing by hh excluded it. Why: these equilibria are often the physically important states (a fully decayed sample, a body at ambient temperature, a population at carrying capacity), so omitting them is not a technicality but a modelling error. *Verified: for y′=y(1−y)y'=y(1-y) the separated family gives y=1/(1+Ae−x)y=1/(1+Ae^{-x}), and direct substitution confirms the two dropped equilibria y≡0y\equiv0 and y≡1y\equiv1 are also solutions; both are recovered as the limits A→∞A\to\infty and A→0A\to0.*

Go deeper · Derivation C · 1 minWhy an exact equation is a hidden potential
Derivation CWhy an exact equation is a hidden potential

The goal is to explain why the innocuous-looking test ∂yM=∂xN\partial_yM=\partial_xN decides whether M dx+N dy=0M\,\mathrm{d}x+N\,\mathrm{d}y=0 can be integrated as the total differential of a single function Φ\Phi, and to turn that existence statement into a constructive recipe for Φ\Phi whose level curves are the solutions. The parallel with conservative force fields is exact: My=NxM_y=N_x is the two-dimensional curl-free condition, and Φ\Phi is the analogue of a scalar potential, so the whole apparatus of path-independence carries over.

Step 1. Suppose a potential Φ\Phi exists with ∂xΦ=M\partial_x\Phi=M and ∂yΦ=N\partial_y\Phi=N. Then dΦ=M dx+N dy=0\mathrm{d}\Phi=M\,\mathrm{d}x+N\,\mathrm{d}y=0 along solutions, so Φ(x,y)=C\Phi(x,y)=C; the solutions are its contour lines. Differentiating the two defining relations gives ∂yM=Φxy\partial_yM=\Phi_{xy} and ∂xN=Φyx\partial_xN=\Phi_{yx}. Why: this exposes the test as nothing but the equality of mixed second partials, which any smooth Φ\Phi automatically obeys.

Step 2. By the symmetry of mixed partials for continuously differentiable functions, Φxy=Φyx\Phi_{xy}=\Phi_{yx}, hence My=NxM_y=N_x is necessary for a potential to exist. On a simply connected region the converse also holds, so the test is decisive both ways. Why: exactness is therefore not a lucky accident but a checkable integrability condition, identical in form to demanding that a planar force field have zero curl.

Step 3. Construct Φ\Phi when the test passes. Integrate MM in xx with yy frozen, Φ=∫M dx+g(y)\Phi=\int M\,\mathrm{d}x+g(y), where gg is an unknown function of yy alone. Fix gg by demanding ∂yΦ=N\partial_y\Phi=N, which gives g′(y)=N−∂y ⁣∫M dxg'(y)=N-\partial_y\!\int M\,\mathrm{d}x; integrating yields equation (6). Why: the free function g(y)g(y) is exactly the freedom left after using MM, and the requirement Φy=N\Phi_y=N consumes it uniquely up to the constant CC. *Verified: for (2xy) dx+(x2+1) dy=0(2xy)\,\mathrm{d}x+(x^2+1)\,\mathrm{d}y=0 the test gives My=2x=NxM_y=2x=N_x, the construction returns Φ=x2y+y\Phi=x^2y+y, and d(x2y+y)=(2xy) dx+(x2+1) dy\mathrm{d}(x^2y+y)=(2xy)\,\mathrm{d}x+(x^2+1)\,\mathrm{d}y exactly, so the solutions are x2y+y=Cx^2y+y=C.*

Limiting cases

Every solvable first-order equation is one of three structural types, and the table below is the decision procedure a physicist runs on sight — recognise the type, read off the recipe, and note the one caveat each carries.

CaseResultMeaning
Separabley′=g(x) h(y) ⇒ ∫dy/h=∫g dx+Cy'=g(x)\,h(y)\ \Rightarrow\ \int\mathrm{d}y/h=\int g\,\mathrm{d}x+CAlways integrable in principle; the roots of hh are equilibrium solutions the division discards and you must restore by inspection.
Lineary′+p(x)y=q(x) ⇒ y=μ−1 ⁣[∫μq dx+C]y'+p(x)y=q(x)\ \Rightarrow\ y=\mu^{-1}\!\left[\int\mu q\,\mathrm{d}x+C\right]Universally solvable by μ=e∫p dx\mu=e^{\int p\,\mathrm{d}x}; one explicit formula, valid wherever p,qp,q are continuous, with no lost solutions.
ExactM dx+N dy=0, My=Nx ⇒ Φ(x,y)=CM\,\mathrm{d}x+N\,\mathrm{d}y=0,\ M_y=N_x\ \Rightarrow\ \Phi(x,y)=CSolution is a level set of a potential; if My≠NxM_y\neq N_x, hunt for an integrating factor that restores exactness.
Autonomousy′=f(y)y'=f(y)Slope field repeats along xx; stable equilibria at zeros of ff with f′<0f'<0, approached exponentially at rate ∣f′∣\lvert f'\rvert.
Homogeneous / Bernoulliy′=F(y/x)y'=F(y/x) or y′+py=qyny'+py=qy^nNot standard until v=y/xv=y/x (separable) or u=y1−nu=y^{1-n} (linear) is substituted; then solve as above.

Worked examples

1 · Newton's law of cooling, fully numerical

A cup of coffee at 90 ∘C90\,^\circ\mathrm{C} is left in a room at Ta=20 ∘CT_a=20\,^\circ\mathrm{C}. After 1010 minutes it has cooled to 60 ∘C60\,^\circ\mathrm{C}. Find the cooling constant, the temperature after 2020 minutes, and when the coffee reaches 40 ∘C40\,^\circ\mathrm{C}.

Step 1. The model is the autonomous linear equation T˙=−k(T−Ta)\dot T=-k(T-T_a), whose solution (Derivation 1 or separation) is T(t)=Ta+(T0−Ta)e−ktT(t)=T_a+(T_0-T_a)e^{-kt}. With Ta=20T_a=20 and T0=90T_0=90 the excess is 70 ∘C70\,^\circ\mathrm{C}, so T(t)=20+70 e−ktT(t)=20+70\,e^{-kt}.

Step 2. Impose the data point T(10)=60T(10)=60: 60=20+70e−10k60=20+70e^{-10k}, hence e−10k=40/70=0.5714e^{-10k}=40/70=0.5714. Taking logs, 10k=−ln⁡0.5714=0.559610k=-\ln0.5714=0.5596, so k=0.0560 min−1\mathbf{k=0.0560\ \text{min}^{-1}} and the time constant is 1/k=17.9 min1/k=\mathbf{17.9\ \text{min}}.

Step 3. For t=20t=20 min note the shortcut e−20k=(e−10k)2=(0.5714)2=0.3265e^{-20k}=(e^{-10k})^2=(0.5714)^2=0.3265, so T(20)=20+70(0.3265)=20+22.9=42.9 ∘CT(20)=20+70(0.3265)=20+22.9=\mathbf{42.9\,^\circ\mathrm{C}}. The excess has fallen by the same factor 0.57140.5714 over each identical 1010-minute interval — the signature of exponential relaxation.

Step 4. Solve T=40T=40: 40=20+70e−kt40=20+70e^{-kt} gives e−kt=20/70=0.2857e^{-kt}=20/70=0.2857, so t=−ln⁡0.2857/k=1.2528/0.0560=22.4 mint=-\ln0.2857/k=1.2528/0.0560=\mathbf{22.4\ \text{min}}. The equilibrium is T→Ta=20 ∘CT\to T_a=20\,^\circ\mathrm{C} as t→∞t\to\infty. k = 0.0560 min⁻¹, T(20) = 42.9 °C, and it hits 40 °C at t = 22.4 min.

2 · A Bernoulli equation linearised

Solve y′+y=x y2y'+y=x\,y^2, a nonlinear equation of Bernoulli type with n=2n=2.

Step 1. Divide by y2y^2 to isolate the Bernoulli structure: y−2y′+y−1=xy^{-2}y'+y^{-1}=x. Substitute u=y1−n=y−1u=y^{1-n}=y^{-1}, so u′=−y−2y′u'=-y^{-2}y', and the equation becomes −u′+u=x-u'+u=x, i.e. the linear equation u′−u=−xu'-u=-x.

Step 2. Here p=−1p=-1, so the integrating factor is μ=e∫(−1) dx=e−x\mu=e^{\int(-1)\,\mathrm{d}x}=e^{-x}. Multiplying through, (ue−x)′=−x e−x(u e^{-x})'=-x\,e^{-x}.

Step 3. Integrate the right side by parts: ∫−x e−x dx=(x+1)e−x+C\int -x\,e^{-x}\,\mathrm{d}x=(x+1)e^{-x}+C. Therefore u e−x=(x+1)e−x+Cu\,e^{-x}=(x+1)e^{-x}+C, giving u=(x+1)+Cexu=(x+1)+C e^{x}.

Step 4. Undo the substitution with y=1/uy=1/u:   y(x)=1(x+1)+Cex\;y(x)=\dfrac{1}{(x+1)+Ce^{x}}. Direct differentiation confirms y′+y−xy2=0y'+y-xy^2=0 for every CC. The substitution u = 1/y turned a nonlinear equation into a one-line linear solve, y = 1 / [(x + 1) + Ce^x].

3 · Charging an RC circuit

A 100 μF100\ \mu\mathrm{F} capacitor charges through a 1 kΩ1\ \mathrm{k}\Omega resistor from a 10 V10\ \mathrm{V} battery, starting empty. Find the charge and current versus time and the time to reach 90%90\% of full charge.

Step 1. Kirchhoff's voltage law gives the linear equation Rq˙+q/C=VR\dot q+q/C=V, i.e. q˙+q/(RC)=V/R\dot q+q/(RC)=V/R. The integrating factor is μ=et/RC\mu=e^{t/RC}, and the general solution is q(t)=CV+Ke−t/RCq(t)=CV+Ke^{-t/RC}; the initial condition q(0)=0q(0)=0 fixes K=−CVK=-CV, so q(t)=CV (1−e−t/RC)q(t)=CV\,(1-e^{-t/RC}).

Step 2. Insert numbers: the time constant is τ=RC=(1000)(100×10−6)=0.10 s\tau=RC=(1000)(100\times10^{-6})=\mathbf{0.10\ \mathrm{s}}, and the full charge is q∞=CV=(100×10−6)(10)=1.0 mCq_\infty=CV=(100\times10^{-6})(10)=\mathbf{1.0\ \mathrm{mC}}. Thus q(t)=1.0 mC (1−e−t/0.10 s)q(t)=1.0\,\mathrm{mC}\,(1-e^{-t/0.10\,\mathrm{s}}).

Step 3. The current is i=q˙=(V/R)e−t/RCi=\dot q=(V/R)e^{-t/RC}, starting at i(0)=V/R=10/1000=10 mAi(0)=V/R=10/1000=\mathbf{10\ \mathrm{mA}} and decaying with the same τ\tau. After one time constant, q(τ)=1.0 mC (1−e−1)=0.63 mCq(\tau)=1.0\,\mathrm{mC}\,(1-e^{-1})=\mathbf{0.63\ \mathrm{mC}}.

Step 4. Reach 90%90\%: set 1−e−t/τ=0.91-e^{-t/\tau}=0.9, so e−t/τ=0.1e^{-t/\tau}=0.1 and t=τln⁡10=0.10×2.303=0.23 st=\tau\ln10=0.10\times2.303=\mathbf{0.23\ \mathrm{s}} — the coefficient RCRC alone sets every timescale. τ = 0.10 s, q∞ = 1.0 mC, i(0) = 10 mA, and 90% charge is reached at t = 0.23 s.

Physics of the portrait

First-order differential equations were the crucible in which the calculus proved it could describe motion, growth, and decay — and the figure who forged the general tools from scattered tricks was Leonhard Euler.

Origins · 1 minLeonhard Euler and how this was discovered
LE
Leonhard Euler
1707–1783 · integrating factors, exact equations, and the calculus of differential equations

When Euler began, the solution of differential equations was a bag of isolated tricks. Leibniz had coined the term aequatio differentialis and, with the Bernoulli brothers, had solved separable, homogeneous, and the first linear equations by an integrating factor in the 1690s; Jacob Bernoulli's 1695 challenge equation y′+py=qyny'+py=qy^n was reduced to linear form within a year. But there was no theory — only examples. Euler changed that. Working alongside Alexis Clairaut in the 1730s, he identified the exactness condition ∂yM=∂xN\partial_yM=\partial_xN as the criterion for an equation of differentials to be integrable as a total differential, and understood the integrating factor as a general instrument for restoring that condition rather than a lucky guess. In his monumental Institutiones calculi integralis (1768–70) he organised the whole first-order landscape — separable, linear, exact, homogeneous, Bernoulli — into the classification still taught today. He also began the numerical side with his polygonal method, the ancestor of every step-by-step ODE solver. The rigorous existence-and-uniqueness capstone came later, from Cauchy, Lipschitz, and Picard, but the architecture of the subject — that a differential equation belongs to a type, and each type to a method — is Euler's.

History
1676
— Leibniz coins the term aequatio differentialis for an equation in differentials
1694
— the linear equation y′ + p y = q is solved by an integrating factor
1739
— Clairaut and Euler state the exactness condition ∂M/∂y = ∂N/∂x
1768
— Euler systematizes the first-order methods in Institutiones calculi integralis
1890
— Picard proves existence and uniqueness by successive approximations

Going further

Texts. Stone and Goldbart, Mathematics for Physics, Ch. 1 · Arfken, Weber and Harris, Mathematical Methods for Physicists, 7th ed., Ch. 7 · Hassani, Mathematical Physics, Ch. on ODEs · Riley, Hobson and Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 14 · Boyce and DiPrima, Elementary Differential Equations, Ch. 2 · Byron and Fuller, Mathematics of Classical and Quantum Physics, Ch. 6.

Provenance. Every formula here is a standard textbook result, re-verified for this article. A checker should confirm: (1) the integrating-factor solution by testing μ′=pμ\mu'=p\mu and differentiating equation (4) back to y′+py=qy'+py=q; (2) the exactness construction on (2xy) dx+(x2+1) dy=0(2xy)\,\mathrm{d}x+(x^2+1)\,\mathrm{d}y=0, yielding Φ=x2y+y\Phi=x^2y+y; (3) the cooling numbers k=0.0560 min−1k=0.0560\ \text{min}^{-1}, T(20)=42.9 ∘CT(20)=42.9\,^\circ\mathrm{C}, t(40 ∘C)=22.4t(40\,^\circ\mathrm{C})=22.4 min; (4) the Bernoulli solution y=1/[(x+1)+Cex]y=1/[(x+1)+Ce^x] by direct substitution; (5) the RC results τ=0.10\tau=0.10 s, q∞=1.0q_\infty=1.0 mC, i(0)=10i(0)=10 mA, t90%=0.23t_{90\%}=0.23 s; and (6) the decay half-life t1/2=ln⁡2/λt_{1/2}=\ln2/\lambda. Sources: Stone and Goldbart Ch. 1; Arfken–Weber–Harris Ch. 7; Riley–Hobson–Bence Ch. 14; Boyce and DiPrima Ch. 2.

Builds on: Integration techniques · Partial derivatives. Leads to: Integrating Factors and Exact Equations · Existence and Uniqueness Theorems · Linear Second-Order ODEs · Reduction of Order.

Ask the tutor: Hand me any first-order equation and I will name its type, walk the matching recipe step by step, and check the equilibria and initial condition with you.

How do I decide which method an equation needs?

Put the equation in normal form first, then run three quick checks in order. Does the right side factor as a function of xx times a function of yy? If so it is separable — integrate each side. If not, is it linear, with yy and y′y' only to the first power and no products? Then use the integrating factor μ=e∫p dx\mu=e^{\int p\,\mathrm{d}x}. If neither, but it is written M dx+N dy=0M\,\mathrm{d}x+N\,\mathrm{d}y=0, test whether My=NxM_y=N_x; if so it is exact. Only if all three fail do you reach for a substitution — v=y/xv=y/x for homogeneous, u=y1−nu=y^{1-n} for Bernoulli — which converts it back into one of the first three.

Why does a first-order equation have exactly one arbitrary constant?

Because solving it takes exactly one integration, and each integration introduces one constant. Geometrically, the equation y′=f(x,y)y'=f(x,y) prescribes a slope at every point, so the solution curves form a one-parameter family that fills the plane, one curve through each point where ff is well behaved. Choosing which curve you are on requires one piece of data — a single initial condition y(x0)=y0y(x_0)=y_0 — which selects one value of the constant. This is the pattern that generalises: an nnth-order equation needs nn integrations, carries nn arbitrary constants, and requires nn initial conditions to pin down a unique solution.

What exactly does the integrating factor do?

It rescales the equation so that its left-hand side becomes the exact derivative of a single product. In the linear equation y′+py=qy'+py=q, the combination y′+pyy'+py is not itself the derivative of anything simple, but after you multiply by μ=e∫p dx\mu=e^{\int p\,\mathrm{d}x} it becomes precisely (μy)′(\mu y)'. That is the whole trick: you have engineered a perfect derivative, so integrating once collapses the differential equation into an algebraic one. The factor is chosen by demanding μ′=pμ\mu'=p\mu, which is exactly the condition that makes the product rule reproduce the left side. Because μ\mu is an exponential it is never zero, so the final division to isolate yy is always safe.

How is exactness related to conservative force fields?

They are the same condition in different clothing. An equation M dx+N dy=0M\,\mathrm{d}x+N\,\mathrm{d}y=0 is exact when ∂yM=∂xN\partial_yM=\partial_xN, and that is precisely the statement that the planar vector field (M,N)(M,N) has zero curl. A curl-free field on a simply connected region is the gradient of a scalar potential, and here that potential is the function Φ\Phi with Φx=M\Phi_x=M, Φy=N\Phi_y=N. The solution curves are the level sets Φ=C\Phi=C, exactly as the trajectories of a conservative mechanical system lie on surfaces of constant energy. So checking exactness is checking integrability, and the same path-independence that underlies potential energy is what lets you reconstruct Φ\Phi by integrating MM and then correcting with NN.

When are we guaranteed that a unique solution exists?

The existence-and-uniqueness theorem answers this. If f(x,y)f(x,y) and its partial derivative ∂f/∂y\partial f/\partial y are both continuous in a rectangle around the initial point (x0,y0)(x_0,y_0), then there is an interval around x0x_0 on which exactly one solution of y′=f(x,y)y'=f(x,y) with y(x0)=y0y(x_0)=y_0 exists. Continuity of ff alone (Peano's theorem) guarantees existence but not uniqueness; the extra Lipschitz-type control from ∂f/∂y\partial f/\partial y is what forbids two solution curves from crossing the same point. This is why y′=y2/3y'=y^{2/3} with y(0)=0y(0)=0 has infinitely many solutions — its right side is not Lipschitz at the origin — while every well-posed physics problem, where ff is smooth, has a single deterministic trajectory.

Can a nonlinear first-order equation still be solved in closed form?

Sometimes, and the tell is whether a substitution or an integrating factor reduces it to a standard type. The logistic equation P˙=rP(1−P/K)\dot P=rP(1-P/K) is nonlinear yet separable, giving the closed-form S-curve P=K/(1+Ae−rt)P=K/(1+Ae^{-rt}). A Bernoulli equation becomes linear under u=y1−nu=y^{1-n}; a Riccati equation y′=a+by+cy2y'=a+by+cy^2 linearises to second order once one particular solution is known. But these are the lucky exceptions: the generic nonlinear first-order equation has no elementary closed form, which is why the numerical solvers above, and the qualitative theory of equilibria and stability, exist.

Where this leads