Differential Equations

NCERT Exemplar Solutions Class 12 Maths Differential Equations — Long Answer Q25–33

NCERT Exemplar Problems, Class 12 Mathematics — Differential Equations, Long Answer questions 25 to 33. All 9 questions solved.

These are the full-length solving questions of the unit. Each one is a first-order, first-degree equation, so the whole skill is recognising which of three methods applies: a linear equation solved with an integrating factor (Questions 25, 26, 28), a substitution that turns the equation into a separable one (Questions 27 and 31), or a homogeneous equation solved with $y=vx$ (Questions 29 and 33). Questions 30 and 32 are separable once the geometry is turned into an equation. Where a condition is given, find the general solution first and fix the constant last.

A note on the syllabus. The rationalised NCERT Chapter 9 keeps order and degree (Ex 9.1), general and particular solutions (Ex 9.2), and solving first-order first-degree equations: variables separable (9.3), homogeneous (9.4) and linear (9.5). All nine questions on this page are within that syllabus and within JEE Main 2026 and JEE Advanced 2026. None of them is a formation question.

Key insight. Write the equation in the form that exposes its type before doing anything else: $\dfrac{dy}{dx}+Py=Q$ for linear (or $\dfrac{dx}{dy}+P_1x=Q_1$ when $x$ is the better dependent variable), a function of $\dfrac yx$ for homogeneous, and a single combination such as $x+y$ or $x-y$ for a substitution.

Question 25

Solve: $y+\dfrac{d}{dx}(xy)=x(\sin x+\log x)$.

Solution. Expand the derivative: $y+x\dfrac{dy}{dx}+y=x(\sin x+\log x)$, that is $x\dfrac{dy}{dx}+2y=x(\sin x+\log x)$. This is linear, so divide by $x$ to get the standard form $$\frac{dy}{dx}+\frac2x\,y=\sin x+\log x.$$ The integrating factor is $e^{\int 2/x\,dx}=x^2$. Multiplying through makes the left side $\dfrac{d}{dx}(x^2y)$, so $$x^2y=\int x^2\sin x\,dx+\int x^2\log x\,dx.$$ By parts twice, $\int x^2\sin x\,dx=-x^2\cos x+2x\sin x+2\cos x$. By parts once, $\int x^2\log x\,dx=\dfrac{x^3}{3}\log x-\dfrac{x^3}{9}$. Dividing by $x^2$,

$$y=-\cos x+\frac{2\sin x}{x}+\frac{2\cos x}{x^2}+\frac{x\log x}{3}-\frac x9+\frac{c}{x^2}$$

Question 26

Find the general solution of $(1+\tan y)(dx-dy)+2x\,dy=0$.

Solution. Here $x$ is the natural dependent variable. Expanding, $(1+\tan y)\,dx=(1+\tan y-2x)\,dy$, so $$\frac{dx}{dy}+\frac{2}{1+\tan y}\,x=1.$$ This is linear in $x$. Write $\dfrac{2}{1+\tan y}=\dfrac{2\cos y}{\cos y+\sin y}=1+\dfrac{\cos y-\sin y}{\cos y+\sin y}$, which makes the integral easy: $$\int\frac{2}{1+\tan y}\,dy=y+\log(\sin y+\cos y).$$ The integrating factor is therefore $e^y(\sin y+\cos y)$. Then $$x\,e^y(\sin y+\cos y)=\int e^y(\sin y+\cos y)\,dy=e^y\sin y+c,$$ because $\dfrac{d}{dy}(e^y\sin y)=e^y(\sin y+\cos y)$. Dividing by $e^y$,

$$x(\sin y+\cos y)=\sin y+c\,e^{-y}$$

Question 27

Solve: $\dfrac{dy}{dx}=\cos(x+y)+\sin(x+y)$.

