# How do you solve the separable differential equation dy/dx=(cosx)e^(y+sinx)?

Mar 13, 2017

$y = \ln \left(\frac{1}{A - {e}^{\sin} x}\right)$ is the General Solution

#### Explanation:

We have:

$\frac{\mathrm{dy}}{\mathrm{dx}} = \left(\cos x\right) {e}^{y + \sin x}$
$\frac{\mathrm{dy}}{\mathrm{dx}} = \left(\cos x\right) {e}^{y} {e}^{\sin} x$

Which is a First Order Separable Differential Equation, which we can rewrite as:

$\frac{1}{e} ^ y \frac{\mathrm{dy}}{\mathrm{dx}} = \left(\cos x\right) {e}^{\sin} x$

We can then "separate the variables" to get:

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

Which we can directly (and easily) integrate to get:

$- {e}^{-} y = {e}^{\sin} x + B$

$\therefore {e}^{-} y = A - {e}^{\sin} x$

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

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

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

Mar 13, 2017

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

#### Explanation:

To "separate" a differential equation means to move all the terms with $y$ to one side of the equation, and all the terms with $x$ to the other side of the equation.

We treat $\frac{\mathrm{dy}}{\mathrm{dx}}$ as a division problem, so we can move the $\mathrm{dx}$ to the other side of the equation, leaving just $\mathrm{dy}$.

To separate this, we also need to split up ${e}^{y + \sin x}$ as ${e}^{y} \left({e}^{\sin} x\right)$.

$\frac{\mathrm{dy}}{\mathrm{dx}} = \left(\cos x\right) {e}^{y + \sin x}$

$\mathrm{dy} = \left(\cos x\right) {e}^{y} \left({e}^{\sin} x\right) \mathrm{dx}$

$\frac{\mathrm{dy}}{e} ^ y = \left(\cos x\right) {e}^{\sin} x \mathrm{dx}$

Now we can integrate both sides:

$\int {e}^{-} y \mathrm{dy} = \int {e}^{\sin} x \left(\cos x\right) \mathrm{dx}$

For the left-hand side, use the substitution $u = - y$, implying that $\mathrm{du} = - \mathrm{dy}$.

$- \int {e}^{-} y \left(- \mathrm{dy}\right) = \int {e}^{\sin} x \cos x \mathrm{dx}$

$- \int {e}^{u} = \int {e}^{\sin} x \cos x \mathrm{dx}$

$- {e}^{u} = \int {e}^{\sin} x \cos x \mathrm{dx}$

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

Following a similar process on the right, let $t = \sin x$ so $\mathrm{dx} = \cos x \mathrm{dx}$.

$- {e}^{-} y = \int {e}^{t} \mathrm{dt}$

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

Solving for $y$:

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

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

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