Home / Learn / Exam prep / IIT JAM Physics / Lesson 1.7
All lessons

Module 1: Mathematical methods · Lesson 1.7 · about 45 min

First and second order differential equations

Separable, linear and exact first-order equations, constant-coefficient second-order equations with damping and forcing, resonance and Euler-Cauchy equations: the methods, the physics behind them and the traps JAM sets.

Key points, meanings and formulas on one page: choose "Save as PDF" in the print box.

Module 1 · about 45 minutes. By the end you will be able to recognise which kind of equation you are facing, solve the four first-order types and every constant-coefficient second-order equation JAM can set, read off damping and resonance at a glance, and avoid the classic slips with repeated roots and particular solutions.

A differential equation is a rule for how something changes. Physics is full of them, and almost all exam ones are solved by one trick: guess an exponential, and let the equation tell you its exponent.

1. What kind of equation is it?

A differential equation links a function y(x) with its derivatives. Three labels decide the method:

  • Order: the highest derivative present. y′′+y=0 is second order.
  • Degree: the power of that highest derivative (once there are no fractional powers). (y′′)3+(y′)4=y has order 2 and degree 3; the power 4 on a lower derivative does not count.
  • Linear or not: linear means y and its derivatives appear only to the first power, never multiplied together or inside functions like sin⁡y. The coefficients may depend on x freely: y′′+x2y=sin⁡x is linear.

Linearity matters because of superposition: for a linear equation with zero right-hand side, any combination Ay1+By2 of solutions is again a solution. That is why every second-order linear equation has a general solution with exactly two constants.

2. First-order equations: four types

Type Looks like Method
Separable y′=f(x)g(y) ∫dy/g(y)=∫f(x)dx
Linear y′+P(x)y=Q(x) multiply by μ=e∫Pdx; then (μy)′=μQ
Exact Mdx+Ndy=0 with My=Nx find ϕ with ϕx=M, ϕy=N; answer ϕ=C
Almost exact My≠Nx but (My−Nx)/N depends on x only integrating factor e∫(My−Nx)/Ndx

Why the integrating factor works. If μ′=Pμ, then by the product rule (μy)′=μy′+Pμy=μ(y′+Py). So multiplying the equation by μ turns its left side into one exact derivative.

Worked example. Solve y′+y/x=x2 for x>0 with y(1)=1, and find y(2).

  1. P=1/x, so μ=eln⁡x=x.
  2. (xy)′=x⋅x2=x3. Integrate: xy=x4/4+C.
  3. y(1)=1 gives 1=14+C, so C=34.
  4. y(2)=(4+34)/2=2.375.

The usual slip is step 2: forgetting to multiply the right side by μ as well.

Physics you should see instantly. Decay N˙=−λN gives N=N0e−λt with half-life ln⁡2/λ. An RC circuit Rq˙+q/C=V charges as q=CV(1−e−t/RC). Newton’s cooling T˙=−k(T−Ta): it is the excess over room temperature that decays exponentially, so it halves in equal times.

A warning about non-linear equations: y′=y2 with y(0)=1 gives y=1/(1−x), which blows up at x=1 even though the equation looks harmless. Linear equations never do that where their coefficients are smooth.

3. Second order with constant coefficients

This is the heart of the topic, because it is the equation of every oscillator:

ay′′+by′+cy=0

Try y=emx. Every derivative brings down a factor m, and emx cancels, leaving the auxiliary (characteristic) equation:

am2+bm+c=0

Its two roots decide everything:

Roots General solution Behaviour
real, different m1≠m2 Aem1x+Bem2x growth or decay, no oscillation
real, equal m (A+Bx)emx the borderline case
complex α±iβ eαx(Acos⁡βx+Bsin⁡βx) oscillation at β, growing or decaying at rate α

The complex case is where Euler’s formula (lesson 1.9) earns its place: e(α+iβ)x=eαx(cos⁡βx+isin⁡βx), and the real and imaginary parts are both real solutions.

m (a root)
the growth rate of one basic solution e^(mx)
Real part of m
how fast the motion grows (positive) or dies away (negative)
Imaginary part of m
the angular frequency of the oscillation
Double root
the second solution is x e^(mx), not a second copy of e^(mx)
Physical meaning
For a mass on a spring with friction, the roots tell you at once whether it rings, creeps back, or returns as fast as possible without overshooting.

4. The damped oscillator

Write the oscillator equation in the standard physics form, with damping rate γ and natural frequency ω0:

x¨+2γx˙+ω02x=0,m=−γ±γ2−ω02

Move the sliders to see the three regimes:

Underdamped (γ < ω₀): rings inside a shrinking envelope. Critical (γ = ω₀): fastest return with no overshoot. Overdamped (γ > ω₀): creeps back slowly.
  • Underdamped, γ<ω0: x=e−γt(Acos⁡ωdt+Bsin⁡ωdt) with ωd=ω02−γ2. Damping lowers the frequency.
  • Critically damped, γ=ω0: x=(A+Bt)e−γt. Car shock absorbers and meter needles are designed to sit near here.
  • Overdamped, γ>ω0: two negative real roots; the slower one, −γ+γ2−ω02, controls the long creep.

Worked example. For x¨+2x˙+10x=0: m2+2m+10=0 gives m=−1±3i. So the motion oscillates at 3 rad/s (not 10≈3.16) and its amplitude falls as e−t, halving every ln⁡2≈0.69 s.

