In short
An ordinary differential equation (ODE) is an equation relating a function of one independent variable to its derivatives — for example dy/dx + 2y = e−x. Solving it means finding the family of functions that satisfy it (general solution, with arbitrary constants) and then fixing the constants from initial or boundary conditions. ODEs are the language of every rate-of-change model: circuits, cooling, population growth, radioactive decay, beam deflection, chemical kinetics, loan balances. In Indian B.Sc/CBCS syllabi this is a full paper, and in GATE (MA, and the engineering papers), CSIR-UGC NET, IIT JAM, ISI/CMI entrances and campus aptitude-plus-maths rounds (analytics firms, ISRO/DRDO, quant roles, simulation and CAE teams) it is a guaranteed-marks area.
Explained
Basic definitions and classification
- ODE vs PDE: an ODE has derivatives with respect to a single independent variable; several independent variables make it a partial differential equation (covered elsewhere).
- Order: order of the highest derivative. Degree: power of the highest-order derivative *after* the equation is made free of radicals and fractions in the derivatives. y″ = √(1 + y′) → squaring gives (y″)² = 1 + y′: order 2, degree 2.
- Linear ODE: y and all its derivatives appear to the first power, with no products among them; coefficients may depend on x. a₀(x)yⁿ + … + aₙ(x)y = f(x). Otherwise non-linear (y y′, sin y, (y′)² are non-linear terms).
- Homogeneous (in the linear sense): f(x) = 0; non-homogeneous otherwise. Note the *other* use of "homogeneous" for first-order equations where M and N have the same total degree — two different meanings, often confused in exams.
- Solution types: general solution (n arbitrary constants for an nth-order equation), particular solution (constants fixed by conditions), singular solution (satisfies the ODE but is not obtainable from the general solution by any choice of constants — the envelope, e.g. in Clairaut's equation).
- IVP vs BVP: initial-value problem gives all conditions at one point (y(0), y′(0)); boundary-value problem gives them at two points (y(0), y(L)) — beam and heat-fin problems.
- Existence and uniqueness (Picard–Lindelöf): if f(x, y) is continuous in a rectangle around (x₀, y₀) and satisfies a Lipschitz condition in y (|∂f/∂y| bounded suffices), the IVP y′ = f(x, y), y(x₀) = y₀ has a unique solution in some interval about x₀. Continuity alone (Peano) gives existence but not uniqueness: y′ = y2/3, y(0) = 0 has both y ≡ 0 and y = x³/27.
- Formation of an ODE: eliminate the arbitrary constants of a family by differentiating as many times as there are constants — the basis of orthogonal-trajectory and geometric problems.
First-order first-degree equations — the five standard methods
- Variable separable: write as g(y)dy = h(x)dx and integrate both sides. Always try this first.
- Homogeneous: dy/dx = F(y/x) (M, N of equal degree). Put y = vx, dy/dx = v + x dv/dx; it becomes separable in v and x. For the near-homogeneous form (a₁x + b₁y + c₁)/(a₂x + b₂y + c₂), shift the origin x = X + h, y = Y + k to kill the constants; if a₁/a₂ = b₁/b₂, substitute t = a₁x + b₁y.
- Linear: dy/dx + P(x)y = Q(x). Multiply by the integrating factor IF = e∫P dx; the left side becomes d(y·IF)/dx, so y·IF = ∫Q·IF dx + C. If x appears as the dependent variable instead (dx/dy + P(y)x = Q(y)), use IF = e∫P dy.
- Bernoulli: dy/dx + Py = Qyⁿ. Divide by yⁿ and put v = y1−n → linear in v. Equations like f′(y) dy/dx + P f(y) = Q reduce similarly with v = f(y) ⟹ dv/dx + Pv = Q.
- Exact: M dx + N dy = 0 is exact iff ∂M/∂y = ∂N/∂x; then the solution is ∫M dx (treating y constant) + (terms of N free of x) integrated dy = C. If not exact, find an integrating factor: by inspection, or μ = 1/(Mx + Ny) for homogeneous M, N, or from the rules (1/N)(∂M/∂y − ∂N/∂x) = f(x) → μ = e∫f dx, and (1/M)(∂N/∂x − ∂M/∂y) = g(y) → μ = e∫g dy.
- Equations solvable for p = dy/dx: solvable for p (factorise and solve each factor), solvable for y, solvable for x, and Clairaut's form y = px + f(p) whose general solution is y = cx + f(c) with a singular solution from eliminating p between y = px + f(p) and x + f′(p) = 0.
- Orthogonal trajectories: form the ODE of the family, replace dy/dx by −dx/dy, solve again. Used for field lines versus equipotentials.
Higher-order linear ODEs with constant coefficients
- Write the equation as f(D)y = X with D ≡ d/dx. General solution = CF + PI.
- Complementary function: solve the auxiliary equation f(m) = 0.
| Roots of f(m) = 0 | Contribution to CF |
|---|---|
| Real, distinct m₁, m₂ | c₁em₁x + c₂em₂x |
| Real, repeated r times (m) | (c₁ + c₂x + … + c_r xr−1)emx |
| Complex α ± iβ | eαx(c₁cos βx + c₂sin βx) |
| Repeated complex α ± iβ (twice) | eαx[(c₁ + c₂x)cos βx + (c₃ + c₄x)sin βx] |
- Particular integral by inverse operators:
- X = eax: PI = eax/f(a), provided f(a) ≠ 0; if f(a) = 0, multiply by x and differentiate the denominator — PI = x eax/f′(a), repeating for higher multiplicity.
- X = sin ax or cos ax: replace D² by −a² in f(D); if that makes the denominator zero (resonance), use the x-multiplication rule.
- X = xᵐ: expand 1/f(D) in ascending powers of D by binomial series and operate on xᵐ.
- X = eaxV(x): shift rule PI = eax·[1/f(D + a)]V.
- X = x·V(x): PI = [x − f′(D)/f(D)]·(1/f(D))V.
- Method of undetermined coefficients: assume a trial PI of the same form as X with unknown constants (multiply by xs if it clashes with the CF) and match coefficients — the version used in engineering courses.
- Variation of parameters (works for any X, including sec x, log x, tan x): for y″ + Py′ + Qy = X with CF = c₁y₁ + c₂y₂, PI = −y₁∫(y₂X/W)dx + y₂∫(y₁X/W)dx, where W = y₁y₂′ − y₂y₁′ is the Wronskian.
- Wronskian: W ≠ 0 on an interval ⟹ the solutions are linearly independent; for y″ + Py′ + Qy = 0, Abel's formula gives W = C e−∫P dx, so W is either never zero or identically zero.
- Reduction of order: if one solution y₁ is known, put y = y₁u to get a first-order equation in u′.
Variable-coefficient equations with closed-form methods
- Cauchy–Euler (homogeneous linear): xⁿyⁿ + … Put x = ez (z = ln x), so xD_x → θ = d/dz, x²D_x² → θ(θ − 1), x³D_x³ → θ(θ−1)(θ−2); the equation becomes constant-coefficient in z. Equivalently try y = xm directly.
- Legendre's linear equation: (ax + b)ⁿyⁿ + … → substitute ax + b = ez.
- Exact second-order and equations reducible by substitution: removal of the first-derivative term (normal form y″ + Iy = 0 via y = u·e−½∫P dx), change of independent variable, and the case where y is absent (put y′ = p) or x is absent (put y′ = p, y″ = p dp/dy).
- Simultaneous linear ODEs: eliminate one variable using operators, or use matrix form dX/dt = AX whose solution uses eigenvalues and eigenvectors of A — node, saddle, centre and spiral phase portraits follow from the eigenvalue signs.
Series solutions and special functions
- Ordinary and singular points: for y″ + P(x)y′ + Q(x)y = 0, x₀ is ordinary if P and Q are analytic there; a singular point is regular if (x − x₀)P and (x − x₀)²Q are analytic, else irregular.
- Power series method about an ordinary point: assume y = Σaₙ(x − x₀)ⁿ, substitute, equate coefficients, get a recurrence relation for aₙ.
- Frobenius method about a regular singular point: y = xr Σaₙxⁿ; the indicial equation gives r. Three cases: roots distinct and not differing by an integer (two independent series); equal roots (second solution contains ln x); roots differing by an integer (second solution may need ln x).
- Bessel's equation x²y″ + xy′ + (x² − n²)y = 0 → J_n(x), Y_n(x); used for vibrations of circular membranes, heat flow in cylinders, waveguides.
- Legendre's equation (1 − x²)y″ − 2xy′ + n(n + 1)y = 0 → Legendre polynomials P_n(x), orthogonal on [−1, 1]; P₀ = 1, P₁ = x, P₂ = (3x² − 1)/2.
- Sturm–Liouville / eigenvalue problems: (p y′)′ + (q + λr)y = 0 with boundary conditions gives discrete eigenvalues and orthogonal eigenfunctions — the bridge to Fourier methods.
Laplace transform method and numerical solution
- Laplace transforms convert a linear constant-coefficient IVP into algebra: L{y′} = sY − y(0), L{y″} = s²Y − s y(0) − y′(0). Solve for Y(s), then invert by partial fractions, shifting theorems and convolution. It is the preferred method when the forcing is discontinuous or impulsive (unit step u(t − a), Dirac δ(t − a)) — switching circuits, control systems.
- Numerical methods (when no closed form exists):
- Euler: y_(i+1) = y_i + h f(x_i, y_i) — first-order accurate, error O(h).
- Modified Euler / Heun (RK2): average the slopes at the start and the predicted end point.
- Runge–Kutta 4th order: four slope evaluations per step, error O(h⁴) — the workhorse in MATLAB/SciPy/Scilab.
- Taylor series, Picard's iteration (successive approximation, also the proof device for uniqueness), predictor–corrector (Milne, Adams–Bashforth–Moulton) for multi-step marching.
- Stiff systems (widely separated time constants — chemical kinetics, circuits) need implicit solvers (backward Euler, BDF/ode15s); an explicit method needs impossibly small h.
- Advantages and limits: analytical solutions give exact behaviour and parameter dependence but exist only for special forms; numerical methods handle anything but give numbers at discrete points, with truncation and round-off error and possible instability if h is too large.
Modelling — how ODEs arise
- Growth and decay: dN/dt = kN → N = N₀ekt; radioactive half-life, compound interest, bacterial growth.
- Logistic growth: dN/dt = rN(1 − N/K) — population and market-saturation models.
- Newton's law of cooling: dθ/dt = −k(θ − θₐ) — forensic and food-processing estimates.
- Electrical circuits: L di/dt + Ri = E(t); RC: R dq/dt + q/C = E(t).
- Mechanical vibration: m x″ + c x′ + kx = F(t) — damping cases from the discriminant: over-damped (c² > 4mk), critically damped (=), under-damped (<).
- Mixing tanks, beam deflection EI d²y/dx² = M(x), pharmacokinetics, SIR epidemic models (a system of three ODEs).
Key points
- Order - highest derivative; degree - power of that derivative after clearing radicals/fractions.
- Linear - no powers or products of y and its derivatives; superposition applies only to linear equations.
- General solution - has as many arbitrary constants as the order; an nth-order ODE needs n conditions.
- Integrating factor - e∫P dx for dy/dx + Py = Q; turns the left side into an exact derivative.
- Exactness test - M dx + N dy = 0 is exact iff ∂M/∂y = ∂N/∂x.
- Bernoulli - substitute v = y1−n to linearise.
- Homogeneous first-order - substitute y = vx.
- CF + PI - total solution of f(D)y = X; CF from the auxiliary equation, PI from the right side.
- Repeated root - multiply by x; complex root pair α ± iβ gives eαx(A cos βx + B sin βx).
- Resonance - f(a) = 0 for eax, or D² → −a² zeroing the denominator for sin/cos; apply the x-multiplication rule.
- Variation of parameters - universal PI method using the Wronskian W = y₁y₂′ − y₂y₁′.
- Wronskian ≠ 0 - solutions linearly independent (Abel: W = Ce−∫P dx).
- Cauchy–Euler - x = ez, or trial y = xm.
- Clairaut's equation y = px + f(p) - general solution y = cx + f(c) plus a singular (envelope) solution.
- Picard–Lindelöf - continuity plus a Lipschitz condition in y gives local existence *and* uniqueness.
- Frobenius - series about a regular singular point; indicial equation fixes the exponent r.
- Euler error O(h), RK4 error O(h⁴) - halving h cuts Euler error by 2 and RK4 error by 16.
- Orthogonal trajectories - replace dy/dx by −dx/dy in the family's ODE.
Formulas and examples
Bernoulli: dy/dx + Py = Qyⁿ; put v = y1−n ⟹ dv/dx + (1−n)Pv = (1−n)Q
Exact: M dx + N dy = 0 exact ⟺ ∂M/∂y = ∂N/∂x; solution ∫M dx + ∫(N terms free of x) dy = C
Operator PI: 1/f(D) eax = eax/f(a), f(a) ≠ 0; 1/f(D) sin ax: put D² = −a²; 1/f(D) eaxV = eax·1/f(D+a) V
Variation of parameters: y_p = −y₁∫(y₂X/W)dx + y₂∫(y₁X/W)dx, W = y₁y₂′ − y₂y₁′
Cauchy–Euler: x = ez, xD → θ, x²D² → θ(θ−1), x³D³ → θ(θ−1)(θ−2)
Laplace: L{y′} = sY − y(0); L{y″} = s²Y − s·y(0) − y′(0)
Euler: y_(i+1) = y_i + h f(x_i, y_i)
RK4: y_(i+1) = y_i + (h/6)(k₁ + 2k₂ + 2k₃ + k₄), k₁ = f(x_i, y_i), k₂ = f(x_i + h/2, y_i + hk₁/2), k₃ = f(x_i + h/2, y_i + hk₂/2), k₄ = f(x_i + h, y_i + hk₃)
Decay/growth: dN/dt = kN ⟹ N = N₀ekt; half-life t½ = ln2/|k|
Symbols: x or t independent variable (units as per the model — s for time), y or N dependent variable, h step size (same units as x), D = d/dx, W Wronskian, L inductance (H), R resistance (Ω), i current (A), E emf (V).
Example 1 — linear first order (IVP). Solve dy/dx + 2y = e−x, y(0) = 3.
- P = 2 ⟹ IF = e2x. Then d(y e2x)/dx = e−x·e2x = ex.
- Integrate: y e2x = ex + C ⟹ y = e−x + C e−2x.
- y(0) = 1 + C = 3 ⟹ C = 2. y = e−x + 2e−2x.
Example 2 — CF + PI, and the resonance case. (a) y″ − 3y′ + 2y = e3x. Auxiliary m² − 3m + 2 = 0 ⟹ m = 1, 2 ⟹ CF = c₁ex + c₂e2x. PI = e3x/(9 − 9 + 2) = e3x/2. y = c₁ex + c₂e2x + e3x/2. (b) y″ + 4y = sin 2x. CF = c₁cos 2x + c₂sin 2x. Putting D² = −4 gives 0, so use the x-rule: PI = x·(1/2D)sin 2x = (x/2)(−cos 2x/2) = −(x cos 2x)/4. Verify: y_p′ = −cos2x/4 + (x sin2x)/2; y_p″ = sin2x/2 + sin2x/2 + x cos2x = sin 2x + x cos 2x; so y_p″ + 4y_p = sin 2x ✓. y = c₁cos 2x + c₂sin 2x − (x cos 2x)/4 — the amplitude grows with x: resonance.
Example 3 — exact equation and Bernoulli. (a) (2xy + y²)dx + (x² + 2xy)dy = 0. ∂M/∂y = 2x + 2y = ∂N/∂x ⟹ exact. ∫M dx = x²y + xy²; N has no term free of x. x²y + xy² = C. (b) dy/dx + y/x = y². Divide by y²: y−2y′ + (1/x)y−1 = 1. With v = y−1, v′ = −y−2y′: −v′ + v/x = 1 ⟹ v′ − v/x = −1. IF = 1/x ⟹ (v/x)′ = −1/x ⟹ v/x = −ln x + C. y = 1/[x(C − ln x)].
Example 4 — Cauchy–Euler and Laplace. (a) x²y″ − 3xy′ + 4y = 0. Try y = xm: m(m − 1) − 3m + 4 = m² − 4m + 4 = (m − 2)² ⟹ repeated root 2. y = (c₁ + c₂ ln x)x². (b) y″ + 4y′ + 3y = 0, y(0) = 1, y′(0) = 1. Transform: s²Y − s − 1 + 4(sY − 1) + 3Y = 0 ⟹ Y(s² + 4s + 3) = s + 5 ⟹ Y = (s + 5)/[(s + 1)(s + 3)] = 2/(s + 1) − 1/(s + 3). y = 2e−t − e−3t (checks: y(0) = 1, y′(0) = −2 + 3 = 1 ✓).
Example 5 — RL circuit with real numbers. A 12 V DC supply feeds R = 10 Ω in series with L = 0.5 H, switch closed at t = 0 with i(0) = 0.
- 0.5 di/dt + 10i = 12 ⟹ di/dt + 20i = 24. IF = e20t ⟹ i e20t = 1.2 e20t + C ⟹ i = 1.2 + C e−20t.
- i(0) = 0 ⟹ C = −1.2 ⟹ i(t) = 1.2(1 − e−20t) A; time constant τ = L/R = 0.05 s; steady state 1.2 A.
- At t = τ = 0.05 s: i = 1.2(1 − e−1) = 1.2 × 0.63212 = 0.7585 A (63.2% of final, as expected).
Example 6 — Euler versus RK4. dy/dx = x + y, y(0) = 1; find y(0.2). Exact solution y = 2ex − x − 1 ⟹ y(0.2) = 2(1.2214028) − 1.2 = 1.2428056.
- Euler, h = 0.1: y₁ = 1 + 0.1(0 + 1) = 1.1; y₂ = 1.1 + 0.1(0.1 + 1.1) = 1.22 (error 0.0228).
- RK4, one step h = 0.2: k₁ = 1; k₂ = f(0.1, 1.1) = 1.2; k₃ = f(0.1, 1 + 0.1×1.2 = 1.12) = 1.22; k₄ = f(0.2, 1 + 0.2×1.22 = 1.244) = 1.444. y₁ = 1 + (0.2/6)(1 + 2.4 + 2.44 + 1.444) = 1 + 0.0333333 × 7.284 = 1.24280 (error ≈ 6 × 10⁻⁶).
| First-order form | Test / signature | Method |
|---|---|---|
| g(y)dy = h(x)dx | separates | integrate both sides |
| dy/dx = F(y/x) | M, N same degree | y = vx |
| y′ + Py = Q | linear in y | IF = e∫P dx |
| y′ + Py = Qyⁿ | power of y on RHS | v = y1−n |
| M dx + N dy = 0 | ∂M/∂y = ∂N/∂x | exact-equation formula |
| not exact | ratio rules | find integrating factor μ |
| Method for PI | Works for | Effort |
|---|---|---|
| Inverse operator 1/f(D) | eax, sin/cos, xᵐ, eaxV | fastest, needs the rules |
| Undetermined coefficients | same families | algebraic, safe |
| Variation of parameters | any X (sec x, ln x, tan x) | two integrals, uses W |
| Laplace transform | constant coefficients + IVP, step/impulse inputs | partial fractions |
Where it is used
- Electrical and electronics: RL, RC, RLC transients and control-system step responses — modelled as ODEs and solved by Laplace transforms; core to BEL, BHEL, L&T, Siemens India design and to power-system stability studies.
- Mechanical and civil design: vibration of machine foundations and vehicle suspensions (m x″ + c x′ + kx = F), beam deflection equations behind design checks in IS 800 (steel) and IS 456 (RC) practice, heat-exchanger and fin temperature profiles.
- Chemical and pharmaceutical: batch and CSTR reactor kinetics, drug dosage and clearance curves (pharmacokinetics) at Indian formulation companies; stiff-ODE solvers in Aspen/COMSOL-type simulation work.
- Aerospace and defence: ISRO/DRDO trajectory, orbit and attitude-dynamics simulation; everything runs through numerical integration of ODE systems.
- Data science, actuarial and finance roles: compartmental epidemic models (SIR) used in Indian public-health analyses, loan amortisation and continuous-compounding models, system dynamics for demand forecasting.
- Academic and exam use: full units in B.Sc/B.Tech mathematics under UGC CBCS and the AICTE model curriculum, and standing sections in GATE (MA/ME/EE/CE/CH), IIT JAM, CSIR-UGC NET and state PSC technical papers.
Interview questions
- Q: What is the difference between the order and the degree of a differential equation? A: Order is the highest derivative present; degree is the power of that highest derivative once the equation is polynomial in the derivatives (free of radicals and fractions).
- Q: How do you know an ODE is linear, and why does it matter? A: y and all its derivatives occur only to the first power with no products among them; linearity allows superposition, so the general solution is CF + PI.
- Q: What does the integrating factor actually do? A: Multiplying by e∫P dx makes the left side the exact derivative d(y·IF)/dx, so a single integration gives the solution.
- Q: How many arbitrary constants does the general solution have, and why? A: As many as the order — each integration introduces one constant, and n conditions are needed to pin them down.
- Q: State the condition for exactness and what it means geometrically. A: ∂M/∂y = ∂N/∂x; it means M dx + N dy is the total differential of some function u(x, y), so the solution curves are u = C.
- Q: When does the standard inverse-operator PI rule fail and what do you do? A: When f(a) = 0 for eax (or D² = −a² zeroes the denominator for sin/cos) — the forcing matches a CF term; multiply by x and differentiate the denominator, which is resonance.
- Q: Why prefer variation of parameters over undetermined coefficients? A: It works for any right-hand side, including sec x, tan x and ln x, where no finite trial form exists.
- Q: What is the Wronskian used for? A: To test linear independence of solutions and to build the particular integral in variation of parameters; by Abel's formula it is either never zero or identically zero on an interval.
- Q: Give an IVP with more than one solution. A: y′ = y2/3, y(0) = 0 has y ≡ 0 and y = x³/27 — f is continuous but not Lipschitz in y at 0, so uniqueness fails.
- Q: Why is RK4 preferred over Euler in practice? A: Its local error is O(h⁵) per step (global O(h⁴)) against Euler's O(h), so it gives far better accuracy for the same step size at the cost of four function evaluations.
- Q: What is a stiff ODE and how is it solved? A: One with widely separated decay rates, forcing an explicit method into tiny steps for stability; implicit solvers like backward Euler or BDF handle it.
- Q: What is a singular solution? A: A solution not obtainable from the general solution for any value of the constants — typically the envelope of the family, as in Clairaut's equation.
- Q: How do you find orthogonal trajectories? A: Form the family's ODE, replace dy/dx by −dx/dy, and solve the new equation.
Common mistakes
- Finding the degree before clearing radicals and fractional powers of the derivatives.
- Confusing the two senses of "homogeneous": f(x) = 0 in a linear equation versus equal-degree M and N in a first-order equation.
- Omitting the constant of integration, or adding it inside the exponent of the integrating factor instead of after integrating.
- Applying 1/f(a) when f(a) = 0 — missing the resonance case and losing the x-multiplied term.
- Forgetting to multiply by x (or x²) for repeated roots in the CF, so the two solutions are not independent.
- In the exact-equation shortcut, integrating the whole of N dy instead of only the terms free of x, which double-counts terms.
- Ignoring the initial conditions in the Laplace transform of y″ (s²Y − s y(0) − y′(0)) and getting the wrong partial fractions.
- Using too large a step in Euler/RK and reporting the numbers without an error check against a halved step.
- Treating a general solution as covering every solution — singular solutions and non-uniqueness cases are missed.
Related topics
Partial differential equations basics · Laplace transforms and inverse transforms · Numerical methods: interpolation and numerical integration · Linear algebra: eigenvalues and eigenvectors · Fourier series and Sturm–Liouville problems · Vector calculus and integral theorems