Differential Equations — Complete Guide with Solved Examples

Complete guide to differential equations for Class 12. Solved examples, exam tips, PYQs.

CBSE JEE-MAIN JEE-ADVANCED 13 min read

What Are Differential Equations — And Why Should You Care?

A differential equation is any equation that contains a derivative. That’s it. When you write dydx=2x\frac{dy}{dx} = 2x, you’re not giving the answer — you’re describing a relationship between how yy changes and what xx is. Solving the equation means finding the original yy.

Think of it this way: velocity is dxdt\frac{dx}{dt}. If someone tells you “a particle’s velocity equals twice its position,” they’ve given you a differential equation: dxdt=2x\frac{dx}{dt} = 2x. Your job is to find where the particle actually is at any time tt.

This chapter carries serious weightage — 4-8 marks in CBSE Class 12 boards, and 1-2 questions in JEE Main almost every year. The good news: the types are well-defined, the methods are systematic, and with practice you can score full marks reliably.


Key Terms and Definitions

Order of a differential equation: the highest derivative present.

  • dydx+y=x2\frac{dy}{dx} + y = x^2 → Order 1
  • d2ydx2+3dydx=0\frac{d^2y}{dx^2} + 3\frac{dy}{dx} = 0 → Order 2

Degree of a differential equation: the power of the highest-order derivative, after clearing all fractions and radicals involving derivatives.

  • (dydx)3+y=0\left(\frac{dy}{dx}\right)^3 + y = 0 → Degree 3
  • d2ydx2+sin(dydx)=0\frac{d^2y}{dx^2} + \sin\left(\frac{dy}{dx}\right) = 0 → Degree not defined (can’t be expressed as a polynomial in derivatives)

Many students confuse order and degree. Order = which derivative is highest. Degree = what power that derivative is raised to. They’re asking two different things.

General Solution: contains arbitrary constants (as many as the order).

Particular Solution: obtained by substituting given initial conditions to find the constants.

Formation of a differential equation: given a family of curves (with nn arbitrary constants), differentiate nn times and eliminate the constants.


Methods for Solving Differential Equations

Class 12 syllabus covers three main types. Let’s handle each one cleanly.

Method 1: Variable Separable

When to use: You can write the equation as f(y)dy=g(x)dxf(y)\, dy = g(x)\, dx — i.e., all yy-terms on one side, all xx-terms on the other.

How to solve:

  1. Rearrange to separate variables
  2. Integrate both sides
  3. Add a single constant CC (one constant, not two)
  4. Simplify
dydx=f(x)g(y)    g(y)dy=f(x)dx    g(y)dy=f(x)dx+C\frac{dy}{dx} = \frac{f(x)}{g(y)} \implies g(y)\,dy = f(x)\,dx \implies \int g(y)\,dy = \int f(x)\,dx + C

Worked Example:

Solve dydx=y2+1x2+1\frac{dy}{dx} = \frac{y^2 + 1}{x^2 + 1}

dyy2+1=dxx2+1\frac{dy}{y^2+1} = \frac{dx}{x^2+1} dyy2+1=dxx2+1\int \frac{dy}{y^2+1} = \int \frac{dx}{x^2+1} tan1y=tan1x+C\tan^{-1}y = \tan^{-1}x + C

Done. This is the general solution.


Method 2: Homogeneous Differential Equations

When to use: The equation has the form dydx=F ⁣(yx)\frac{dy}{dx} = F\!\left(\frac{y}{x}\right) — meaning, if you replace xkxx \to kx and ykyy \to ky, the kk cancels out completely.

Substitution: Put y=vxy = vx, so dydx=v+xdvdx\frac{dy}{dx} = v + x\frac{dv}{dx}.

This converts the homogeneous equation into a variable separable one.

Quick check for homogeneous: if every term in numerator and denominator has the same total degree, it’s homogeneous. Example: dydx=x2+y2xy\frac{dy}{dx} = \frac{x^2 + y^2}{xy} — each term has degree 2 on top, degree 2 on bottom. Homogeneous.

Worked Example:

Solve dydx=x2+y22xy\frac{dy}{dx} = \frac{x^2 + y^2}{2xy}

Put y=vxy = vx:

