Is there a way to solve the following ODE analytically? I'm trying to see if I can solve the following ODE analytically:
$$\frac{dy}{dx}= \sin(x+y) - e^x.$$
If I substitute: $z:= x+y,$ I get:
$$\frac{dz}{dx}= 1 + \sin(z) - e^x.$$
I can't separate the variables, nor I can use any integrating factor, as it's not an exact ODE/ So is there a way?
 A: Let $z=x+y$ ,
Then $y=z-x$
$\dfrac{dy}{dx}=\dfrac{dz}{dx}-1$
$\therefore\dfrac{dz}{dx}-1=\sin z-e^x$
$\dfrac{dz}{dx}=\sin z+1-e^x$
Which is similar as Solving ode similar to Adler's equation and follow the method in http://science.fire.ustc.edu.cn/download/download1/book%5Cmathematics%5CHandbook%20of%20Exact%20Solutions%20for%20Ordinary%20Differential%20EquationsSecond%20Edition%5Cc2972_fm.pdf#page=223:
Let $u=\tan\dfrac{z}{2}$ ,
Then $z=2\tan^{-1}u$
$\dfrac{dz}{dx}=\dfrac{2}{u^2+1}\dfrac{du}{dx}$
$\therefore\dfrac{2}{u^2+1}\dfrac{du}{dx}=\dfrac{2u}{u^2+1}+1-e^x$
$\dfrac{du}{dx}=\dfrac{(1-e^x)u^2}{2}+u+\dfrac{1-e^x}{2}$
Which converts to a Riccati ODE.
Let $u=\dfrac{2}{(e^x-1)v}\dfrac{dv}{dx}$ ,
Then $\dfrac{du}{dx}=\dfrac{2}{(e^x-1)v}\dfrac{d^2v}{dx^2}-\dfrac{2}{(e^x-1)v^2}\left(\dfrac{dv}{dx}\right)^2-\dfrac{2e^x}{(e^x-1)^2v}\dfrac{dv}{dx}$
$\therefore\dfrac{2}{(e^x-1)v}\dfrac{d^2v}{dx^2}-\dfrac{2}{(e^x-1)v^2}\left(\dfrac{dv}{dx}\right)^2-\dfrac{2e^x}{(e^x-1)^2v}\dfrac{dv}{dx}=-\dfrac{2}{(e^x-1)v^2}\left(\dfrac{dv}{dx}\right)^2+\dfrac{2}{(e^x-1)v}\dfrac{dv}{dx}+\dfrac{1-e^x}{2}$
$\dfrac{2}{(e^x-1)v}\dfrac{d^2v}{dx^2}-\dfrac{2(2e^x-1)}{(e^x-1)^2v}\dfrac{dv}{dx}+\dfrac{e^x-1}{2}=0$
$(e^x-1)\dfrac{d^2v}{dx^2}-(2e^x-1)\dfrac{dv}{dx}+\dfrac{(e^x-1)^3}{4}v=0$
Let $t=e^x$ ,
Then $\dfrac{dv}{dx}=\dfrac{dv}{dt}\dfrac{dt}{dx}=e^x\dfrac{dv}{dt}=t\dfrac{dv}{dt}$
$\dfrac{d^2v}{dx^2}=\dfrac{d}{dx}\left(t\dfrac{dv}{dt}\right)=\dfrac{d}{dt}\left(t\dfrac{dv}{dt}\right)\dfrac{dt}{dx}=\left(t\dfrac{d^2v}{dt^2}+\dfrac{dv}{dt}\right)t=t^2\dfrac{d^2v}{dt^2}+t\dfrac{dv}{dt}$
$\therefore(t-1)\left(t^2\dfrac{d^2v}{dt^2}+t\dfrac{dv}{dt}\right)-(2t-1)t\dfrac{dv}{dt}+\dfrac{(t-1)^3}{4}v=0$
$t^2(t-1)\dfrac{d^2v}{dt^2}+t(t-1)\dfrac{dv}{dt}-t(2t-1)\dfrac{dv}{dt}+\dfrac{(t-1)^3}{4}v=0$
$t^2(t-1)\dfrac{d^2v}{dt^2}-t^2\dfrac{dv}{dt}+\dfrac{(t-1)^3}{4}v=0$
$\dfrac{d^2v}{dt^2}-\dfrac{1}{t-1}\dfrac{dv}{dt}+\dfrac{(t-1)^2}{4t^2}v=0$
$\dfrac{d^2v}{dt^2}-\dfrac{1}{t-1}\dfrac{dv}{dt}+\left(\dfrac{1}{4}-\dfrac{1}{2t}+\dfrac{1}{4t^2}\right)v=0$
