Solve the differential equation $d y=\cos x(2-y \operatorname{cosec} x) d x$ given that $y=2$, when $x=\frac{\pi}{2}$.
Given differential equation,
$$\begin{array}{ll} \Rightarrow & \frac{d y}{}=\cos x(2-y \operatorname{cosec} x) d x \\ \Rightarrow & \frac{d y}{d x}=\cos x(2-y \operatorname{cosec} x) \\ \Rightarrow & \frac{d y}{d x}=2 \cos x-y \operatorname{cosec} x \cdot \cos x \\ \Rightarrow & \frac{d y}{d x}+y \cot x=2 \cos x \end{array}$$
which is a linear differential equation.
On comparing it with $\frac{d y}{d x}+P y=Q$, we get
$$\begin{aligned} P & =\cot x, Q=2 \cos x \\ \mathrm{IF} & =e^{\int P d x}=e^{\int \cot x d x}=e^{\log \sin x}=\sin x \end{aligned}$$
The general solution is
$$ \begin{array}{ll} & y \cdot \sin x=\int 2 \cos x \cdot \sin x d x+C \\ \Rightarrow & y \cdot \sin x=\int \sin 2 x d x+C \quad[\because \sin 2 x=2 \sin x \cos x]\\ \Rightarrow & y \cdot \sin x=-\frac{\cos 2 x}{2}+C\quad\text{.... (i)} \end{array}$$
When $x=\frac{\pi}{2}$ and $y=2$, then
$$\begin{aligned} &\begin{aligned} 2 \cdot \sin \frac{\pi}{2} & =-\frac{\cos \left(2 \times \frac{\pi}{2}\right)}{2}+C \\ \Rightarrow\quad 2 \cdot 1 & =+\frac{1}{2}+C \\ \Rightarrow\quad 2-\frac{1}{2} & =C \Rightarrow \frac{4-1}{2}=C \\ \Rightarrow\quad C & =\frac{3}{2} \end{aligned}\\ &\text { On substituting the value of } C \text { in Eq. (i), we get }\\ &y \sin x=-\frac{1}{2} \cos 2 x+\frac{3}{2} \end{aligned}$$
Form the differential equation by eliminating $A$ and $B$ in $$A x^2+B y^2=1$$
Given differential equation is $\quad A x^2+B y^2=1$
On differentiating both sides w.r.t. $x$, we get
$$\begin{aligned} 2 A x+2 B y \frac{d y}{d x} & =0 \\ \Rightarrow\quad 2 B y \frac{d y}{d x} & =-2 A x \\ \Rightarrow\quad B y \frac{d y}{d x} & =-A x \Rightarrow \frac{y}{x} \cdot \frac{d y}{d x}=-\frac{A}{B} \end{aligned}$$
$$\begin{aligned} &\text { Again, differentiating w.r.t. } x \text {, we get }\\ &\begin{aligned} & \frac{y}{x} \cdot \frac{d^2 y}{d x^2}+\frac{d y}{d x} \cdot\left(\frac{x \frac{d y}{d x}-y}{x^2}\right)=0 \\ \Rightarrow \quad & \frac{y}{x} \cdot \frac{d^2 y}{d x^2}+\frac{x\left(\frac{d y}{d x}\right)^2-y\left(\frac{d y}{d x}\right)}{x^2}=0 \\ \Rightarrow \quad & x y \frac{d^2 y}{d x^2}+x\left(\frac{d y}{d x}\right)^2-y\left(\frac{d y}{d x}\right)=0 \\ \Rightarrow \quad & x y y^{\prime \prime}+x\left(y^{\prime}\right)^2-y y^{\prime}=0 \end{aligned} \end{aligned}$$
Solve the differential equation $\left(1+y^2\right) \tan ^{-1} x d x+2 y\left(1+x^2\right) d y=0$.
Given differential equation is
$$\begin{aligned} \Rightarrow & & \left(1+y^2\right) \tan ^{-1} x d x+2 y\left(1+x^2\right) d y & =0 \\ \Rightarrow & & \left(1+y^2\right) \tan ^{-1} x d x & =-2 y\left(1+x^2\right) d y \\ & & \frac{\tan ^{-1} x d x}{1+x^2} & =-\frac{2 y}{1+y^2} d y \end{aligned}$$
On integrating both sides, we get
$$\int \frac{\tan ^{-1} x}{1+x^2} d x=-\int \frac{2 y}{1+y^2} d y$$
Put $\tan ^{-1} x=t$ in LHS, we get
$$\frac{1}{1+x^2} d x=d t$$
and put $1+y^2=u$ in RHS, we get
$$\begin{array}{l} & 2 y d y =d u \\ \Rightarrow & \int t d t =-\int \frac{1}{u} d u \Rightarrow \frac{t^2}{2}=-\log u+C \\ \Rightarrow & \frac{1}{2}\left(\tan ^{-1} x\right)^2 =-\log \left(1+y^2\right)+C \\ \Rightarrow & \frac{1}{2}\left(\tan ^{-1} x\right)^2+\log \left(1+y^2\right) =C \end{array}$$
Find the differential equation of system of concentric circles with centre $(1,2)$.
The family of concentric circles with centre $(1,2)$ and radius $a$ is given by
$$\begin{aligned} & (x-1)^2+(y-2)^2 & =a^2 \\ &\Rightarrow \quad x^2+1-2 x+y^2+4-4 y =a^2 \\ &\Rightarrow \quad x^2+y^2-2 x-4 y+5 =a^2\quad\text{.... (i)} \end{aligned}$$
On differentiating Eq. (i) w.r.t. $x$, we get
$$\begin{array}{rlr} & 2 x+2 y \frac{d y}{d x}-2-4 \frac{d y}{d x}=0 \\ \Rightarrow & (2 y-4) \frac{d y}{d x}+2 x-2=0 \\ \Rightarrow & (y-2) \frac{d y}{d x}+(x-1)=0 \end{array}$$
Solve $y+\frac{d}{d x}(x y)=x(\sin x+\log x)$.
Given differential equation is
$$\begin{array}{cc} & y+\frac{d}{d x}(x y)=x(\sin x+\log x) \\ \Rightarrow & y+x \frac{d y}{d x}+y=x(\sin x+\log x) \\ \Rightarrow & x \frac{d y}{d x}+2 y=x(\sin x+\log x) \\ \Rightarrow & \frac{d y}{d x}+\frac{2}{x} y=\sin x+\log x \end{array}$$
which is a linear differential equation.
On comparing it with $\quad \frac{d y}{d x}+P y=Q$, we get
$$\begin{aligned} & P=\frac{2}{x}, Q=\sin x+\log x \\ & \text { IF }=e^{\int \frac{2}{x} \frac{2 x}{x}}=e^{2 \log x}=x^2 \end{aligned}$$
The general solution is
$$ \begin{array}{ll} & y \cdot x^2=\int(\sin x+\log x) x^2 d x+C \\ \Rightarrow & y \cdot x^2=\int\left(x^2 \sin x+x^2 \log x\right) d x+C \\ \Rightarrow & y \cdot x^2=\int x^2 \sin x d x+\int x^2 \log x d x+C \\ \Rightarrow\quad & y \cdot x^2=I_1+I_2+C\quad\text{.... (i)} \end{array}$$
$$ \begin{aligned} &\begin{aligned} \text { Now, } \quad & I_1 =\int x^2 \sin x d x \\ & =x^2(-\cos x)+\int 2 x \cos x d x \\ & =-x^2 \cos x+\left[2 x(\sin x)-\int 2 \sin x d x\right] \\ & I_1 =-x^2 \cos x+2 x \sin x+2 \cos x \quad\text{.... (ii)}\\ \text { and }\quad & I_2 =\int x^2 \log x d x \end{aligned} \end{aligned}$$
$$\begin{aligned} &\begin{aligned} & =\log x \cdot \frac{x^3}{3}-\int \frac{1}{x} \cdot \frac{x^3}{3} d x \\ & =\log x \cdot \frac{x^3}{3}-\frac{1}{3} \int x^2 d x \\ & =\log x \cdot \frac{x^3}{3}-\frac{1}{3} \cdot \frac{x^3}{3}\quad\text{.... (iii)} \end{aligned}\\ &\text { On substituting the value of } I_1 \text { and } I_2 \text { in Eq. (i), we get }\\ &\begin{aligned} y \cdot x^2 & =-x^2 \cos x+2 x \sin x+2 \cos x+\frac{x^3}{3} \log x-\frac{1}{9} x^3+C \\ \therefore \quad y & =-\cos x+\frac{2 \sin x}{x}+\frac{2 \cos x}{x^2}+\frac{x}{3} \log x-\frac{x}{9}+C x^{-2} \end{aligned} \end{aligned}$$