Author Topic: FE Problem 2  (Read 5286 times)

Victor Ivrii

  • Administrator
  • Elder Member
  • *****
  • Posts: 2607
  • Karma: 0
    • View Profile
    • Personal website of Victor Ivrii
FE Problem 2
« on: April 14, 2015, 07:40:21 PM »
Solve  IBVP for the heat equation
\begin{equation*}
\left\{\begin{aligned}
&u_t -3 u_{xx}=0,\qquad &&0<x<\infty,\; t>0,\\[2pt]
&u|_{t=0}= f(x),\\[2pt]
&u_x|_{x=0}=0
\end{aligned}\right.
\end{equation*}
with $f(x)=\left\{\begin{aligned}
&1\quad && 0<x<1,\\
&0 &&1<x<\infty.\end{aligned}\right.$

Solution should be expressed  through $\displaystyle{\operatorname{erf}(z)=\sqrt{\frac{2}{\pi}} \int_0^z e^{-z^2/2}\,dz}$.

Jessica Chen

  • Full Member
  • ***
  • Posts: 22
  • Karma: 0
    • View Profile
Re: FE Problem 2
« Reply #1 on: April 14, 2015, 11:39:04 PM »
\begin{align}
u(x,t)&=\frac{1}{\sqrt{4k\pi t}}[\int_0 ^\infty e^{-\frac{(x-y)^2}{4kt}}f(y) dy
+\int_0 ^\infty e^{-\frac{(x+y)^2}{4kt}}f(y)]\\
&=\frac{1}{\sqrt{4k\pi t}}[\int_0 ^1 e^{-\frac{(x-y)^2}{4kt}}+ e^{-\frac{(x+y)^2}{4kt}}dy]\\
&=\frac{1}{\sqrt{12\pi t}}[\int_0 ^1 e^{-\frac{(x-y)^2}{12t}}+ e^{-\frac{(x+y)^2}{12t}}dy]\\

\end{align}
Let $ I_1(x) = \int_0 ^1 e^{-\frac{(x-y)^2}{2}}$ then $I_2(x)= I_!(-x)$\\
Let $z_1 = (x-y)$, we get
\begin{align}
I_1(x) &= \int_0 ^1 e^{-\frac{(x-y)^2}{2}}dy\\
&=\int_{x-1} ^{x} e^{-\frac{z^2}{2}}dz\\
&=\int_{0} ^{x-1} e^{-\frac{z^2}{2}}dz+\int_{0} ^{x} e^{-\frac{z^2}{2}}dz\\
&=\sqrt{\frac{\pi}{2}}(erf(x-1)+erf(x)))\\
I_2(x)&=\sqrt{\frac{\pi}{2}}(erf(-x-1)+erf(-x)))

\end{align}
Then, we get
\begin{align}
u(x, t) &= \frac{1}{\sqrt{12\pi t}}e^{\frac{1}{6t}}[\sqrt{\frac{\pi}{2}}(erf(x-1)+erf(x)))+\sqrt{\frac{\pi}{2}}(erf(-x-1)+erf(-x)))]\\
&= \frac{1}{\sqrt{24t}}e^{\frac{1}{6t}}(erf(x-1)+erf(x)+erf(-x-1)+erf(-x)]\\
\end{align}
« Last Edit: April 15, 2015, 12:06:07 AM by Jessica Chen »

Victor Ivrii

  • Administrator
  • Elder Member
  • *****
  • Posts: 2607
  • Karma: 0
    • View Profile
    • Personal website of Victor Ivrii
Re: FE Problem 2
« Reply #2 on: April 17, 2015, 08:15:30 AM »
$\newcommand{\erf}{\operatorname{erf}}$
Method of continuation $u(x,t)$ should be solved as Cauchy problem with initial condition $u(x,0)=F(x)$ with
$F(x)=\left\{\begin{aligned}
&1\quad && |x|<1,\\
&0 &&|x|>1,\end{aligned}\right.$ and therefore
\begin{equation*}
u(x,t)= \frac{1}{\sqrt{12\pi t}} \int_{-1}^1 e^{-\frac{(x-y)^2}{12t}}\,dy=
\frac{1}{\sqrt{2\pi}}  \int_{\frac{x-1}{\sqrt{2t}}}^{\frac{x+1}{\sqrt{2t}}} e^{-\frac{z^2}{2}}\,dy
\end{equation*}
where we set $y= x+ z\sqrt{6t}$ and finally
\begin{equation*}
u(x,t)= 
\frac{1}{2}  \Bigl[ \erf \Bigl(\frac{(x+1)}{\sqrt{6t}}\Bigr) - \erf \Bigl(\frac{(x-1)}{\sqrt{6t}}\Bigr)\Bigr]
\end{equation*}
where we used that $\sqrt{\frac{2}{\pi}} \int_a^b e^{-z^2/2}\,dz = \erf (b)-\erf (a)$.