Added Sept 12, 2019.
Taken from Peter Olver textbook, Introduction to Partial differential equations.
Solve \(u_t-4u_x+u = 0\) with IC \(u(0,x)=\frac {1}{1+x^2}\)
Mathematica ✓
ClearAll["Global`*"]; pde = D[u[t, x], {t}] -4*D[u[t, x], {x}]+u[t,x] == 0; ic = u[0,x]==1/(1+x^2); sol = AbsoluteTiming[TimeConstrained[DSolve[{pde,ic}, u[t, x], {t, x}], 60*10]];
Maple ✓
restart; pde := diff(u(t, x), t) -4*diff(u(t, x),x) +u(t,x)=0; ic:=u(0,x)=1/(1+x^2); cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic],u(t,x))),output='realtime'));
Hand solution
Solution
Let \(u=u\left ( x\left ( t\right ) ,t\right ) \). Then
Solving (3) gives
Using the given initial conditions, this becomes
Now we just need to find \(x\left ( 0\right ) \). From (4)
Substituting the above into (5) gives
The above is the method I prefer to solve these problems. Here are some alternative ways
Alternative approach
Let \(\xi \) be the characteristic variable defined such that \(\xi =x-ct\). Where characteristic lines are given by \(x=x_{0}+ct\). But \(c=-4\) in this problem. Hence characteristic lines are
And
Then \(u_{t}-4u_{x}\) are transformed to \(v\left ( t,\xi \right ) \) as was done in part (a) (will not be repeated) which results in
Substituting the above into (1) gives (where now \(v\) is used in place of \(u\)).
This is now first order ODE since it only depends on \(t\). Therefore \(v^{\prime }+v=0\). This is linear in \(v\). Hence the solution is \(\frac {d}{dt}\left ( ve^{\int dt}\right ) =0\) or \(ve^{t}=F\left ( \xi \right ) \) where \(F\) is arbitrary function of \(\xi \). Hence
Converting to \(u\left ( t,x\right ) \) gives
At \(u\left ( 0,x\right ) =\frac {1}{1+x^{2}}\) the above becomes
From the above then (2) can be written as
An alternative approach to solve transport PDE is by using Lagrange-charpit method
Integrating \(\frac {dt}{1}=\frac {-dx}{4}\) gives \(t=-\frac {1}{4}x+C_{2}\) or
Now either \(\frac {dt}{1}=\frac {-du}{u}\) or \(\frac {-dx}{4}=\frac {-du}{u}\) can be integrated. The choice is not important. Integrating \(\frac {dt}{1}=\frac {-du}{u}\) gives \(t=-\ln u+C_{1}\) or
But \(C_{1}=F\left ( C_{2}\right ) \) always, where \(F\) is arbitrary function therefore
At \(u\left ( 0,x\right ) =\frac {1}{1+x^{2}}\) the above becomes
Let \(z=\frac {x}{4}\), then \(x=4z\). The above becomes
From the above then (1) can be written as
The following is an animation of the solution
| 3D |
2D |
|
|
|
Source code used for the above
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________