v+xdvdx=x2+v2x22xvx=1+v22vv + x\frac{dv}{dx} = \frac{x^2 + v^2x^2}{2x \cdot vx} = \frac{1 + v^2}{2v} xdvdx=1+v22vv=1+v22v22v=1v22vx\frac{dv}{dx} = \frac{1+v^2}{2v} - v = \frac{1+v^2 - 2v^2}{2v} = \frac{1-v^2}{2v}

Separate variables:

2vdv1v2=dxx\frac{2v\,dv}{1-v^2} = \frac{dx}{x} ln1v2=lnx+C1-\ln|1-v^2| = \ln|x| + C_1 lnx+ln1v2=C1=K\ln|x| + \ln|1-v^2| = -C_1 = K x(1v2)=Ax(1-v^2) = A

Back-substitute v=y/xv = y/x:

x ⁣(1y2x2)=A    x2y2=Axx\!\left(1 - \frac{y^2}{x^2}\right) = A \implies x^2 - y^2 = Ax

Method 3: Linear Differential Equations

Standard form: dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)\cdot y = Q(x)

This is the most heavily tested type in both CBSE and JEE Main.

The Integrating Factor (IF):

IF=ePdx\text{IF} = e^{\int P\,dx}

Multiply both sides by IF. The left side magically becomes ddx(yIF)\frac{d}{dx}(y \cdot \text{IF}).

yePdx=QePdxdx+Cy \cdot e^{\int P\,dx} = \int Q \cdot e^{\int P\,dx}\,dx + C

Why does this work? The product rule says ddx(uv)=uv+uv\frac{d}{dx}(u \cdot v) = u'v + uv'. The IF is specifically chosen so that the left side becomes a product rule derivative — making the whole thing integrable directly.

Worked Example:

Solve dydx+2yx=x2\frac{dy}{dx} + \frac{2y}{x} = x^2

Here P=2xP = \frac{2}{x}, Q=x2Q = x^2

IF=e2xdx=e2lnx=x2\text{IF} = e^{\int \frac{2}{x}dx} = e^{2\ln x} = x^2

Multiply through by x2x^2:

ddx(x2y)=x2x2=x4\frac{d}{dx}(x^2 \cdot y) = x^2 \cdot x^2 = x^4 x2y=x4dx=x55+Cx^2 y = \int x^4\,dx = \frac{x^5}{5} + C y=x35+Cx2y = \frac{x^3}{5} + \frac{C}{x^2}

The equation can also appear as dxdy+P(y)x=Q(y)\frac{dx}{dy} + P(y)\cdot x = Q(y) — treating xx as the dependent variable and yy as independent. Same method, same IF formula, just swap the roles.


Solved Examples (Graded)

Easy — CBSE Level

Find the differential equation representing the family of curves y=ax+a2y = ax + a^2, where aa is an arbitrary constant.

Differentiate: dydx=a\frac{dy}{dx} = a

Substitute back: y=xdydx+(dydx)2y = x\frac{dy}{dx} + \left(\frac{dy}{dx}\right)^2

This is Clairaut’s equation — a classic CBSE 2-marker.


Medium — JEE Main Level

Solve: xdydxy=x2+y2x\frac{dy}{dx} - y = \sqrt{x^2 + y^2}, given y(1)=0y(1) = 0.

Rearrange: dydx=y+x2+y2x=yx+1+y2x2\frac{dy}{dx} = \frac{y + \sqrt{x^2+y^2}}{x} = \frac{y}{x} + \sqrt{1 + \frac{y^2}{x^2}}

This is homogeneous. Put y=vxy = vx:

v+xdvdx=v+1+v2v + x\frac{dv}{dx} = v + \sqrt{1+v^2} xdvdx=1+v2x\frac{dv}{dx} = \sqrt{1+v^2} dv1+v2=dxx\frac{dv}{\sqrt{1+v^2}} = \frac{dx}{x} ln ⁣v+1+v2=lnx+C\ln\!\left|v + \sqrt{1+v^2}\right| = \ln|x| + C

At x=1x=1, y=0v=0y=0 \Rightarrow v=0: ln(0+1)=ln1+CC=0\ln(0 + 1) = \ln 1 + C \Rightarrow C = 0

ln ⁣yx+1+y2x2=lnx\ln\!\left|\frac{y}{x} + \sqrt{1+\frac{y^2}{x^2}}\right| = \ln x y+x2+y2=x2y + \sqrt{x^2+y^2} = x^2