Note the factor 2 in 2γ: in x¨+0.2x˙+x=0 the decay rate is 0.1, not 0.2. Critical damping in x¨+bx˙+9x=0 needs b=2ω0=6, and in an LCR circuit R=2L/C.

5. Forcing: particular solutions and resonance

With a right-hand side, the solution is

y=yh+yp

where yh is the general solution with the right side set to zero (two constants) and yp is any one solution of the full equation. For exam right-hand sides, guess yp of the same shape (undetermined coefficients):

Right side Try
ekx Aekx
polynomial of degree n polynomial of degree n
cos⁡ωx or sin⁡ωx Acos⁡ωx+Bsin⁡ωx

The one rule that catches everyone: if your guess already solves the homogeneous equation, it gives zero on the left and cannot work. Multiply it by x (and by x again if needed).

Worked example. $y'' + 4y = \sin 2x$. The homogeneous solutions are $\cos2x$and$\sin2x$, so $A\sin2x$fails. Try$y_p = Bx\cos2x$: then $y_p” + 4y_p = -4B\sin2x$, so $B = -\tfrac14$and$y_p = -\tfrac14x\cos2x$`. The amplitude grows without limit: this is resonance, driving an undamped oscillator at its own frequency.

With damping, the steady response to Fcos⁡ωt stays finite:

A(ω)=F(ω02−ω2)2+(2γω)2

It peaks at ω=ω02−2γ2, slightly below both ω0 and the free damped frequency ω02−γ2. Three different frequencies, three favourite exam options. Play with a driven oscillator in fibub’s forced oscillations tool, and check any equation numerically with the ODE solver.

When the right side is something like sec⁡x or tan⁡x, guessing fails; then use variation of parameters (yp=−y1∫y2f/Wdx+y2∫y1f/Wdx, with W the Wronskian). For y′′+y=sec⁡x it gives yp=xsin⁡x+cos⁡xln⁡|cos⁡x|.

“A repeated root just means I write the same solution twice.” No. Ae−x+Be−x is really one constant times one function, and it cannot fit two initial conditions. For a double root m the second solution is xemx. The same idea returns with forcing: when the right side matches a homogeneous solution, multiply the trial by x; when it matches a double root, by x2 (for y′′−2y′+y=ex the answer is 12x2ex).

6. Euler-Cauchy equations

When the coefficients are powers of x matching the order of the derivative,

x2y′′+axy′+by=0,

an exponential no longer fits, but a power does: try y=xm to get m(m−1)+am+b=0. Distinct roots give Axm1+Bxm2; a double root gives xm(A+Bln⁡x) (the logarithm plays the role that x played before).

Worked example. x2y′′−2xy′+2y=0: m(m−1)−2m+2=m2−3m+2=0, so m=1,2 and y=Ax+Bx2. These equations appear in physics whenever a problem has no preferred length scale, such as Laplace’s equation in spherical coordinates.

One step further. A system of linear equations like x˙=3x+y, y˙=x+3y is solved the same way, with the exponents now the eigenvalues of the matrix (lesson 1.8): here 4 and 2.

  • Identify the type first: order, degree, linear or not; then separable, linear (integrating factor e∫Pdx) or exact (My=Nx).
  • For ay′′+by′+cy=0 solve am2+bm+c=0: distinct real roots give exponentials, a double root gives (A+Bx)emx, complex roots α±iβ give eαx(Acos⁡βx+Bsin⁡βx).
  • Damped oscillator x¨+2γx˙+ω02x=0: under, critical (γ=ω0) or overdamped; the damped frequency is ω02−γ2.
  • General solution = homogeneous + one particular. If the trial solves the homogeneous equation, multiply it by x.
  • Undamped driving at ω0 grows like tsin⁡ω0t; with damping the amplitude peaks at ω02−2γ2.
  • Euler-Cauchy x2y′′+axy′+by=0: try xm; a double root brings ln⁡x.

Practise: exam questions on this lesson

They start easy and climb to top-rank level. Check each answer, then read the full solution. More on the differential equations practice page.

Before this: lesson 1.6, the integral theorems. Next: lesson 1.8, matrices and eigenvalues, which solves systems of these equations in one go. Oscillators return in the mechanics and waves modules. For GATE and CSIR NET, the GATE Physics course continues with series solutions (Legendre, Bessel, Hermite) and partial differential equations, and CSIR NET adds numerical methods for ODEs.

Check yourself

1For y'' + 2y' + 5y = 0, what does the solution look like?
2You try y_p = A e^(2x) for y'' − 4y' + 4y = e^(2x) and get 0 = e^(2x). What went wrong?
3What is the integrating factor for y' + P(x) y = Q(x)?

Sources

  • M. L. Boas, Mathematical Methods in the Physical Sciences, 3rd ed. (2006), chapter 8
  • E. Kreyszig, Advanced Engineering Mathematics, 10th ed. (2011), chapters 1 to 3
  • G. F. Simmons, Differential Equations with Applications and Historical Notes, 3rd ed. (2016)
  • IIT JAM Physics syllabus (Mathematical Methods section), published by the organising IIT each year

Your ticks stay in this browser. Save them as a file on the course home.

Updated 2026-11-22. Not affiliated with IIT or the JAM organising institute. Exam pattern as published for recent years: always check the official JAM website before the exam. All questions are original.