# For each of the exercises given below, verify that the given function (implicit or explicit) is a solution of the corresponding differential equation.

Question:

For each of the exercises given below, verify that the given function (implicit or explicit) is a solution of the corresponding differential equation.

Solution:

(i) $y=a e^{x}+b e^{-x}+x^{2}$

Differentiating both sides with respect to x, we get:

$\frac{d y}{d x}=a \frac{d}{d x}\left(e^{x}\right)+b \frac{d}{d x}\left(e^{-x}\right)+\frac{d}{d x}\left(x^{2}\right)$

$\Rightarrow \frac{d y}{d x}=a e^{x}-b e^{-x}+2 x$

Again, differentiating both sides with respect to x, we get:

$\frac{d^{2} y}{d x^{2}}=a e^{x}+b e^{-x}+2$

Now, on substituting the values of $\frac{d y}{d x}$ and $\frac{d^{2} y}{d x^{2}}$ in the differential equation, we get:

L.H.S.

$x \frac{d^{2} y}{d x^{2}}+2 \frac{d y}{d x}-x y+x^{2}-2$

$=x\left(a e^{x}+b e^{-x}+2\right)+2\left(a e^{x}-b e^{-x}+2 x\right)-x\left(a e^{x}+b e^{-x}+x^{2}\right)+x^{2}-2$

$=\left(a x e^{x}+b x e^{-x}+2 x\right)+\left(2 a e^{x}-2 b e^{-x}+4 x\right)-\left(a x e^{x}+b x e^{-x}+x^{3}\right)+x^{2}-2$

$=2 a e^{x}-2 b e^{-x}+x^{2}+6 x-2$

Hence, the given function is not a solution of the corresponding differential equation.

(ii) $y=e^{x}(a \cos x+b \sin x)=a e^{x} \cos x+b e^{x} \sin x$

Differentiating both sides with respect to x, we get:

$\frac{d y}{d x}=a \cdot \frac{d}{d x}\left(e^{x} \cos x\right)+b \cdot \frac{d}{d x}\left(e^{x} \sin x\right)$

$\Rightarrow \frac{d y}{d x}=a\left(e^{x} \cos x-e^{x} \sin x\right)+b \cdot\left(e^{x} \sin x+e^{x} \cos x\right)$

$\Rightarrow \frac{d y}{d x}=(a+b) e^{x} \cos x+(b-a) e^{x} \sin x$

Again, differentiating both sides with respect to x, we get:

$\frac{d^{2} y}{d x^{2}}=(a+b) \cdot \frac{d}{d x}\left(e^{x} \cos x\right)+(b-a) \frac{d}{d x}\left(e^{x} \sin x\right)$

$\Rightarrow \frac{d^{2} y}{d x^{2}}=(a+b) \cdot\left[e^{x} \cos x-e^{x} \sin x\right]+(b-a)\left[e^{x} \sin x+e^{x} \cos x\right]$

$\Rightarrow \frac{d^{2} y}{d x^{2}}=e^{x}[(a+b)(\cos x-\sin x)+(b-a)(\sin x+\cos x)]$

$\Rightarrow \frac{d^{2} y}{d x^{2}}=e^{x}[a \cos x-a \sin x+b \cos x-b \sin x+b \sin x+b \cos x-a \sin x-a \cos x]$

$\Rightarrow \frac{d^{2} y}{d x^{2}}=\left[2 e^{x}(b \cos x-a \sin x)\right]$

Now, on substituting the values of $\frac{d^{2} y}{d x^{2}}$ and $\frac{d y}{d x}$ in the L.H.S. of the given differential equation, we get:

$\frac{d^{2} y}{d x^{2}}+2 \frac{d y}{d x}+2 y$

$=2 e^{x}(b \cos x-a \sin x)-2 e^{x}[(a+b) \cos x+(b-a) \sin x]+2 e^{x}(a \cos x+b \sin x)$

$=e^{x}\left[\begin{array}{l}(2 b \cos x-2 a \sin x)-(2 a \cos x+2 b \cos x) \\ -(2 b \sin x-2 a \sin x)+(2 a \cos x+2 b \sin x)\end{array}\right]$

$=e^{x}[(2 b-2 a-2 b+2 a) \cos x]+e^{x}[(-2 a-2 b+2 a+2 b) \sin x]$

$=0$

Hence, the given function is a solution of the corresponding differential equation.

(iii) $y=x \sin 3 x$

Differentiating both sides with respect to x, we get:

$\frac{d y}{d x}=\frac{d}{d x}(x \sin 3 x)=\sin 3 x+x \cdot \cos 3 x \cdot 3$

$\Rightarrow \frac{d y}{d x}=\sin 3 x+3 x \cos 3 x$

Again, differentiating both sides with respect to x, we get:

$\frac{d^{2} y}{d x^{2}}=\frac{d}{d x}(\sin 3 x)+3 \frac{d}{d x}(x \cos 3 x)$

$\Rightarrow \frac{d^{2} y}{d x^{2}}=3 \cos 3 x+3[\cos 3 x+x(-\sin 3 x) \cdot 3]$

$\Rightarrow \frac{d^{2} y}{d x^{2}}=6 \cos 3 x-9 x \sin 3 x$

Substituting the value of $\frac{d^{2} y}{d x^{2}}$ in the L.H.S. of the given differential equation, we get:

$\frac{d^{2} y}{d x^{2}}+9 y-6 \cos 3 x$

$=(6 \cdot \cos 3 x-9 x \sin 3 x)+9 x \sin 3 x-6 \cos 3 x$

$=0$

Hence, the given function is a solution of the corresponding differential equation.

(iv) $x^{2}=2 y^{2} \log y$

Differentiating both sides with respect to x, we get:

$2 x=2 \cdot \frac{d}{d x}=\left[y^{2} \log y\right]$

$\Rightarrow x=\left[2 y \cdot \log y \cdot \frac{d y}{d x}+y^{2} \cdot \frac{1}{y} \cdot \frac{d y}{d x}\right]$

$\Rightarrow x=\frac{d y}{d x}(2 y \log y+y)$

$\Rightarrow \frac{d y}{d x}=\frac{x}{y(1+2 \log y)}$

Substituting the value of $\frac{d y}{d x}$ in the L.H.S. of the given differential equation, we get:

$\left(x^{2}+y^{2}\right) \frac{d y}{d x}-x y$

$=\left(2 y^{2} \log y+y^{2}\right) \cdot \frac{x}{y(1+2 \log y)}-x y$

$=y^{2}(1+2 \log y) \cdot \frac{x}{y(1+2 \log y)}-x y$

$=x y-x y$

$=0$

Hence, the given function is a solution of the corresponding differential equation.