Hard — JEE Advanced Level

Solve: (1+y2)dx=(tan1yx)dy(1+y^2)\,dx = (\tan^{-1}y - x)\,dy

Rewrite as dxdy\frac{dx}{dy}:

dxdy=tan1yx1+y2\frac{dx}{dy} = \frac{\tan^{-1}y - x}{1+y^2} dxdy+x1+y2=tan1y1+y2\frac{dx}{dy} + \frac{x}{1+y^2} = \frac{\tan^{-1}y}{1+y^2}

This is linear in xx (dependent variable), yy (independent variable).

P=11+y2P = \frac{1}{1+y^2}, so IF=etan1y\text{IF} = e^{\tan^{-1}y}

xetan1y=tan1y1+y2etan1ydyx \cdot e^{\tan^{-1}y} = \int \frac{\tan^{-1}y}{1+y^2} \cdot e^{\tan^{-1}y}\,dy

Let t=tan1yt = \tan^{-1}y, dt=dy1+y2dt = \frac{dy}{1+y^2}:

=tetdt=et(t1)+C=etan1y(tan1y1)+C= \int t \cdot e^t\,dt = e^t(t-1) + C = e^{\tan^{-1}y}(\tan^{-1}y - 1) + C x=(tan1y1)+Cetan1yx = (\tan^{-1}y - 1) + Ce^{-\tan^{-1}y}

This exact problem type — linear DE with xx as dependent variable — appeared in JEE Main 2023 (January session). Recognizing when to flip and treat xx as dependent saves 3-4 minutes under exam pressure.


Exam-Specific Tips

CBSE Class 12 Boards

The marking scheme for a 5-mark DE question is typically: 1 mark for identifying type, 1 mark for correct substitution, 2 marks for integration, 1 mark for final answer. Even if you can’t complete the problem, the substitution step is worth marks — always show it.

Standard questions: formation (2 marks), variable separable (3 marks), linear DE (5 marks). The linear DE is almost always on the paper.

JEE Main

1-2 questions per paper, mostly from linear DE and homogeneous type. Questions often involve finding the particular solution — so read the initial condition carefully and substitute correctly. The answer choices help: if you get a clean form matching one option, you’re right.

JEE Main 2024 Shift 2 (January) had: “If dydx+2ytanx=sinx\frac{dy}{dx} + 2y\tan x = \sin x, y ⁣(π3)=0y\!\left(\frac{\pi}{3}\right) = 0, find the maximum value of yy.” Classic linear DE + particular solution + optimization combo. Be ready for this multi-step pattern.

JEE Advanced

Expect non-standard forms — DEs mixed with inequalities, DEs where the solution curve has geometric properties, or systems of DEs. Here, the setup is the hard part. Once you identify the type, the mechanics are the same.


Common Mistakes to Avoid

Mistake 1: Degree of a DE involving sin(dydx)\sin\left(\frac{dy}{dx}\right)

Students write degree = 1 because they see dydx\frac{dy}{dx} once. Wrong. Degree is only defined when the DE is a polynomial in derivatives. sin(dydx)\sin\left(\frac{dy}{dx}\right) is transcendental — degree is not defined. This is a guaranteed CBSE MCQ trap.

Mistake 2: Adding two constants after integration

When you integrate both sides of f(y)dy=g(x)dxf(y)\,dy = g(x)\,dx, write CC only on one side. Writing C1C_1 on the left and C2C_2 on the right, then combining as C1C2=CC_1 - C_2 = C, is technically fine but wastes time. Add CC to the right side from the start.

Mistake 3: Forgetting to back-substitute in homogeneous equations

After solving for vv, the final answer must be in terms of xx and yy. Leaving vv in the answer gets you zero marks for the final step in boards, and a wrong MCQ option in JEE.

Mistake 4: Misidentifying the linear DE form

The standard form is dydx+Py=Q\frac{dy}{dx} + Py = Q where PP and QQ are functions of xx only. If PP or QQ contain yy, it’s not linear (it might be Bernoulli’s equation, which is out of CBSE but appears in JEE). Always check this before applying the IF formula.

Mistake 5: Using IF = ePdxe^{\int P\,dx} without simplifying Pdx\int P\,dx first

