# Find solution of problem - Method of characteristics

I want to find the solution of the problem: $$(t+u(x,t))u_x(x,t)+tu_t(x,t)=x-t, x \in \mathbb{R}, t>1 \\ u(x,1)=1+x, x\in \mathbb{R}$$

I have tried the following:

$$(x(0), t(0))=(x_0, 1)$$

We will find a curve $(x(s), t(s)), s \in \mathbb{R}$ such that $\sigma (s)=u(x(s),t(s))$

$\sigma'(s)=\frac{d}{ds}(u(x(s), t(s)))=u_x(x(s), t(s))x'(s)+u_t(x(s), t(s))t'(s)$

We choose $x'(s)=t(s)+u(x(s), t(s))=t(s)+\sigma (s), s \in \mathbb{R}, x(0)=x_0 \\ t'(s)=t(s), s \in \mathbb{R}, t(0)=1$

Then $\sigma'(s)=(t(s)+u(x(s), t(s)))u_x(x(s), t(s))+t(s)u_t(x(s), t(s))=x(s)-t(s), s \in \mathbb{R} \\ \sigma (0)=u(x(0), t(0))=u(x_0, 1)=1+x_0$

$$t'(s)=t(s) \Rightarrow t=ce^s \\ t(0)=1 \Rightarrow c=1 \\ \text{ So, } t(s)=e^s$$

So we get $$x'(s)=t(s)+\sigma(s)=e^s +\sigma (s) \\ \sigma'(s)=x(s)-t(s) \Rightarrow \sigma'(s)=x(s)-e^s$$

$$\sigma'(s)=x(s)-e^s \Rightarrow \sigma''(s)=x'(s)-e^s=e^s+\sigma (s)-e^s \Rightarrow \sigma''(s)=\sigma (s) \Rightarrow \sigma (s)=c_1e^s+c_2 e^{-s} \\ \sigma (0)=1+x_0 \Rightarrow c_1+c_2=1+x_0 \Rightarrow c_1=1+x_0-c_2 \\ \Rightarrow \sigma (s)=(1+x_0-c_2)e^s+c_2e^{-s}$$

$$\Rightarrow x'(s)=e^s+(1+x_0-c_2)e^s+c_2e^{-s}=(2+x_0-c_2)e^s+c_2e^{-s} \\ \Rightarrow x(s)=(2+x_0-c_2)e^s-c_2e^{-s}+c_3 \\ \Rightarrow x(0)=x_0 \Rightarrow 2+x_0-c_2-c_2+c_3=x_0 \Rightarrow -2c_2+c_3=-2 \Rightarrow c_3=-2+2c_2 \\ \Rightarrow x(s)=(2+x_0-c_2)e^s-c_2e^{-s}-2+2c_2$$

If $\overline{s}$ is the value of $s$, such that $(x(\overline{s}), t(\overline{s}))=(x_1, t_1)$, then we have $$\left.\begin{matrix} (2+x_0-c_2)e^{\overline{s}}-c_2e^{-\overline{s}}-2+2c_2=x_1 \\ e^{\overline{s}}=t_1 \end{matrix}\right\} \Rightarrow \left.\begin{matrix} (2+x_0-c_2)t_1-c_2\frac{1}{t_1}-2+2c_2=x_1 \\ e^{\overline{s}}=t_1 \end{matrix}\right\} \Rightarrow \left.\begin{matrix} t_1+(1+x_0-c_2)t_1-c_2\frac{1}{t_1}-2+2c_2=x_1 \\ e^{\overline{s}}=t_1 \end{matrix}\right\} \Rightarrow \left.\begin{matrix} (1+x_0-c_2)t_1=x_1-t_1+\frac{c_2}{t_1}+2-2c_2 \\ e^{\overline{s}}=t_1 \end{matrix}\right\}$$

So for $s=\overline{s}$ we have $$\sigma (\overline{s})=u(x(\overline{s}),t(\overline{s}))=u(x_1, t_1)=(1+x_0-c_2)e^{\overline{s}}+c_2e^{-\overline{s}}=(1+x_0-c_2)t_1+\frac{c_2}{t_1}=x_1-t_1+\frac{c_2}{t_1}+2-2c_2+\frac{c_2}{t_1}=x_1-t_1+2\frac{c_2}{t_1}+2-2c_2$$

So the solution is $$u(x,t)=x-t+2\frac{c_2}{t}+2-2c_2$$

Is it right? Can the solution have the constant $c_2$ ?

• Which book is this problem coming from? Commented Apr 29, 2015 at 21:33
• @Victor I don't know. I was just given the exercise. Commented Apr 29, 2015 at 21:35
• Which textbook you are using for the course? This problem seems too complicated. Commented Apr 29, 2015 at 21:36
• @Victor I don't use a book. I study from the lecture notes. Commented Apr 29, 2015 at 21:37
• Which year of Phd candidate are you? Your effort on this problem seems big! How many of these problem in the course you solved in a week? Wish you good luck on this :) Commented Apr 29, 2015 at 21:40

i am going to try from square one. let the characteristic curve $C,$ parametrized bt $s,$ be defined by $$\frac{dx}{ds} = t+ u, \quad \frac{dt}{ds} = t, \quad x = a, t = 1, u = 1 + a \text{ at } s = 0.\tag 1$$