Solution. The right side depends only on $x+y$, so put $z=x+y$. Then $\dfrac{dz}{dx}=1+\dfrac{dy}{dx}$ and the equation becomes $$\frac{dz}{dx}=1+\cos z+\sin z.$$ Use half-angles: $1+\cos z=2\cos^2\dfrac z2$ and $\sin z=2\sin\dfrac z2\cos\dfrac z2$, so $$1+\cos z+\sin z=2\cos^2\frac z2\left(1+\tan\frac z2\right).$$ Separating variables, $\dfrac{dz}{2\cos^2\frac z2\left(1+\tan\frac z2\right)}=dx$. Let $t=\tan\dfrac z2$, so $dt=\dfrac12\sec^2\dfrac z2\,dz$; the left side is then exactly $\dfrac{dt}{1+t}$. Integrating, $\log|1+t|=x+c$. Replacing $z$ by $x+y$,

$$\log\left|1+\tan\frac{x+y}{2}\right|=x+c$$

Question 28

Find the general solution of $\dfrac{dy}{dx}-3y=\sin2x$.

Solution. The equation is already linear with $P=-3$ and $Q=\sin2x$. The integrating factor is $e^{-3x}$, so $$y\,e^{-3x}=\int e^{-3x}\sin2x\,dx.$$ Using the standard result $\int e^{ax}\sin bx\,dx=\dfrac{e^{ax}(a\sin bx-b\cos bx)}{a^2+b^2}$ with $a=-3$, $b=2$: $$\int e^{-3x}\sin2x\,dx=\frac{e^{-3x}(-3\sin2x-2\cos2x)}{13}.$$ Multiplying by $e^{3x}$ and adding the constant term,

$$y=-\frac{3\sin2x+2\cos2x}{13}+c\,e^{3x}$$

Question 29

Find the equation of a curve passing through $(2,1)$ if the slope of the tangent to the curve at any point $(x,y)$ is $\dfrac{x^2+y^2}{2xy}$.

Solution. The condition is $\dfrac{dy}{dx}=\dfrac{x^2+y^2}{2xy}$. The right side is a function of $\dfrac yx$, so the equation is homogeneous. Put $y=vx$, so $\dfrac{dy}{dx}=v+x\dfrac{dv}{dx}$: $$v+x\frac{dv}{dx}=\frac{1+v^2}{2v}\quad\Rightarrow\quad x\frac{dv}{dx}=\frac{1-v^2}{2v}.$$ Separating, $\dfrac{2v\,dv}{1-v^2}=\dfrac{dx}{x}$, and integrating gives $-\log|1-v^2|=\log|x|+c_1$, so $x(1-v^2)=C$. Putting $v=\dfrac yx$ back, $\dfrac{x^2-y^2}{x}=C$, that is $x^2-y^2=Cx$. The curve passes through $(2,1)$, so $3=2C$ and $C=\dfrac32$.

$$2(x^2-y^2)=3x$$

Question 30

Find the equation of the curve through the point $(1,0)$ if the slope of the tangent to the curve at any point $(x,y)$ is $\dfrac{y-1}{x^2+x}$.

Solution. We need $\dfrac{dy}{dx}=\dfrac{y-1}{x(x+1)}$, which is variables separable: $$\frac{dy}{y-1}=\frac{dx}{x(x+1)}=\left(\frac1x-\frac1{x+1}\right)dx$$ by partial fractions. Integrating, $\log|y-1|=\log\left|\dfrac{x}{x+1}\right|+\log|k|$, so $y-1=\dfrac{kx}{x+1}$. At $(1,0)$: $-1=\dfrac k2$, so $k=-2$. Then $(y-1)(x+1)=-2x$.

$$(y-1)(x+1)+2x=0$$

Question 31

Find the equation of a curve passing through the origin if the slope of the tangent to the curve at any point $(x,y)$ is equal to the square of the difference of the abscissa and ordinate of the point.

