# Solution of convection–diffusion equation.

Solve the following problem (Convection–diffusion equation) in the strip $[0,L]\times [0,+\infty)$ :

$u_t (x,t) -2u_x (x,t)=0\ \ \ 0<x<L,\ t>0$

$u_x (x,0)=x^2\ \ \ 0\leq x\leq L$

$u_t (L,t)=t^3 + L^2\ \ \ t>0$

I know the following resolutive formula (valid under certain assumptions):

$u(x,t)=e^{-bt}\int_{0}^{t}e^{bs}\ f(x+a(s-t),s) ds + e^{-bt}g(x-at)$

where

$u_t (x,t)+a\ u_x (x,t)+b\ u(x,t)=f(x,t), \ \ \ u(x,0)=g(x)$

My problem is that I do not understand how to use the condition of exercise: $u_t (L,t)=t^3 + L^2\ \ \ t>0$. Any suggestions please?

-

The general solution of $u_t - 2 u_x = 0$ is $u(x,t) = g(x+2 t)$ where $g$ is an arbitrary function. Now you have boundary conditions on the lines $x=L$ and $t=0$. The characteristic curve $x+2t = constant$ through a point $(x_0, t_0)$ in the region $(x,t) \in (0,L) \times (0,\infty)$ hits the boundary of that region at $(x_0 + 2 t_0,0)$ if $x_0 + 2 t_0 \le L$, or at $(L, t_0 + (x_0 - L)/2)$ if $x_0 + 2 t_0 \ge L$. On $t = 0$ we have $u_x = x^2$ so $u(x,0) = u(0,0) + \int_0^x s^2 \ ds = u(0,0) + x^3/3$. Thus in the region $x + 2 t \le L$ we have $u(x,t) = u(0,0) + (x + 2 t)^3/3$. In particular $u(L,0) = u(0,0) + L^3/3$.
On $x=L$ we have $u_t = t^2 + L^2$, so $u(L,t) = u(0,0) + L^3/3 + \int_0^t (s^2 + L^2)\ ds = u(0,0) + L^3/3 + t^3/3 - L^2 t$. Thus in the region $x + 2 t \ge L$ we have $u(x,t) = u(0,0) + L^3/3 + (t + (x - L)/2)^3 - L^2 (t + (x-L)/2)$.