Solve the differential equation $$\frac{dy}{dx}=5+xy+2x+2y$$ Given $y(0)=0$
My try:
The given equation can be written as:
$$\frac{dy}{dx}=1+(x+2)(y+2)$$
Letting $X=x+2$ and $Y=y+2$ we get $dy=dY$ and $dx=dX$
So the equation becomes
$$\frac{dY}{dX}=1+XY$$ or
$$\frac{dY}{dX}-XY=1$$ which is a linear differential equation of first order:
The integrating factor is
$$I(X)=e^{\frac{-X^2}{2}}$$
The solution is:
$$Ye^{\frac{-X^2}{2}}=\int e^{\frac{-X^2}{2}}dx+C$$
How to continue here?
The integral you have on the RHS is called the error function, defined by $$\text{erf}(z)=\frac2{\sqrt\pi}\int_0^z e^{-x^2}\mathrm dx$$So in this case, you have found $\sqrt\frac{\pi}2\text{erf}(X/\sqrt2)$. Therefore the solution in terms of $X,Y$ is $$Y=\sqrt\frac\pi2e^{\frac{X^2}2}\text{erf}\left(\frac X{\sqrt2}\right)+Ce^{\frac{X^2}2}$$Then sub back $x$ and $y$ to get the final solution.