we have $$t = e^s, \frac{du}{ds}= x - e^s, \frac{dx}{ds} = e^s + u \tag 2$$

eliminating $u$ between the two equation in $(2),$ gives $$\frac{d^2x}{ds^2}=e^s + \frac{du}{ds}=x, x|_{s = 0} = a, \frac{dx}{ds}\Big|_{s=0}=\left(e^s+u\right)_{s=0}=2+a\tag 3$$

from $3,$ we find that $$t = e^s, x = (a+1)e^s -e^{-s},u=\frac{dx}{ds} - e^s=ae^s+e^{-s} \tag 4$$

we can find the inverse functions $$ae^s = x + \frac1t-t, \quad u = x + \frac2t-t\tag 5$$

we will see if $u$ given by $(5)$ solves $$(t+u)u_x + tu_t = x-t, u(x,1) = x+1.$$

we see that $$u|_{t=1} = \left( x + \frac2t-t \right)|_{t=1} = x+ 1$$

\begin{align} (t+u)u_x + tu_t = \left(x + \frac 2 t\right) + t\left(-\frac2{t^2} - 1\right) = x - t \end{align}

therefore we conclude that the solution(hopefully unique) is $$u = x + \frac2t-t.$$

• After answering the miscopied question, I finally got the same answer (+1).
– robjohn
Commented Apr 30, 2015 at 17:56
• @robjohn, thanks for +1. i appreciate it. i can't the number of time i have made sign errors.
– abel
Commented Apr 30, 2015 at 18:06

To solve $$tu_t+(u+t)u_x=t-x\tag{1}$$ we can parametrize $(x(s),t(s))$ so that $$\frac{\mathrm{d}x}{\mathrm{d}s}=u+t \qquad\text{and}\qquad \frac{\mathrm{d}t}{\mathrm{d}s}=t\tag{2}$$ Then, because we know the initial data for $t=1$, let $$t=e^{\large s}\tag{3}$$ and because we have both $$\frac{\mathrm{d}u}{\mathrm{d}s}=t-x \qquad\text{and}\qquad \frac{\mathrm{d}}{\mathrm{d}s}(t-x)=-u\tag{4}$$ we know $$\frac{\mathrm{d}^2u}{\mathrm{d}s^2}=-u\tag{5}$$ Therefore, $$u=a\cos(s)+b\sin(s)\tag{6}$$ along the characteristic curve $$(x,t)=\left(e^{\large s}+a\sin(s)-b\cos(s),e^{\large s}\right)\tag{7}$$ When $s=0$, we have $t=1$ and $u=1+x\implies a=2-b$. Thus, given an $x$ and $t$, we can solve for $a$ and $b$: \begin{align} a&=\frac{x+2\cos(\log(t))-t}{\cos(\log(t))+\sin(\log(t))}\\ b&=\frac{t+2\sin(\log(t))-x}{\cos(\log(t))+\sin(\log(t))} \end{align}\tag{8} Plugging $(8)$ into $(6)$ gives $$u=\frac{(x-t)(\cos(\log(t))-\sin(\log(t)))+2}{\cos(\log(t))+\sin(\log(t))}\tag{9}$$

What is above is correct, but I see that I've copied the problem incorrectly. We can follow the same procedure to solve the correct problem.

To solve $$tu_t+(u+t)u_x=x-t\tag{10}$$ we can parametrize $(x(s),t(s))$ so that $$\frac{\mathrm{d}x}{\mathrm{d}s}=u+t \qquad\text{and}\qquad \frac{\mathrm{d}t}{\mathrm{d}s}=t\tag{11}$$ Then, because we know the initial data for $t=1$, let $$t=e^{\large s}\tag{12}$$ and because we have both $$\frac{\mathrm{d}u}{\mathrm{d}s}=x-t \qquad\text{and}\qquad \frac{\mathrm{d}}{\mathrm{d}s}(x-t)=u\tag{13}$$ we know $$\frac{\mathrm{d}^2u}{\mathrm{d}s^2}=u\tag{14}$$ Therefore, $$u=a\cosh(s)+b\sinh(s)\tag{15}$$ along the characteristic curve $$(x,t)=\left(e^{\large s}+a\sinh(s)+b\cosh(s),e^{\large s}\right)\tag{16}$$ When $s=0$, we have $t=1$ and $u=1+x\implies a=2+b$. Thus, given an $x$ and $t$, we can solve for $a$ and $b$: \begin{align} a&=\frac xt+\frac1{t^2}\\ b&=\frac xt+\frac1{t^2}-2 \end{align}\tag{17} Plugging $(17)$ into $(15)$ gives $$u=x-t+\frac2t\tag{18}$$

• Verifying this is messy, but Mathematica says that $(9)$ satisfies $(1)$, and plugging $t=1$ into $(9)$ shows that $u(x,1)=1+x$.
– robjohn
Commented Apr 30, 2015 at 17:19
• Heh... I see that scrolling past the other answer, I miscopied the problem. It is supposed to be $x-t$, not $t-x$, on the right hand side of $(1)$.
– robjohn
Commented Apr 30, 2015 at 17:28
• It is easier to verify that $(18)$ satisfies $(10)$ and plugging $t=1$ into $(18)$ shows that $u(x,1)=1+x$.
– robjohn
Commented Apr 30, 2015 at 17:55