Solution. The slope condition is $\dfrac{dy}{dx}=(x-y)^2$. The combination $x-y$ appears, so put $v=x-y$. Then $\dfrac{dv}{dx}=1-\dfrac{dy}{dx}=1-v^2$, which separates: $$\frac{dv}{1-v^2}=dx\quad\Rightarrow\quad\frac12\log\left|\frac{1+v}{1-v}\right|=x+c.$$ The curve passes through the origin, where $v=0$ and $x=0$, so $c=0$. Hence $\dfrac{1+v}{1-v}=e^{2x}$, and with $v=x-y$,

$$\frac{1+x-y}{1-x+y}=e^{2x}$$

The key prints this as $k\,e^{2x}(1-x+y)=1+x-y$ and then takes $k=1$, which is the same relation.

Question 32

Find the equation of a curve passing through the point $(1,1)$. If the tangent drawn at any point $P(x,y)$ on the curve meets the co-ordinate axes at $A$ and $B$ such that $P$ is the mid-point of $AB$.

Solution. Since $P(x,y)$ is the mid-point of $AB$ with $A$ on the $x$-axis and $B$ on the $y$-axis, we must have $A=(2x,0)$ and $B=(0,2y)$. The tangent is the line $AB$, so its slope is $$\frac{dy}{dx}=\frac{2y-0}{0-2x}=-\frac yx.$$ Separating variables, $\dfrac{dy}{y}=-\dfrac{dx}{x}$, so $\log|y|=-\log|x|+\log|c|$, that is $xy=c$. The curve passes through $(1,1)$, so $c=1$.

$$xy=1$$

Question 33

Solve: $x\dfrac{dy}{dx}=y\,(\log y-\log x+1)$.

Solution. Combine the logarithms: $\dfrac{dy}{dx}=\dfrac yx\left(\log\dfrac yx+1\right)$, a homogeneous equation. Put $y=vx$: $$v+x\frac{dv}{dx}=v(\log v+1)\quad\Rightarrow\quad x\frac{dv}{dx}=v\log v.$$ Separating, $\dfrac{dv}{v\log v}=\dfrac{dx}{x}$. The left side integrates to $\log|\log v|$, so $\log|\log v|=\log|x|+\log|c|$, which gives $\log v=cx$. With $v=\dfrac yx$,

$$\log\frac yx=cx$$

The key prints $\log\dfrac xy=cx$; this is the same family with $c$ replaced by $-c$.

Common mistakes

  • Dropping the integrating factor’s exponential form. In Question 26 the integral of $\dfrac{2}{1+\tan y}$ is not obvious until it is rewritten as $1+\dfrac{\cos y-\sin y}{\cos y+\sin y}$; trying to integrate it as it stands stalls the question.
  • Forgetting to divide by $x$ in Question 25. The equation $x\,y’+2y=\dots$ is not in standard form; the integrating factor $x^2$ comes from $P=\dfrac2x$, not from $2$. Using the unreduced coefficients gives the wrong factor.
  • Differentiating the substitution wrongly. For $z=x+y$ and $v=x-y$ the derivative is $1+\dfrac{dy}{dx}$ and $1-\dfrac{dy}{dx}$ respectively. Writing $\dfrac{dz}{dx}=\dfrac{dy}{dx}$ loses the constant $1$ that makes the equation separable.
  • Applying the condition too early or not at all. In Questions 29, 30 and 31 the constant must be fixed after the general solution is found, and with the original variables (not $v$) substituted back. Question 31 takes $c=0$ only because $v=0$ at the origin.
  • Misplacing the mid-point in Question 32. If $P(x,y)$ is the mid-point of $AB$ with $A$ on the $x$-axis and $B$ on the $y$-axis, then $A=(2x,0)$ and $B=(0,2y)$, not $(x,0)$ and $(0,y)$. Writing the slope of $AB$ as $\dfrac{2y-0}{0-2x}=-\dfrac yx$ only works once the intercepts are placed correctly.
  • Losing absolute values and constants of integration. Logs like $\log|y-1|$ are combined with $\log|k|$, not $+k$; mixing the two changes the form of the answer.

Practise next

Done with this exercise? Try the short quiz on the whole chapter — free, no sign-in needed.