If P=2xP = \frac{2}{x}, then Pdx=2lnx=lnx2\int P\,dx = 2\ln x = \ln x^2, so IF=elnx2=x2\text{IF} = e^{\ln x^2} = x^2. Students who write IF=e2lnx\text{IF} = e^{2\ln x} and leave it there often make multiplication errors in the next step. Always simplify the IF to a clean form.


Practice Questions

Q1. Find the order and degree of: (d3ydx3)2+d2ydx2=sinx\left(\frac{d^3y}{dx^3}\right)^2 + \frac{d^2y}{dx^2} = \sin x

Order = 3 (highest derivative is d3ydx3\frac{d^3y}{dx^3}). Degree = 2 (that derivative is squared). The sinx\sin x on the right doesn’t affect either — it involves only xx, not derivatives.

Q2. Solve: dydx=ex+y\frac{dy}{dx} = e^{x+y}

Separate: eydy=exdxe^{-y}\,dy = e^x\,dx

Integrate: ey=ex+C-e^{-y} = e^x + C

Or equivalently: ex+ey=Ke^x + e^{-y} = K (where K=CK = -C)

Q3. Form the DE for the family of circles x2+y2=r2x^2 + y^2 = r^2.

Differentiate: 2x+2ydydx=02x + 2y\frac{dy}{dx} = 0

So: x+ydydx=0x + y\frac{dy}{dx} = 0, or dydx=xy\frac{dy}{dx} = -\frac{x}{y}

(One arbitrary constant rr → order 1 DE, as expected.)

Q4. Solve: (x2y2)dx+2xydy=0(x^2 - y^2)\,dx + 2xy\,dy = 0

Rewrite: dydx=y2x22xy\frac{dy}{dx} = \frac{y^2 - x^2}{2xy}

Check homogeneity: both terms have degree 2. Homogeneous. Put y=vxy = vx:

v+xdvdx=v212vv + x\frac{dv}{dx} = \frac{v^2 - 1}{2v} xdvdx=v212vv=v212v22v=1v22vx\frac{dv}{dx} = \frac{v^2-1}{2v} - v = \frac{v^2-1-2v^2}{2v} = \frac{-1-v^2}{2v} 2vdv1+v2=dxx\frac{2v\,dv}{1+v^2} = -\frac{dx}{x} ln(1+v2)=lnx+lnK\ln(1+v^2) = -\ln x + \ln K x(1+v2)=Kx(1+v^2) = K

Back-substitute: x ⁣(1+y2x2)=Kx2+y2=Kxx\!\left(1 + \frac{y^2}{x^2}\right) = K \Rightarrow x^2 + y^2 = Kx

Q5. Solve: dydx+ycotx=2cosx\frac{dy}{dx} + y\cot x = 2\cos x

Linear DE. P=cotxP = \cot x, Q=2cosxQ = 2\cos x.

IF=ecotxdx=elnsinx=sinx\text{IF} = e^{\int \cot x\,dx} = e^{\ln|\sin x|} = \sin x

ysinx=2cosxsinxdx=sin2xdx=cos2x2+Cy\sin x = \int 2\cos x \cdot \sin x\,dx = \int \sin 2x\,dx = -\frac{\cos 2x}{2} + C y=cos2x2sinx+Csinxy = \frac{-\cos 2x}{2\sin x} + \frac{C}{\sin x}

Q6. Find the particular solution of dydx=yx+tan ⁣(yx)\frac{dy}{dx} = \frac{y}{x} + \tan\!\left(\frac{y}{x}\right), given y=π2y = \frac{\pi}{2} when x=1x = 1.

Homogeneous. Put y=vxy = vx:

v+xdvdx=v+tanvv + x\frac{dv}{dx} = v + \tan v xdvdx=tanvx\frac{dv}{dx} = \tan v cotvdv=dxx\cot v\,dv = \frac{dx}{x} lnsinv=lnx+C\ln|\sin v| = \ln|x| + C sinv=Ax\sin v = Ax

Back-substitute v=y/xv = y/x: sin ⁣(yx)=Ax\sin\!\left(\frac{y}{x}\right) = Ax

At x=1x=1, y=π2y=\frac{\pi}{2}: sin ⁣(π2)=A(1)A=1\sin\!\left(\frac{\pi}{2}\right) = A(1) \Rightarrow A = 1

