Q.Solve the following differential equation: dxdy=1+cosx1−cosx
Concept understanding — Separation Of Variables
Separation of Variables: From Intuition to Precision
Imagine you're baking a cake. The recipe says "mix the dry ingredients separately, then add the wet ones." You keep things that belong together together, and things that don't apart — until the right moment. Separation of Variables does exactly that for certain kinds of equations.
The Core Intuition
Some equations involve two different kinds of change happening at once. Think of a cup of hot coffee cooling down. The rate at which it cools depends on:
- The temperature difference between the coffee and the room (a function of time)
- The surface area of the cup (a function of shape, not time)
These two influences are tangled together in one equation. Separation of Variables is the mathematical trick that untangles them — it lets you handle the time part first, then the space part separately.
The Precise Statement
Separation of Variables applies to ordinary differential equations (ODEs) of the form:
dxdy=f(x)⋅g(y)
where the right-hand side is a product of a function of x alone and a function of y alone. The method works in three clean steps:
dxdy=f(x)⋅g(y)⟹g(y)1dy=f(x)dx
Step 1: Separate. Multiply both sides by dx and divide by g(y) (assuming g(y)=0). This moves all y's to one side and all x's to the other.
Step 2: Integrate. Put an integral sign on both sides:
∫g(y)1dy=∫f(x)dx
Step 3: Solve. Evaluate both integrals and solve for y explicitly if possible.
You cannot separate if the equation is not in product form. For example, dxdy=x+y cannot be separated — the sum x+y is not a product f(x)g(y).
Why This Works
The justification is the chain rule in reverse. From dxdy=f(x)g(y), rewrite it as:
g(y)1dxdy=f(x)
Now integrate both sides with respect to x:
∫g(y)1dxdydx=∫f(x)dx
The left side is a substitution waiting to happen: dxdydx=dy, so you get ∫g(y)1dy. That's the entire trick — the chain rule dressed up.
A Concrete Example
Solve dxdy=2xy, with y(0)=3.
Step 1: Separate. Divide both sides by y (assuming y=0):
y1dy=2xdx
Step 2: Integrate.
∫y1dy=∫2xdx⟹log∣y∣=x2+C
Step 3: Solve for y.
∣y∣=ex2+C=eC⋅ex2
Let A=±eC (absorbing the absolute value): y=Aex2. Now use y(0)=3: 3=Ae0=A, so A=3.
Final answer: y=3ex2
Always check if g(y)=0 gives a solution. Here g(y)=y, so y=0 is also a solution (the trivial one). Our initial condition y(0)=3 picks the non-zero branch.
When Does It Apply?
Separation of Variables works for first-order ODEs of the form dxdy=f(x)g(y), and for certain partial differential equations like the heat equation (a more advanced use — the idea is the same: assume the solution is a product of functions of each variable). It does not work for equations where x and y are added, subtracted, or composed in non-product ways, or for higher-order ODEs (generally).
The Big Picture
Separation of Variables is your first real tool for solving differential equations. It reduces a problem with two moving parts into two independent single-variable integrals: you separate the variables, handle each alone, then reassemble with the initial condition. Think of it as untangling a knot by pulling the two ends apart — once separate, each piece is easy to deal with.
Separation of Variables is the very first solving technique taught in NCERT's Class 12 Differential Equations chapter and one of the most heavily tested skills in CBSE board exams and JEE Main. Students searching "separable differential equations important questions" or "differential equations class 12 formula" will find this method the starting point for almost every other technique in the chapter.
Concept: Separation of Variables — the right-hand side depends only on x, so we integrate directly.
First, simplify the fraction using the identity cosx=2cos22x−1=1−2sin22x:
1+cosx1−cosx=2cos22x2sin22x=tan22x.
Now integrate both sides:
y=∫tan22xdx=∫(sec22x−1)dx.
Integrate term by term:
y=2tan2x−x+C.
The solution is y=2tan2x−x+C.
This is a direct integration problem after simplifying the right-hand side using trigonometric identities. The solution is y=2tan2x−x+C.
The equation is already in the form dxdy=f(x), with no y on the right. That means we don't need any special method like separation of variables — it's just pure integration. The challenge is purely algebraic: simplifying 1+cosx1−cosx into something we can integrate easily.
Why use identities? Because direct integration of that ratio is messy. But if we rewrite it using half-angle formulas, the expression collapses into a clean sum of terms.
- Rewrite using half-angle identities. Recall: 1−cosx=2sin22x 1+cosx=2cos22x So
1+cosx1−cosx=2cos22x2sin22x=tan22x
- Express tan2 in integrable form. We know tan2θ=sec2θ−1. Therefore:
dxdy=sec22x−1
- Integrate both sides with respect to x.
y=∫(sec22x−1)dx
For ∫sec22xdx, let u=2x, so dx=2du, giving:
∫sec22xdx=2∫sec2udu=2tanu=2tan2x
And ∫1dx=x. So:
y=2tan2x−x+C
A common mistake is forgetting the factor of 2 from the chain rule when integrating sec22x. Always check: derivative of tan2x is 21sec22x, so the integral must bring back a factor of 2.
You could also use the identity 1+cosx1−cosx=2cos22x2sin22x=tan22x directly — no need to go through csc or cot forms. This is the cleanest path.
The general solution is y=2tan2x−x+C, where C is an arbitrary constant.
Method: Direct integration when the right side depends only on x
When an equation has the form dxdy=f(x) — no y on the right — you do not need any special technique; you integrate directly. The real work is simplifying f(x) first.
Steps
Step 1: Simplify f(x) into an integrable shape
Apply algebraic or trigonometric identities to turn an awkward expression into a sum of standard pieces. Half-angle identities like 1−cosx=2sin22x and 1+cosx=2cos22x collapse many trig ratios into a single tan2 or cot2.
Step 2: Rewrite using a directly integrable identity
For example, tan2θ=sec2θ−1 turns an un-integrable square into sec2 minus a constant.
Step 3: Integrate term by term
y=∫f(x)dx+C,
watching the chain-rule scaling — integrating sec22x brings out a factor of 2.
If there is no y on the right, resist "separating variables"; there is nothing to separate — it is a pure integration problem.
Common Mistakes
Mistake 1: Forgetting the chain-rule factor of 2 when integrating sec22x
Why it's wrong: since dxdtan2x=21sec22x, the integral is 2tan2x, not tan2x. Correct approach: substitute u=2x so the factor of 2 appears automatically.
Mistake 2: Trying to integrate 1+cosx1−cosx directly
Why it's wrong: the raw ratio has no elementary antiderivative in that form; students get stuck or invent wrong steps. Correct approach: apply half-angle identities to reduce it to tan22x=sec22x−1 first.
Mistake 3: Omitting the arbitrary constant C
Why it's wrong: the answer is a general solution, so C is essential. Correct approach: always append +C after integrating.
- KEAM 2024Set eng-2024-06054 marksMCQQ.The solution of cosydy=dx is (A) log∣secy−tany∣=x+C (B) x+secy+tany=C (C) secy+tany=x+C (D) log∣secx+tany∣=secy+x+C (E) log∣secy+tany∣=x+C
›Reveal solutionSolution
Separate and use ∫secydy=log∣secy+tany∣.
Rewrite cosydy=dx as secydy=dx. Integrating both sides:
∫secydy=∫dx ⇒ log∣secy+tany∣=x+C.
✓Final answerThe correct option is (E).
- KEAM 2024Set eng-2024-06054 marksMCQQ.The solution of (ycosy+siny)dy=(2xlogx+x)dx is (A) ysinx=x2logx+C (B) ysiny=xlogx+C (C) ysiny=x2logx+C (D) sinx=x2logx+C (E) ysinx=xlogx+C
›Reveal solutionSolution
Recognize d(ysiny) on the left and integrate the right to x2logx.
The left side is exact: dyd(ysiny)=siny+ycosy, so ∫(ycosy+siny)dy=ysiny. For the right:
∫(2xlogx+x)dx=(x2logx−2x2)+2x2=x2logx.
Therefore
ysiny=x2logx+C.
✓Final answerThe correct option is (C).
- KEAM 2026Set eng-2026-04214 marksMCQQ.The solution of (ey+1)cosxdx+eysinxdy=0 is (A) (ey+1)sinx=C (B) (ey+1)=Csinx (C) ey=Csinx (D) (ey−1)sinx=C (E) (ey+1)cosx=C
›Reveal solutionSolution
Separate and integrate: log(ey+1)+logsinx=const, giving (ey+1)sinx=C.
(ey+1)cosxdx+eysinxdy=0⇒eysinxdy=−(ey+1)cosxdx.
Separate: ey+1eydy=−sinxcosxdx.
Integrate both sides: log(ey+1)=−log(sinx)+logC.
Hence log[(ey+1)sinx]=logC, i.e. (ey+1)sinx=C.
✓Final answerThe correct option is (A).
- KEAM 2024Set eng-2024-06084 marksMCQQ.The general solution of the differential equation (x+y)2dxdy=1 is (A) y=21tan−1(x+y)+c (B) y=−(x+y)−1+c (C) y=31(x+y)3+c (D) y=sin−1(x+y)+c (E) y=tan−1(x+y)+c
›Reveal solutionSolution
Put v=x+y; the equation becomes 1+v2v2dv=dx, whose integral v−tan−1v=x+c simplifies to y=tan−1(x+y)+c.
Let v=x+y, so dxdv=1+dxdy, i.e. dxdy=dxdv−1. Substitute into (x+y)2dxdy=1:
v2(dxdv−1)=1 ⇒ v2dxdv=1+v2.
Separate variables:
1+v2v2dv=dx ⇒ (1−1+v21)dv=dx.
Integrate:
v−tan−1v=x+c.
Replace v=x+y:
(x+y)−tan−1(x+y)=x+c ⇒ y=tan−1(x+y)+c.
✓Final answerThe correct option is (E).
- KEAM 2025Set eng-2025-04254 marksMCQQ.The general solution of the differential equation (1+y)dx−(1−x)dy=0 is (A) x2+y2+x−y=C (B) x+y−xy=C (C) x−y+xy=C (D) x−y−xy=C (E) x2−y2+x+y=C
›Reveal solutionSolution
Separate variables, integrate, and simplify the resulting product to the given form.
From (1+y)dx=(1−x)dy,
1−xdx=1+ydy.
Integrating,
−loge∣1−x∣=loge∣1+y∣+c⇒loge(1−x)(1+y)=const,
so (1−x)(1+y)=C′. Expanding,
1+y−x−xy=C′⇒x−y+xy=C.
✓Final answerThe correct option is (C).
- KEAM 2024Set eng-2024-06064 marksMCQQ.The general solution of the differential equation dxdy=xy−2x−2y+4 is (A) (y−2)21=2(x−2)2+C (B) loge∣y−2∣=2(x−2)2+C (C) (y−2)2=2(x−2)2+C (D) loge∣y−2∣=C (E) loge∣y−2∣=(x−2)2+C
›Reveal solutionSolution
The equation is separable: (x−2)(y−2), giving loge∣y−2∣=2(x−2)2+C.
Factor the RHS: xy−2x−2y+4=x(y−2)−2(y−2)=(x−2)(y−2).
Separate variables: y−2dy=(x−2)dx.
Integrate: loge∣y−2∣=2(x−2)2+C.
✓Final answerThe correct option is (B).
- KEAM 2026Set eng-2026-04204 marksMCQQ.The solution of the differential equation (2y−1)dy−(y−2)dx=0 is (A) 2y+3log∣y−2∣=2x+c (B) 2y+4log∣y−2∣=x+c (C) y+3log∣y−2∣=x+c (D) 2y+3log∣y−2∣=x+c (E) 3y+2log∣y−2∣=x+c
›Reveal solutionSolution
Separate variables and divide 2y−1 by y−2.
(2y−1)dy=(y−2)dx⇒dx=y−22y−1dy.
y−22y−1=y−22(y−2)+3=2+y−23.
Integrating: x=2y+3log∣y−2∣+const, i.e. 2y+3log∣y−2∣=x+c.
✓Final answerThe correct option is (D).
- KEAM 2021Set eng-2021-P2-B14 marksMCQQ.The general solution of the differential equation 4xy+12x+(2x2+3)y′=0 is (A) y+32x2+3=C (B) 2x2+3y−3=C (C) 2x2+3y+2=C (D) (y−3)(2x2+3)=C (E) (y+3)(2x2+3)=C
›Reveal solutionSolution
The general solution is (y+3)(2x2+3)=C.
Concept and Intuition
The equation is separable once grouped: the y-terms factor as y+3 and the x-terms give a logarithm whose argument is 2x2+3.
Step-by-Step Solution
- 4xy+12x+(2x2+3)y′=0⇒(2x2+3)y′=−4x(y+3).
- Separate: y+3dy=−2x2+34xdx.
- Integrate: log∣y+3∣=−log∣2x2+3∣+c (since ∫2x2+34xdx=log∣2x2+3∣).
- Combine: log[(y+3)(2x2+3)]=c⇒(y+3)(2x2+3)=C.
Common Mistakes
- Factoring −4xy−12x incorrectly instead of −4x(y+3).
✓Final answerThe correct option is (E) — (y+3)(2x2+3)=C.
ANSWER: E
🎓Unlock everything free for 14 days
- ✓Full step-by-step solutions
- ✓Concept-first explanations
- ✓Methods, shortcuts & mistakes
- ✓PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.