Class 12 Maths, Worked in Full Past papersGet updates
CBSE Board Examination 2026 · Section C · 3 marks

Q29: Solve x2dydx=x2+xy+y2x^2\frac{dy}{dx} = x^2 + xy + y^2⁠, or xydydx=(x+2)(y+2)xy\frac{dy}{dx} = (x + 2)(y + 2) with y(1)=−1y(1) = -1

The question

(a) Find the general solution of the following differential equation :

x2dydx=x2+xy+y2x^2\frac{dy}{dx} = x^2 + xy + y^2

OR

(b) Find the particular solution of the differential equation

xydydx=(x+2)(y+2),xy\frac{dy}{dx} = (x + 2)(y + 2),

given that y(1)=−1y(1) = -1⁠.

Exam answer

(a)

Dividing by x2x^2 (x≠0x \ne 0⁠), the given equation is

dydx=1+yx+(yx)2\frac{dy}{dx} = 1 + \frac{y}{x} + \left(\frac{y}{x}\right)^2
Why?

Each term on the right has degree 2 in xx and yy together (x2x^2⁠, xyxy⁠, y2y^2⁠), so the equation is homogeneous. Dividing by x2x^2 shows the right side as a function of yx\frac{y}{x} alone:

xyx2=yx,y2x2=(yx)2\frac{xy}{x^2} = \frac{y}{x},\quad \frac{y^2}{x^2} = \left(\frac{y}{x}\right)^2

It is homogeneous. Put y=vxy = vx⁠. Then dydx=v+xdvdx\frac{dy}{dx} = v + x\frac{dv}{dx}⁠.

Why?

For a homogeneous equation the substitution y=vxy = vx always separates the variables.

vv depends on xx⁠, so use the product rule on vxvx⁠:

ddx(vx)=v⋅1+xdvdx\frac{d}{dx}(vx) = v\cdot 1 + x\frac{dv}{dx}
v+xdvdx=1+v+v2⇒xdvdx=1+v2⇒dv1+v2=dxx\begin{aligned} v + x\frac{dv}{dx} &= 1 + v + v^2 \\ \Rightarrow x\frac{dv}{dx} &= 1 + v^2 \\ \Rightarrow \frac{dv}{1 + v^2} &= \frac{dx}{x} \end{aligned}
Why?

Put yx=v\frac{y}{x} = v on the right. The vv on both sides cancels.

v+xdvdx=1+v+v2xdvdx=1+v+v2−vxdvdx=1+v2\begin{aligned} v + x\frac{dv}{dx} &= 1 + v + v^2 \\ x\frac{dv}{dx} &= 1 + v + v^2 - v \\ x\frac{dv}{dx} &= 1 + v^2 \end{aligned}

Then separate: everything with vv goes with dvdv⁠, everything with xx goes with dxdx⁠.

Divide both sides by 1+v21 + v^2 and by xx⁠, and multiply by dxdx⁠:

dv1+v2=dxx\frac{dv}{1 + v^2} = \frac{dx}{x}

Integrating both sides,

∫dv1+v2=∫dxxtan⁡−1v=log⁡∣x∣+C\begin{aligned} \int\frac{dv}{1 + v^2} &= \int\frac{dx}{x} \\ \tan^{-1}v &= \log|x| + C \end{aligned}
Why?

Standard integrals:

∫dv1+v2=tan⁡−1v∫dxx=log⁡∣x∣\begin{aligned} \int\frac{dv}{1 + v^2} &= \tan^{-1}v \\ \int\frac{dx}{x} &= \log|x| \end{aligned}

One arbitrary constant CC is enough for the two sides.

Putting v=yxv = \frac{y}{x}⁠,

Why?

The answer must be in the original variables, so replace vv by yx\frac{y}{x}⁠.

tan⁡−1(yx)=log⁡∣x∣+C\tan^{-1}\left(\frac{y}{x}\right) = \log|x| + C is the general solution.

(b)

Separating the variables (x≠0x \ne 0⁠, y≠−2y \ne -2⁠),

xy dy=(x+2)(y+2) dxxy\,dy = (x + 2)(y + 2)\,dx yy+2 dy=x+2x dx\frac{y}{y + 2}\,dy = \frac{x + 2}{x}\,dx
Why?

The right side is a product of a function of xx and a function of yy⁠, so the variables separate. Divide both sides by x(y+2)x(y + 2)⁠: the yy-terms stay with dydy⁠, the xx-terms with dxdx⁠.

First, multiply both sides of the question by dxdx⁠:

xy dy=(x+2)(y+2) dxxy\,dy = (x + 2)(y + 2)\,dx

Then divide both sides by x(y+2)x(y + 2)⁠:

Left: xyx(y+2) dy=yy+2 dyRight: (x+2)(y+2)x(y+2) dx=x+2x dx\begin{aligned} \text{Left: } &\frac{xy}{x(y + 2)}\,dy = \frac{y}{y + 2}\,dy \\[4pt] \text{Right: } &\frac{(x + 2)(y + 2)}{x(y + 2)}\,dx \\ &= \frac{x + 2}{x}\,dx \end{aligned}

Integrating both sides,

