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}$$
Find the equation of a curve passing through 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 abcissa and ordinate of the point.
Slope of tangent to the curve $=\frac{d y}{d x}$
and difference of abscissa and ordinate $=x-y$
According to the question,
$$\frac{d y}{d x}=(x-y)^2\quad\text{.... (i)}$$
$$\begin{aligned} & \text { Put } \quad x-y=z \\ & \Rightarrow\quad 1-\frac{d y}{d x}=\frac{d z}{d x} \\ & \Rightarrow \quad\frac{d y}{d x}=1-\frac{d z}{d x} \end{aligned}$$
On substituting these values in Eq. (i), we get
$$\begin{array}{rlrl} & 1-\frac{d z}{d x} =z^2 \\ \Rightarrow & 1-z^2 =\frac{d z}{d x} \\ \Rightarrow & d x =\frac{d z}{1-z^2} \end{array}$$
On integrating both sides, we get
$$ \begin{aligned} \int d x & =\int \frac{d z}{1-z^2} \\ \Rightarrow\quad x & =\frac{1}{2} \log \left|\frac{1+z}{1-z}\right|+C \\ \Rightarrow\quad \mathrm{t} x & =\frac{1}{2} \log \left|\frac{1+x-y}{1-x+y}\right|+C\quad\text{... (ii)} \end{aligned}$$
Since, the curve passes through the origin.
$$\begin{array}{lc} \therefore & 0=\frac{1}{2} \log \left|\frac{1+0-0}{1-0+0}\right|+C \\ \Rightarrow & C=0 \end{array}$$
On substituting the value of $C$ in Eq. (ii), we get
$$\begin{array}{rlrl} & x =\frac{1}{2} \log \left|\frac{1+x-y}{1-x+y}\right| \\ \Rightarrow & 2 x =\log \left|\frac{1+x-y}{1-x+y}\right| \\ \Rightarrow \quad & e^{2 x} =\left|\frac{1+x-y}{1-x+y}\right| \\ \Rightarrow \quad & (1-x+y) e^{2 x} =1+x-y \end{array}$$