Find the general solution of $(1+\tan y)(d x-d y)+2 x d y=0$.
Given differential equation is $(1+\tan y)(d x-d y)+2 x d y=0$
on dividing throughout by $d y$, we get
$$\begin{aligned} & (1+\tan y)\left(\frac{d x}{d y}-1\right)+2 x =0 \\ \Rightarrow \quad& (1+\tan y) \frac{d x}{d y}-(1+\tan y)+2 x =0 \\ \Rightarrow \quad& (1+\tan y) \frac{d x}{d y}+2 x =(1+\tan y) \\ \Rightarrow \quad& \frac{d x}{d y}+\frac{2 x}{1+\tan y} =1 \end{aligned}$$
which is a linear differential equation.
On comparing it with $\frac{d x}{d y}+P x=Q$, we get
$$\begin{aligned} P & =\frac{2}{1+\tan y}, Q=1 \\ \text { IF } & =e^{\int \frac{2}{1+\tan y} d y}=e^{\int \frac{2 \cos y}{\cos y+\sin y} d y} \\ & =e^{\int \frac{\cos y+\sin y+\cos y-\sin y}{\cos y+\sin y} d y} \\ & =e^{\int\left(1+\frac{\cos y-\sin y}{\cos y+\sin y}\right) d y}=e^{y+\log (\cos y+\sin y)} \\ & =e^y \cdot(\cos y+\sin y)\quad \left[\because e^{\log x}=x\right] \end{aligned}$$
The general solution is
$$\begin{array}{ll} & \\ & x \cdot e^y(\cos y+\sin y)=\int 1 \cdot e^y(\cos y+\sin y) d y+C \\ \Rightarrow & x \cdot e^y(\cos y+\sin y)=\int e^y(\sin y+\cos y) d y+C \\ \Rightarrow & x \cdot e^y(\cos y+\sin y)=e^y \sin y+C \quad\left[\because \int e^x\left\{f(x)+f^{\prime}(x)\right\} d x=e^x f(x)\right] \\ \Rightarrow & x(\sin y+\cos y)=\sin y+C e^{-y} \end{array}$$
Solve $\frac{d y}{d x}=\cos (x+y)+\sin (x+y)$.
Given, $$\frac{d y}{d x}=\cos (x+y)+\sin (x+y)\quad\text{.... (i)}$$
Put $\quad x+y=z$
$$\Rightarrow \quad 1+\frac{d y}{d x}=\frac{d z}{d x}$$
On substituting these values in Eq. (i), we get
$$\begin{array}{ll} & \left(\frac{d z}{d x}-1\right)=\cos z+\sin z \\ \Rightarrow & \frac{d z}{d x}=(\cos z+\sin z+1) \\ \Rightarrow \quad & \frac{d z}{\cos z+\sin z+1}=d x \end{array}$$
$$\begin{aligned} &\text { On integrating both sides, we get }\\ &\begin{aligned} & \int \frac{d z}{\cos z+\sin z+1}=\int 1 d x \\ & \Rightarrow \quad \int \frac{d z}{\frac{1-\tan ^2 z / 2}{1+\tan ^2 z / 2}+\frac{2 \tan z / 2}{1+\tan ^2 z / 2}+1}=\int d x \\ & \Rightarrow \quad \int \frac{d z}{\frac{1-\tan ^2 z / 2+2 \tan z / 2+1+\tan ^2 z / 2}{\left(1+\tan ^2 z / 2\right)}}=\int d x \\ & \Rightarrow \quad \int \frac{\left(1+\tan ^2 z / 2\right) d z}{2+2 \tan ^2 z / 2}=\int d x \\ & \Rightarrow \quad \int \frac{\sec ^2 z / 2 d z}{2(1+\tan z / 2)}=\int d x \\ & \text { Put } 1+\tan z / 2=t \Rightarrow \quad\left(\frac{1}{2} \sec ^2 z / 2\right) d z=d t \\ & \Rightarrow \quad \int \frac{d t}{t}=\int d x \\ & \Rightarrow \quad \log |t|=x+C \\ & \Rightarrow \quad \log |1+\tan z / 2|=x+C \\ & \Rightarrow \quad \log \left|1+\tan \frac{(x+y)}{2}\right|=x+C \end{aligned} \end{aligned}$$
Find the general solution of $\frac{d y}{d x}-3 y=\sin 2 x$.
Given, $$\frac{d y}{d x}-3 y=\sin 2 x$$
which is a linear differential equation.
On comparing it with $\frac{d y}{d x}+P y=Q$, we get
$$\begin{aligned} P & =-3, Q=\sin 2 x \\ I F & =e^{-3 \int d x}=e^{-3 x} \end{aligned}$$
The general solution is
$$y\,.\,{e^{ - 3x}} = \int {\mathop {\sin 2x}\limits_I \mathop {{e^{ - 3x}}}\limits_{II} dx} $$
Let $$y\,.\,{e^{ - 3x}} = I\quad\text{.... (i)}$$
$$\therefore\quad I = \int {\mathop {{e^{ - 3x}}}\limits_{II} \mathop {\sin 2x}\limits_I } $$
$$\begin{array}{ll} \Rightarrow & I=\sin 2 x\left(\frac{e^{-3 x}}{-3}\right)-\int 2 \cos 2 x\left(\frac{e^{-3 x}}{-3}\right) d x+C_1 \\ \Rightarrow & I=-\frac{1}{3} e^{-3 x} \sin 2 x+\frac{2}{3} \int e^{-3 x} \cos 2 x d x+C_1 \\ \Rightarrow & I=-\frac{1}{3} e^{-3 x} \sin 2 x+\frac{2}{3}\left(\cos 2 x \frac{e^{-3 x}}{-3}-\int(-2 \sin 2 x) \frac{e^{-3 x}}{-3} d x\right)+C_1+C_2 \\ \Rightarrow & I=-\frac{1}{3} e^{-3 x} \sin 2 x-\frac{2}{9} \cos 2 x e^{-3 x}-\frac{4}{9} I+C^{\prime} \quad \quad \quad\left[\text { where }, C^{\prime}=C_1+C_2\right] \\ \Rightarrow & I+\frac{41}{9} 2=+e^{-3 x}\left(-\frac{1}{3} \sin 2 x-\frac{2}{9} \cos 2 x\right)+C^{\prime} \end{array}$$
$$\begin{aligned} & \Rightarrow \quad \frac{13}{9} I=e^{-3 x}\left(-\frac{1}{3} \sin 2 x-\frac{2}{9} \cos 2 x\right)+C^{\prime} \\ & \Rightarrow \quad I=\frac{9}{13} \mathrm{e}^{-3 x}\left(-\frac{1}{3} \sin 2 x-\frac{2}{9} \cos 2 x\right)+C \quad \left[\text { where } C=\frac{9 C^{\prime}}{13}\right]\\ & \Rightarrow \quad I=\frac{3}{13} e^{-3 x}\left(-\sin 2 x-\frac{2}{3} \cos 2 x\right)+C \\ & \Rightarrow \quad=\frac{3}{13} e^{-3 x} \frac{(-3 \sin 2 x-2 \cos 2 x)}{3}+C \\ & \Rightarrow \quad=\frac{e^{-3 x}}{13}(-3 \sin 2 x-2 \cos 2 x)+C \\ & \Rightarrow \quad I=-\frac{e^{-3 x}}{13}(2 \cos 2 x+3 \sin 2 x)+C \end{aligned}$$
$$\begin{aligned} &\text { On substituting the value of } I \text { in Eq. (i), we get }\\ &\begin{aligned} y \cdot e^{-3 x} & =-\frac{e^{-3 x}}{13}(2 \cos 2 x+3 \sin 2 x)+C \\ \Rightarrow \quad y & =-\frac{1}{13}(2 \cos 2 x+3 \sin 2 x)+C e^{3 x} \end{aligned} \end{aligned}$$
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 $\frac{x^2+y^2}{2 x y}$.
$$\begin{aligned} &\text { It is given that, the slope of tangent to the curve at point }(x, y) \text { is } \frac{x^2+y^2}{2 x y} \text {. }\\ &\begin{array}{lrl} \therefore & \left(\frac{d y}{d x}\right)_{(x, y)} & =\frac{x^2+y^2}{2 x y} \\ \Rightarrow & \frac{d y}{d x} & =\frac{1}{2}\left(\frac{x}{y}+\frac{y}{x}\right) \end{array} \end{aligned}$$
which is homogeneous differential equation.
$$\begin{array}{ll} & \begin{aligned} \text { Put } y & =v x \\ \Rightarrow \quad & \frac{d y}{d x} \end{aligned}=v+x \frac{d v}{d x} \end{array}$$
On substituting these values in Eq. (i), we get
$$\begin{aligned} & v+x \frac{d v}{d x} =\frac{1}{2}\left(\frac{1}{v}+v\right) \\ \Rightarrow \quad & v+x \frac{d v}{d x} =\frac{1}{2}\left(\frac{1+v^2}{v}\right) \\ \Rightarrow \quad & x \frac{d v}{d x} =\frac{1+v^2}{2 v}-v \\ \Rightarrow \quad & x \frac{d v}{d x} =\frac{1+v^2-2 v^2}{2 v} \\ \Rightarrow \quad & x \frac{d v}{d x} =\frac{1-v^2}{2 v} \\ \Rightarrow \quad & \frac{2 v}{1-v^2} d v =\frac{d x}{x} \end{aligned}$$
On integrating both sides, we get
$$\int \frac{2 v}{1-v^2} d v=\int \frac{d x}{x}$$
Put $1-v^2=t$ in LHS, we get
$$-2 v d v=d t$$
$$\begin{array}{lr} \Rightarrow & -\int \frac{d t}{t}=\int \frac{d x}{x} \\ \Rightarrow & -\log t=\log x+\log C \\ \Rightarrow & -\log \left(1-v^2\right)=\log x+\log C \\ \Rightarrow & -\log \left(1-\frac{y^2}{x^2}\right)=\log x+\log C \\ \Rightarrow & \log \left(\frac{x^2-y^2}{x^2}\right)=\log x+\log C \\ \Rightarrow & \left.\frac{x^2}{x^2-y^2}\right)=\log x+\log C \\ \Rightarrow & \frac{x^2}{x^2-y^2}=C x\quad\text{.... (i)} \end{array}$$
Since, the curve passes through the point $(2,1)$.
$$\therefore \quad \frac{(2)^2}{(2)^2-(1)^2}=C(2) \Rightarrow C=\frac{2}{3}$$
So, the required solution is $2\left(x^2-y^2\right)=3 x$.
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 $\frac{y-1}{x^2+x}$.
It is given that, slope of tangent to the curve at any point $(x, y)$ is $\frac{y-1}{x^2+x}$.
$$\begin{array}{lr} \therefore & \left(\frac{d y}{d x}\right)_{(x, y)}=\frac{y-1}{x^2+x} \\ \Rightarrow & \frac{d y}{d x}=\frac{y-1}{x^2+x} \\ \Rightarrow & \frac{d y}{y-1}=\frac{d x}{x^2+x} \end{array}$$
On integrating both sides, we get
$$\begin{array}{ll} \Rightarrow & \int \frac{d y}{y-1}=\int \frac{d x}{x^2+x} \\ \Rightarrow & \int \frac{d y}{y-1}=\int \frac{d x}{x(x+1)} \\ \Rightarrow & \int \frac{d y}{y-1}=\int\left(\frac{1}{x}-\frac{1}{x+1}\right) d x \\ \Rightarrow & \log (y-1)=\log x-\log (x+1)+\log C \\ \Rightarrow & \log (y-1)=\log \left(\frac{x C}{x+1}\right) \end{array}$$
$$\begin{aligned} &\text { Since, the given curve passes through point }(1,0) \text {. }\\ &\therefore \quad 0-1=\frac{1 \cdot C}{1+1} \Rightarrow C=-2 \end{aligned}$$
$$\begin{aligned} & \text { The particular solution is } \quad y-1=\frac{-2 x}{x+1} \\ &\begin{aligned} \Rightarrow \quad (y-1)(x+1) & =-2 x \\ \Rightarrow \quad(y-1)(x+1)+2 x & =0 \end{aligned} \end{aligned}$$