Partial Differential Equation $u_t+u_x=\cos(c-t)$ Given $u_t+u_x=\cos(c-t)$ where
$u(x,0)=\dfrac{1}{1+x^2}$ .
Find the solution $u(x,t)$ using characteristic method.
I have found 
$\dfrac{dt}{ds}=1$ and $t(0)=0\implies t=s$
$\dfrac{dx}{ds}=1$ and $x(0)=x_0$
$\dfrac{du}{ds}=\cos(c-t)$ and $u(0)=\dfrac{1}{1+x^2}$
But I have no idea how to continue from here. Can anyone kindly guide me?
Thanks in advance.
 A: Your procedure has problems, so you should follow the follwing procedure:
$\dfrac{dt}{ds}=1$ , letting $t(0)=0$ , we have $t=s$
$\dfrac{dx}{ds}=1$ , letting $x(0)=x_0$ , we have $x=s+x_0=t+x_0$
$\dfrac{du}{ds}=\cos(c-t)=\cos(c-s)$ , letting $u(0)=f(x_0)$ , we have $u(x,t)=\sin c-\sin(c-s)+f(x_0)=\sin c-\sin(c-t)+f(x-t)$
$u(x,0)=\dfrac{1}{1+x^2}$ :
$f(x)=\dfrac{1}{1+x^2}$
$\therefore u(x,t)=\sin c-\sin(c-t)+\dfrac{1}{1+(x-t)^2}$
A: $\newcommand{\+}{^{\dagger}}%
 \newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\fermi}{\,{\rm f}}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert #1 \right\vert}%
 \newcommand{\yy}{\Longleftrightarrow}$
${\rm u}\pars{x,t} \equiv -\sin\pars{c - t} + \phi\pars{x,t}\quad\imp\quad\phi_{t} + \phi_{x} = 0$ and $\phi\pars{x,0} = 1/\pars{1 + x^{2}} + \sin\pars{c}$.

$$
\dot{t} = \dot{x} = 1\quad\imp\quad x - t = \mbox{constant}\quad\imp\quad\phi\pars{x,t} = {\rm f}\pars{x - t}
$$

$$
{1 \over 1 + x^{2}} + \sin\pars{c} =\phi\pars{x,0} = \fermi\pars{x}
\quad\imp\quad\phi\pars{x,t} = {1 \over 1 + \pars{x - t}^{2}} + \sin\pars{c}
$$

$$\color{#0000ff}{\large%
{\rm u}\pars{x,t} = -\sin\pars{c - t} + \sin\pars{c} + {1 \over 1 + \pars{x - t}^{2}} 
}$$
