# What is a particular solution to the differential equation dy/dx=cosxe^(y+sinx) with y(0)=0?

Jul 16, 2016

$y = \ln \left(\frac{1}{2 - {e}^{\sin x}}\right)$

#### Explanation:

this is separable!!

$\frac{\mathrm{dy}}{\mathrm{dx}} = \cos x \setminus {e}^{y + \sin x}$

split the exponent...so
$\frac{\mathrm{dy}}{\mathrm{dx}} = \cos x \setminus {e}^{y} \setminus {e}^{\sin} x$

${e}^{-} y \setminus \frac{\mathrm{dy}}{\mathrm{dx}} = \cos x \setminus {e}^{\sin} x$

and this is separated, so next...integrate each side wrt x

$\int \setminus {e}^{-} y \setminus \frac{\mathrm{dy}}{\mathrm{dx}} \setminus \mathrm{dx} = \int \setminus \cos x \setminus {e}^{\sin} x \setminus \mathrm{dx}$

$\int \setminus {e}^{-} y \setminus \mathrm{dy} = \int \setminus \cos x \setminus {e}^{\sin} x \setminus \mathrm{dx}$

$- {e}^{-} y = \textcolor{red}{\int \setminus \cos x \setminus {e}^{\sin} x \setminus \mathrm{dx}} q \quad \triangle$

we can do the red RHS in a number of ways, the more laboured involving some kind of sub: $u = \sin x$

but before we do that, just note that

$\frac{d}{\mathrm{dx}} {e}^{f \left(x\right)} = f ' \left(x\right) {e}^{f \left(x\right)}$ and therefore
$\int \setminus \frac{d}{\mathrm{dx}} {e}^{f \left(x\right)} \setminus \mathrm{dx} = \int \setminus f ' \left(x\right) {e}^{f \left(x\right)} \setminus \mathrm{dx}$

OR

${e}^{f \left(x\right)} = \int \setminus f ' \left(x\right) {e}^{f \left(x\right)} \setminus \mathrm{dx} + C$

if you see that, brilliant. the job is done!

if not :-((

well, then we go with $\triangle$ but with a sub as mentioned. $u = \sin x , \mathrm{du} = \cos x \setminus \mathrm{dx} , \textcolor{b l u e}{u ' = \cos x}$ so $\triangle$ becomes

$- {e}^{-} y = \int \setminus u ' \setminus {e}^{u} \setminus \frac{1}{u '} \setminus \mathrm{du} = \int \setminus {e}^{u} \setminus \mathrm{du}$

$\implies - {e}^{-} y = {e}^{u} + C = {e}^{\sin x} + C$

So, to tidy it all up....

${e}^{-} y = C - {e}^{\sin x}$

$\ln \left({e}^{-} y\right) = \ln \left(C - {e}^{\sin x}\right)$

$- y = \ln \left(C - {e}^{\sin x}\right)$

$y = \ln \left(\frac{1}{C - {e}^{\sin x}}\right)$

so ${y}_{o} = 0$ means that

$0 = \ln \left(\frac{1}{C - 1}\right)$ so $C = 2$

$y = \ln \left(\frac{1}{2 - {e}^{\sin x}}\right)$