# Homework Help: Method of characteristics

1. Sep 21, 2011

### squenshl

1. The problem statement, all variables and given/known data
Find the general solution of the following equation
ut + x2ux = t, u(x,0) = f(x), -inf < x < inf, t > 0

2. Relevant equations

3. The attempt at a solution
Using method of characteristics I get
du/dt = ut + dX/dtux = ux(dX/dt - x^2) + t
so along the curve dX/dt = x^2 with x(0) = x0 we get x = -1/(t+x0) and x0 = -1/x - t
So du/dt = t = -1/x - x0 so
u(x,t) = -t/x - x0t + f(x0)
so u(x,t) = t2 + f(-1/x - t)
but when I check this I don't get the original PDE.
Someone help.

2. Oct 5, 2011

### syj

hey,
so Im only just starting to understand method of characteristics, but Im gona try to help.

The first step I believe is to get your characteristic equations

$\frac{dx}{ds}$=x$^{2}$

$\frac{dt}{ds}$=1

$\frac{du}{ds}$=t

solving these equations gives

x=$x^{2}$s +$x_{0}$

t=s+$t_{0}$

u=ts+$u_{0}$

from the initial condition $t_{0}$=0

so t=s

x=$x^{2}$t+$x_{0}$

u=$t^{2}$+$u_{0}$

u($x_{0}$,0)=f($x_{0}$)

$x_{0}$=x-$x^{2}$t

so $u_{0}$=f(x-$x^{2}$t)

3. Oct 14, 2011

### Coelum

The system of ODEs for the characteristic lines is

$\frac{dx}{ds}(r,s)=x^2$
$\frac{dt}{ds}(r,s)=1$
$\frac{du}{ds}(r,s)=t$.

The first ODE can be integrated by separation of variables:

$\frac{dx}{ds}(r,s)=x^2$
$∫\frac{dx}{x^2}=∫ds$
$-\frac{1}{x(r,s)}=s+g_1(r)$
$x(r,s)=-\frac{1}{s+g_1(r)}$.

The second ODE is straightforward:

$\frac{dt}{ds}(r,s)=1$
$t=s+g_2(r)$.

The third ODE can be solved using the value of $t$ just computed:

$\frac{du}{ds}(r,s)=t=s+g_2(r)$
$u(r,s)=(s^2)/2+s*g_2(r)+g_3(r)$.

Note that the constants of integration are functions of $r$ since we are integrating w.r.t. $s$. The general solution is:

$x(r,s)=-\frac{1}{s+g_1(r)}$.
$t=s+g_2(r)$
$u(r,s)=(s^2)/2+s*g_2(r)+g_3(r)$.

The initial conditions are:

$x(r,0)=r$
$t(r,0)=0$
$u(r,0)=f(r)$

which we substitute into the general solution

$x(r,0)=-\frac{1}{g_1(r)}=r$
$t(r,0)=g_2(r)=0$
$u(r,0)=g_3(r)=f(r)$

getting the value for the constants of integration

$g_1(r)=-\frac{1}{r}$
$g_2(r)=0$
$g_3(r)=f(r)$.

that we can substitute into $u$ to get it as a function of $s,r$:

$u(r,s)=s^2/2+f(r)$.

In order to get $u$ as a function of $x,t$, we need to invert $x(r,s),t(r,s)$ first

$t=s$
$x=-\frac{1}{t-1/r}=\frac{r}{1-rt}$
$1-rt=\frac{r}{x}$
$1=r(t+\frac{1}{x})$
$r=\frac{x}{1+tx}$

and then substitute them into the above expression for $u$:

$u(x,t)=t^2/2+f(\frac{x}{1+tx})$.