∫(1−2y+2)dy=∫(1+2x)dx\begin{aligned} &\int\left(1 - \frac{2}{y + 2}\right)dy \\ &= \int\left(1 + \frac{2}{x}\right)dx \end{aligned}
Why?

yy+2\frac{y}{y + 2} is not a standard form. Write the top as (y+2)−2(y + 2) - 2⁠:

yy+2=(y+2)−2y+2\frac{y}{y + 2} = \frac{(y + 2) - 2}{y + 2}

That is 1−2y+21 - \frac{2}{y + 2}⁠. Similarly x+2x=1+2x\frac{x + 2}{x} = 1 + \frac{2}{x}⁠.

(y+2)−2y+2=y+2y+2−2y+2=1−2y+2x+2x=xx+2x=1+2x\begin{aligned} \frac{(y + 2) - 2}{y + 2} &= \frac{y + 2}{y + 2} - \frac{2}{y + 2} \\ &= 1 - \frac{2}{y + 2} \\[4pt] \frac{x + 2}{x} &= \frac{x}{x} + \frac{2}{x} \\ &= 1 + \frac{2}{x} \end{aligned}
y−2log⁡∣y+2∣=x+2log⁡∣x∣+C\begin{aligned} &y - 2\log|y + 2| \\ &= x + 2\log|x| + C \end{aligned}
Why?

∫dyy+2=log⁡∣y+2∣\int\frac{dy}{y + 2} = \log|y + 2| and ∫dxx=log⁡∣x∣\int\frac{dx}{x} = \log|x|⁠.

∫1 dy−2∫dyy+2=y−2log⁡∣y+2∣∫1 dx+2∫dxx=x+2log⁡∣x∣\begin{aligned} &\int 1\,dy - 2\int\frac{dy}{y + 2} \\ &= y - 2\log|y + 2| \\[4pt] &\int 1\,dx + 2\int\frac{dx}{x} \\ &= x + 2\log|x| \end{aligned}

One constant CC is added on the right.

Given y(1)=−1y(1) = -1⁠: putting x=1x = 1⁠, y=−1y = -1⁠,

−1−2log⁡1=1+2log⁡1+C⇒C=−2\begin{aligned} -1 - 2\log 1 &= 1 + 2\log 1 + C \\ \Rightarrow C &= -2 \end{aligned}
Why?

y(1)=−1y(1) = -1 means y=−1y = -1 when x=1x = 1⁠. Then ∣y+2∣=∣1∣=1|y + 2| = |1| = 1 and ∣x∣=1|x| = 1⁠.

log⁡1=0\log 1 = 0⁠, so −1=1+C-1 = 1 + C⁠, giving C=−2C = -2⁠.

Left=−1−2log⁡∣−1+2∣=−1−2log⁡1=−1−2(0)=−1Right=1+2log⁡∣1∣+C=1+2(0)+C=1+C−1=1+CC=−1−1=−2\begin{aligned} \text{Left} &= -1 - 2\log|-1 + 2| \\ &= -1 - 2\log 1 \\ &= -1 - 2(0) = -1 \\[4pt] \text{Right} &= 1 + 2\log|1| + C \\ &= 1 + 2(0) + C = 1 + C \\[4pt] -1 &= 1 + C \\ C &= -1 - 1 = -2 \end{aligned}

∴\therefore The particular solution is y−2log⁡∣y+2∣y - 2\log|y + 2| =x+2log⁡∣x∣−2= x + 2\log|x| - 2⁠.

Where this comes from

Chapter 9, Differential Equations: Homogeneous and variables-separable equations.

Question type: (a) Homogeneous equations; (b) Variables separable + A particular solution (combined)

How to spot it: click to see

(a) Type 6. Homogeneous equations: put y=vxy = vx

Spot it: every term has the same degree, like x2x^2⁠, xyxy and y2y^2⁠, or you see yx\frac{y}{x} inside sin, cos or log. You cannot separate xx and yy⁠.

Here: Dividing by x2x^2 gives 1+yx+(yx)21 + \frac{y}{x} + \left(\frac{y}{x}\right)^2⁠. Put y=vxy = vx⁠: the vv cancels, leaving dv1+v2=dxx\frac{dv}{1 + v^2} = \frac{dx}{x}⁠, a tan⁡−1\tan^{-1}⁠.

(b) Type 3. Variables separable: yy on one side, xx on the other

Spot it: dydx\frac{dy}{dx} equals a part in xx times a part in yy⁠, like (1+x2)(1+y2)(1 + x^2)(1 + y^2)⁠.

Here: The right side (x+2)(y+2)(x + 2)(y + 2) is a part in xx times a part in yy⁠. Separate: yy+2 dy=x+2x dx\frac{y}{y + 2}\,dy = \frac{x + 2}{x}\,dx⁠, and write yy+2=1−2y+2\frac{y}{y + 2} = 1 - \frac{2}{y + 2} before integrating.

(b) Type 4. A particular solution: solve, then find CC

Spot it: a condition such as "y=1y = 1 when x=0x = 0", or "the curve passes through a point".

Here: Then y(1)=−1y(1) = -1⁠: put x=1x = 1⁠, y=−1y = -1 to get −1=1+C-1 = 1 + C⁠, so C=−2C = -2⁠.

Found an error?

Tell us if something on this page is wrong or unclear. Send feedback on this question →