# Solve the differential equation  (dy)/(dx) + x tan(y+x) = 1 ?

Jun 4, 2016

One solution is $y \left(x\right) = x + \arcsin \left({e}^{- \frac{1}{2} {x}^{2} + C}\right)$

#### Explanation:

First we make the variable change $z \left(x\right) = y \left(x\right) - x$ and

$\frac{\mathrm{dz}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{dx}} - 1$

substituting

$1 + \frac{\mathrm{dz}}{\mathrm{dx}} + x \tan \left(z\right) = 1 \equiv \frac{\mathrm{dz}}{\mathrm{dx}} + x \tan \left(z\right) = 0$

grouping

$\frac{\mathrm{dz}}{\tan \left(z\right)} = - x \mathrm{dx} \equiv \frac{d}{\mathrm{dx}} \left({\log}_{e} \left(\sin \left(z\right)\right)\right) = - \frac{d}{\mathrm{dx}} \left(\frac{1}{2} {x}^{2}\right)$
${\log}_{e} \sin \left(z\right) = - \frac{1}{2} {x}^{2} + C \to \sin \left(z\right) = {e}^{- \frac{1}{2} {x}^{2} + C}$

and finally

$z \left(x\right) = y \left(x\right) - x = \arcsin \left({e}^{- \frac{1}{2} {x}^{2} + C}\right)$

then

$y \left(x\right) = x + \arcsin \left({e}^{- \frac{1}{2} {x}^{2} + C}\right)$