Method of Characteristics - Lagrange-Charpit Equations I need to solve the following PDE with initial condition $U(x,0)=U_0(x)$. Once this is one of my first times, I'd like to get second opinions.
Many Thanks.

\begin{equation} \partial_t U +  (\text{cos}(t)+1)\partial_x U = -2,
\end{equation}
The characteristic curves are given by Lagrange-Charpit equations:
  \begin{equation}
\dfrac{dt}{1}=\dfrac{dx}{(\text{cos}(t)+1)}=\dfrac{dU}{-2},\qquad(i)
\end{equation}
Following: \begin{equation} \dfrac{dU}{dt}=-2.\qquad(ii)
\end{equation}
Solving this EDO \begin{equation} U(x(t),t)=-t+c_1\qquad(iii)
 \end{equation}
By other hand: \begin{equation} \dfrac{dx}{dt}=(\cos(t)+1).\qquad(iv)
 \end{equation}
So: \begin{equation} x(t)= t+\sin (t)+c_2.\qquad(v) \end{equation}
Setting $x(0)=x_0$, we get $c_2=x_0$. So, the characterhistics are
  given by: \begin{equation}x(t)=t+\sin (t)+x_0.\qquad(vi)\end{equation}
The whole solutions is given by: 
  \begin{equation}
U(x,t)=-t+U_0(x_0)=-t+U_0\bigg(x-t+\sin (t)\bigg).\qquad(vii)
\end{equation}


Note that while $U(x,0) = U_0(x)$, the PDE itself isn't satisfied.
\begin{align}
U_t + (1 + \cos t)U_x &= -1 + U_0'(x - t + \sin t)(-1 + \cos t) + U_0'(x - t + \sin t)(1 + \cos t) \\
&= -1 + 2\cos t \ U_0'(x - t + \sin t) \\
&\not \equiv -2.
\end{align}
But
$$
\frac{\mathrm{d}U}{\mathrm{d}t} = -2 \implies U(x(t),t) = -2t + c_1
$$
and
$$
x(t) = t + \sin t + x_0 \implies x_0 = x(t) - t - \sin t.
$$
