How to solve the Ordinary Differential Equation: du/dx = cos(u) + 1 I have been trying to solve the ODE
$$\frac {du}{dx} = 1 + \cos u. $$
To solve it, I divided through by $1 + \cos u$ to give
$$\frac{1} {1 + \cos u } \frac{du}{dx} = 1,$$ and then tried to integrate both sides.
However, I have gotten quite stuck when trying to evaluate the integral of $1/ (1 + \cos u )$.
I tried multiplying the integrand by $\dfrac{\cos u -1} {\cos u -1}$, but that led to the integral becoming
$$ \int \frac{\tan u} {\sin^2u} \, du - \int du$$
and I didn't know how to evaluate the first integral,
$$\int \frac{\tan u} {\sin^2u} \,du.$$
So, I would really appreciate it if someone could tell me how to go about solving this ODE. Thanks!
 A: Your algebra isn't correct so far. Multiplying the integrand by the factor you've listed actually gives
$$\int\frac{\cos{u} - 1}{\cos^2{u} -1} du = \int\frac{\cos{u} - 1}{-\sin^2{u}} du$$
which can then be separated as
$$\int\frac{1}{\sin^2{u}} du - \int \frac{\cos{u}}{\sin^2{u}} du$$
The first integral is the same as integrating $\csc^2{u}$, which gives $-\cot{u}$; the second integral can be done by substituting for $\sin u$.
A: The question seems to be "how to find a primitive of $t\mapsto1/(1+\cos t)$", rather than "how to solve the ODE". The answer to this is that:

Every rational fraction in $(\cos t,\sin t)$ can be solved by the change of variable $z=\tan(t/2)$.

In the present case, $\cos(t)=(1-z^2)/(1+z^2)$ and $2\mathrm dz=(1+z^2)\mathrm dt$ hence
$$
\int\frac{\mathrm dt}{1+\cos t}=\int\mathrm dz=z+C,
$$
and the ODE is solved by
$$
u(x)=2\arctan(x+C).
$$

The approach you describe in the post is to multiply the integrand by $(1-\cos t)/(1-\cos t)$. This does not quite yield what you write but
$$
\int\frac{1-\cos t}{\sin^2t}\mathrm dt=\int\frac{1}{\sin^2t}\mathrm dt-\int\frac{\cos t}{\sin^2t}\mathrm dt.
$$
The last primitive on the RHS is easy since $(1/\sin t)'=-\cos t/\sin^2 t$. The middle one can be solved using the change of variable $s=\tan t$. The final result is as above.
A: It is easier to solve the ode

$$ \frac{dx}{du}=\frac{1}{1+\cos(u)}. $$

Now, just use separation of variables technique. The final solution is

$$ x=\tan(u/2)+c \implies u=2\arctan(x-c). $$

A: $$\int \frac{dx}{\sin^2(x)}
= -\cot(x).$$
Check:
\begin{align*}
\frac{d(\cot(x))}{dx}
&=\frac{d(\cos(x)/\sin(x))}{dx} \\
&=\frac{\sin(x)(-\sin(x))-\cos(x)\cos(x)}{\sin^2(x)}\\
&=\frac{-\sin^2(x)-\cos^2(x)}{\sin^2(x)}\\
&=\frac{-1}{\sin^2(x)}
\end{align*}