Particular solution: sin ⁣(yx)=x\sin\!\left(\frac{y}{x}\right) = x

Q7. Solve: dydx3y=sin2x\frac{dy}{dx} - 3y = \sin 2x (JEE Main pattern)

Linear DE. P=3P = -3, Q=sin2xQ = \sin 2x.

IF=e3x\text{IF} = e^{-3x}

ye3x=e3xsin2xdxye^{-3x} = \int e^{-3x}\sin 2x\,dx

Use the standard result eaxsinbxdx=eax(asinbxbcosbx)a2+b2\int e^{ax}\sin bx\,dx = \frac{e^{ax}(a\sin bx - b\cos bx)}{a^2+b^2}:

e3xsin2xdx=e3x(3sin2x2cos2x)9+4=e3x(3sin2x2cos2x)13\int e^{-3x}\sin 2x\,dx = \frac{e^{-3x}(-3\sin 2x - 2\cos 2x)}{9+4} = \frac{e^{-3x}(-3\sin 2x - 2\cos 2x)}{13} y=3sin2x2cos2x13+Ce3xy = \frac{-3\sin 2x - 2\cos 2x}{13} + Ce^{3x}

Q8. Form the DE for parabolas with vertex at origin and axis along the positive xx-axis.

Such parabolas have equation y2=4axy^2 = 4ax (one arbitrary constant aa).

Differentiate: 2ydydx=4a2y\frac{dy}{dx} = 4a, so a=y2dydxa = \frac{y}{2}\frac{dy}{dx}

Substitute back into y2=4axy^2 = 4ax:

y2=4y2dydxx=2xydydxy^2 = 4 \cdot \frac{y}{2}\frac{dy}{dx} \cdot x = 2xy\frac{dy}{dx} y=2xdydxy = 2x\frac{dy}{dx}

Or equivalently: dydx=y2x\frac{dy}{dx} = \frac{y}{2x}


FAQs

What is the difference between a general solution and a particular solution?

The general solution contains arbitrary constants (as many as the order of the DE). A particular solution is obtained by substituting specific initial or boundary conditions — it’s one specific curve from the family represented by the general solution.

How do I identify which method to use?

Check in this order: (1) Can I separate variables cleanly? If yes, use variable separable. (2) Does every term have the same total degree? If yes, it’s homogeneous. (3) Is it in the form dydx+Py=Q\frac{dy}{dx} + Py = Q with P,QP, Q functions of xx only? If yes, linear DE with IF.

What does “degree not defined” mean?

When a DE contains derivatives inside transcendental functions like sin\sin, log\log, e()e^{(\cdot)}, it cannot be expressed as a polynomial in derivatives. Degree is only defined for polynomial DEs. This is a 1-mark conceptual question in CBSE — know it cold.

Is Bernoulli’s equation in the Class 12 syllabus?

No, it’s not in the CBSE/NCERT syllabus for Class 12. It appears in some JEE coaching modules, but JEE Main questions on DEs are typically solvable using the three standard methods above.

Why does multiplying by the integrating factor work?

The IF μ=ePdx\mu = e^{\int P\,dx} is chosen precisely so that μ=Pμ\mu' = P\mu. This makes ddx(μy)=μy+μy=μ(y+Py)=μQ\frac{d}{dx}(\mu y) = \mu y' + \mu' y = \mu(y' + Py) = \mu Q. So after multiplying, the left side is always a perfect derivative — which is immediately integrable.

How many questions come from differential equations in JEE Main?

Typically 1-2 questions per paper. With the shift to a numerical answer format for some questions, you might be asked to find a specific value (like the value of yy at x=2x = 2) rather than the full solution. Practice substituting the initial condition and evaluating.

Can the arbitrary constant appear in different forms in the final answer?

Yes. lny=x+C\ln|y| = x + C is equivalent to y=Aexy = Ae^x (where A=eCA = e^C). Both are correct general solutions — they represent the same family of curves. In CBSE boards, either form is accepted; in JEE, the answer options will guide you to the expected form.

What is an exact differential equation?

An equation Mdx+Ndy=0M\,dx + N\,dy = 0 is exact if My=Nx\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}. This is not in the CBSE Class 12 syllabus but appears in engineering mathematics (B.Tech). For boards and JEE, focus on the three methods above.

Practice Questions