Differential Equation of the Form $\frac{dy}{dx}=\sin(x+y)$ I have been attempting to solve the above differential equation for some time now, and I remain stuck on one step. After substituting $u=x+y$, separating the variables, and integrating both sides, I am left with $$\frac{\sin(u)-1}{\cos(u)}=x+c$$ I have to solve for $y$, and thus, for $u$, but I cannot think of any identity which helps me here. Any help would be appreciated.
I followed the step in the solution, and set $$\frac{\tan(\frac{u}{2})-1}{\tan(\frac{u}{2})+1}=x+c$$ Then, I used the substitution $z=\frac{1}{1+\tan(\frac{u}{2})}$, which led to $1-2z=c+x$, which in turn, simplified to $z=\frac{1}{2}-\frac{c}{2}-\frac{x}{2}$. Then, substituting back: $$u=-2\arctan\left(1-\frac{1}{\frac{1}{2}-\frac{c}{2}-\frac{x}{2}} \right)$$ Thus, for all $n \in \mathbb Z$, the solution of the differential equation is $$y=-x-2\arctan\left(\frac{c+x+1}{c+x-1}\right)+2\pi n$$ Is my process correct, and do I require the $2\pi n$ generalization in my final expression?
Edit: The solution can also be expressed in indefinite form as $$\tan(x+y)-\sec(x+y)=x+c$$
 A: Note that $$\dfrac{\sin(u)-1}{\cos(u)} = \dfrac{\sin(u/2)-\cos(u/2)}{\sin(u/2)+\cos(u/2)} = \dfrac{\tan(u/2)-1}{\tan(u/2)+1}$$
A: Let me sketch a different approach to this differential equation, that you might consider useful another time:
Differentiating the differential equation gives
$$
y''=\cos(x+y)(1+y').
$$
Thus
$$
(y'')^2=\cos^2(x+y)(1+y')^2=(1-\sin^2(x+y))(1+y')^2=(1-y')(1+y')^3.
$$
Next, let $v=y'$. You have the separable differential equation
$$
\pm\frac{v'}{\sqrt{(1-v)(1+v)^3}}=1,
$$
so
$$
\pm\frac{1-v^2}{\sqrt{(1-v)(1+v)^3}}=x+C_1.
$$
Solving for $v$, we find that
$$
v=\frac{1-C_1^2-2C_1x-x^2}{1+C_1^2+2C_1x+x^2}.
$$
Changing back to $y'=v$ and integrating, we find that
$$
y(x)=2\arctan(x+C_1)-x+C_2.
$$
This is one constant too much (that we have to pay because of differentiating in the beginning). With $x=0$, we get $y'(0)=\sin y(0)$. This lets you express $C_2$ in terms of $C_1$.
A: The solution can be simplified by using the identity
$$
1+\sin(x) = 2 \cos^2\!\left(\frac{x}{2} -  \frac{\pi}{4}\right)
$$
Then after separation and integration, you'll have
$$
\tan\left(\frac{u}{2} - \frac{\pi}{4}\right) = x + c
$$
and ultimately
$$
y = 2\,\,\text{arctan}(x+c) + \frac{\pi}{2} - x
$$
