Solving an initial value problem

121 Views Asked by At

How can I solve \begin{cases} u_t-u_{xx}=0,&\text{if $0<x<1, t>0$}\\ u(0,t)=u(1,t)=0, & \text{if $t>0$}\\u(x,0)=u_0(x), &\text{if $x\in(0,1)$} \end{cases}

where $$u_0=min(x,1-x)$$

2

There are 2 best solutions below

0
On BEST ANSWER

Here's a possible solution. Assume that $u$ can be written as

$$ u(x,t) = X(x)T(t), $$

By replacing this into the partial differential equation you get

$$ \frac{1}{X}\frac{d^2 X(x)}{x^2} = \frac{1}{T}\frac{d T(t)}{t}. $$

The only way you can have a function of $x$ equal to a function of $t$ is if both functions are a constant, from there you can conclude

  • $t$: $$ \frac{dT}{dt} = -\alpha^2 T $$

    note that I assume that the constant is negative, because otherwise $T(t)$ would grow with time, which is not physical. The solution to this is

$$ T(t) = Ae^{-\alpha^2 t} $$

  • $x$:

    $$ \frac{d^2 X}{dx^2} = -\alpha^2 x $$

    with solution

    $$ X(t) = B \cos \alpha x + C \sin \alpha x $$

    now we use the boundary conditions. From the fact that $u(0, t) = 0$ we get $B = 0$. And from the $u(1, t) = 0$ we get $\alpha = m\pi$ for $m = 1, 2, \cdots $.

Putting these two results together we get $u_m(x,y) = c_m X_m(x)T_m(t)$, with $c_m = A_m C_m$, the solution is then a linear sum of $u_m$

$$ u(x,t) = \sum_m c_m \sin m\pi x e^{-m^2\pi^2 t} $$

The coefficients $c_m$ can be obtained from the initial condition

$$ u(x, 0) = u_0(x) = \sum_{m=1}^\infty c_m \sin m\pi x \quad\Rightarrow\quad c_m = 2\int_0^1 u_0(x)\sin m\pi x = \frac{4}{\pi^2 m^2}\sin \frac{m\pi}{2} $$

This is a plot for different times, and truncating the sum at $m_{\rm max} = 100$

enter image description here

0
On

You can start reconsider the problem with initial value $u_0$ in the form: $$ u_0(x)= \begin{cases} x\ \ \mbox{if}\ x\in [0,\frac 12) \\ 1-x\ \ \mbox{if}\ x\in [\frac 12, 1] \end{cases} $$

It may help you to solve the Cauchy Problem via classical method.