Find the general solution of $\frac{d y}{d x}+a y=e^{m x}$.
Given differential equation is
$$\frac{d y}{d x}+a y=e^{m x}$$
which is a linear differential equation.
On comparing it with $\quad \frac{d y}{d x}+P y=Q$, we get
$$\begin{aligned} P & =a, Q=e^{m x} \\ \mathrm{IF} & =e^{\int P d x}=e^{\int a d x}=e^{a x} \end{aligned}$$
The general solution is $\quad y \cdot e^{a x}=\int e^{m x} \cdot e^{a x} d x+C$
$$\begin{array}{l} \Rightarrow & y \cdot e^{a x}=\int e^{(m+a) x} d x+C \\ \Rightarrow & y \cdot e^{a x}=\frac{e^{(m+a) x}}{(m+a)}+C \\ \Rightarrow & (m+a) y=\frac{e^{(m+a) x}}{e^{a x}}+\frac{(m+a) C}{e^{a x}} \\ \Rightarrow & (m+a) y=e^{m x}+K e^{-a x}\quad [\because K=(m+a) C] \end{array}$$
Solve the differential equation $\frac{d y}{d x}+1=e^{x+y}$.
Given differential equation is $\quad \frac{d y}{d x}+1=e^{x+y}\quad\text{.... (i)}$
On substituting $x+y=t$, we get
$$1+\frac{d y}{d x}=\frac{d t}{d x}$$
Eq. (i) becomes $$\frac{d t}{d x}=e^t$$
$$ \begin{array}{ll} \Rightarrow & e^{-t} d t=d x \\ \Rightarrow & -e^{-t}=x+C \\ \Rightarrow & \frac{-1}{e^{x+y}}=x+C \\ \Rightarrow & -1=(x+C) e^{x+y}\\ \Rightarrow & (x+C) e^{x+y}+1=0 \end{array}$$
Solve $y d x-x d y=x^2 y d x$.
$$\begin{aligned} &\text { Given that, }\quad y d x-x d y=x^2 y d x\\ &\begin{array}{l} \Rightarrow & \frac{1}{x^2}-\frac{1}{x y} \cdot \frac{d y}{d x}=1 \quad \text { [dividing throughout by } x^2 y d x \text { ] }\\ \Rightarrow & -\frac{1}{x y} \cdot \frac{d y}{d x}+\frac{1}{x^2}-1=0 \\ \Rightarrow & \frac{d y}{d x}-\frac{x y}{x^2}+x y=0 \\ \Rightarrow & \frac{d y}{d x}-\frac{y}{x}+x y=0 \\ \Rightarrow & \frac{d y}{d x}+\left(x-\frac{1}{x}\right) y=0 \end{array} \end{aligned}$$
which is a linear differential equation.
On comparing it with $\frac{d y}{d x}+P y=Q$, we get
$$\begin{aligned} P & =\left(x-\frac{1}{x}\right), Q=0 \\ \mathrm{IF} & =e^{\int P d x} \\ & =e^{\int\left(x-\frac{1}{x}\right) d x} \\ & =e^{\frac{x^2}{2}-\log x} \\ & =e^{\frac{x^2}{x}}, e^{-\log x} \\ & =\frac{1}{x} e^{\frac{x^2}{2}} \end{aligned}$$
$$\begin{aligned} &\text { The general solution is }\\ &\begin{array}{l} & y \cdot \frac{1}{x} e^{x^2 / 2} =\int 0 \cdot \frac{1}{x} e^{x^2 / 2} d x+C \\ \Rightarrow & y \cdot \frac{1}{x} e^{x^2 / 2} =C \\ \Rightarrow & y =C x e^{-x^2 / 2} \end{array} \end{aligned}$$
Solve the differential equation $\frac{d y}{d x}=1+x+y^2+x y^2$, when $y=0$ and $x=0$.
$$\begin{aligned} \text{Given that,}\quad \frac{d y}{d x} & =1+x+y^2+x y^2 \\ \Rightarrow\quad\frac{d y}{d x} & =(1+x)+y^2(1+x) \\ \Rightarrow\quad\frac{d y}{d x} & =\left(1+y^2\right)(1+x) \\ \Rightarrow\quad\frac{d y}{1+y^2} & =(1+x) d x \end{aligned}$$
$$\begin{aligned} &\text { On integrating both sides, we get }\\ &\tan ^{-1} y=x+\frac{x^2}{2}+K\quad\text{.... (i)} \end{aligned}$$
When $y=0$ and $x=0$, then substituting these values in Eq. (i), we get
$$\begin{aligned} \tan ^{-1}(0) & =0+0+K \\ \Rightarrow \quad K & =0 \\ \Rightarrow \quad \tan ^{-1} y & =x+\frac{x^2}{2} \\ \Rightarrow \quad y & =\tan \left(x+\frac{x^2}{2}\right) \end{aligned}$$
Find the general solution of $\left(x+2 y^3\right) \frac{d y}{d x}=y$.
Given that, $$\left(x+2 y^3\right) \frac{d y}{d x}=y$$
$$\begin{array}{ll} \Rightarrow & y \cdot \frac{d x}{d y}=x+2 y^3 \\ \Rightarrow & \frac{d x}{d y}=\frac{x}{y}+2 y^2 \quad\text{[dividing throughout by y]}\\ \Rightarrow & \frac{d x}{d y}-\frac{x}{y}=2 y^2 \end{array}$$
which is a linear differential equation.
On comparing it with $\frac{d x}{d y}+P x=Q$, we get
$$ \begin{aligned} P & =-\frac{1}{y}, Q=2 y^2 \\ \mathrm{IF} & =e^{\int-\frac{1}{y} d y}=e^{-\int \frac{1}{y} d y} \\ \therefore\quad & =e^{-\log y}=\frac{1}{y} \end{aligned}$$
$$\begin{array}{ll} \text { The general solution is } & x \cdot \frac{1}{y}=\int 2 y^2 \cdot \frac{1}{y} d y+C \\ \Rightarrow & \frac{x}{y}=\frac{2 y^2}{2}+C \\ \Rightarrow & \frac{x}{y}=y^2+C \\ \Rightarrow & x=y^3+C y \end{array}$$