Knowledge / Mathematics / Ordinary differential equations

Ordinary differential equations

Mathematics (B.Sc) · Differential equations · free study notes for exams, placements and interviews

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

First-order first-degree equations — the five standard methods

  1. Variable separable: write as g(y)dy = h(x)dx and integrate both sides. Always try this first.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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

Roots of f(m) = 0Contribution 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]

Variable-coefficient equations with closed-form methods

Series solutions and special functions

Laplace transform method and numerical solution

Modelling — how ODEs arise

Key points

Formulas and examples

Linear first order: dy/dx + P(x)y = Q(x); IF = e∫P dx; y·IF = ∫Q·IF dx + C
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.

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.

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.

First-order formTest / signatureMethod
g(y)dy = h(x)dxseparatesintegrate both sides
dy/dx = F(y/x)M, N same degreey = vx
y′ + Py = Qlinear in yIF = e∫P dx
y′ + Py = Qyⁿpower of y on RHSv = y1−n
M dx + N dy = 0∂M/∂y = ∂N/∂xexact-equation formula
not exactratio rulesfind integrating factor μ
Method for PIWorks forEffort
Inverse operator 1/f(D)eax, sin/cos, xᵐ, eaxVfastest, needs the rules
Undetermined coefficientssame familiesalgebraic, safe
Variation of parametersany X (sec x, ln x, tan x)two integrals, uses W
Laplace transformconstant coefficients + IVP, step/impulse inputspartial fractions

Where it is used

Interview questions

Common mistakes

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

Open in the Knowledge reader →Find jobs →