1. Originally Posted by BasicIdeaIsSimple
Sorry, separation of variables does not work in this case because of the jump in boundary condition u(x,0)=f(x) at point x*.
Are you sure, did you try substituting that solution in terms of Fourier series into the equation and seeing if it works. I am sure it does.

I'm afraid I cannot explain why.
I think you might be referring to the Dirac Generalised function, because of a jump discontinuity. But I do not see how that makes my solution false.

But I know that for an unbounded bar: -infinity <x<+inf the unique solution is the well-known Gauss kernel

$u(x,t)= \frac{1}{\alpha \sqrt{2\pi t}}\, exp \left( - \frac{(x-x^*)^2}{2\alpha^2t}\right)$
But perhaps that is only for an infinite bar. My case here is a finite bar.

2. I just started reading Partial Differencial Equations. What you said is the material on Integral/Fourier Transforms.

I did not learn this yet but I did find it in my book.

Theorem: Given the heat equation $\frac{\partial u}{\partial t} = a^2 \frac{\partial^2u}{\partial x^2}$ with no boundary conditions i.e. it needs to be satisfied on $-\infty < x < \infty$ with $u(x,0) = f(x)$ (some well-behaved function). Then, the solution can be written as the Fourier Integral:
$\boxed{ u(x,t) = \frac{1}{\sqrt{\pi}}\int_{-\infty}^{\infty} f\left( x + 2ay\sqrt{t}\right) e^{-y^2} dy }$

$f(x) = \left\{ \begin{array}{c}1 \mbox{ for }x\leq x_0 \\ 0 \mbox{ for }x>0 \end{array}\right.$

In this case the solution is given by:
$u(x,t) = \frac{1}{\sqrt{\pi}}\int_{-\infty}^{x_0} e^{-y^2} dy$
Which is the Gaussian Curve, and it is very similar to how you written it.

3. Stiring the pot

You're absolutely right! What I gave you in disguise was a key to the Fourier transform method of solution. Unfortunately I made some errors so I understand your confusion. Like I said I work with applications of the diffusion eq so I am a bit rusty when it comes to formulas. Here are my corrections:

Originally Posted by ThePerfectHacker
Now in your problem if: $
\; \; f(x) = \lbrace \begin{array}{c}1 \mbox{ for }x\leq x_0
\\ 0 \mbox{ for }x>0 \end{array}$
Clearly the second line has a typo. It should be $x>x_0$. This f(x) is the integral of the delta fcn for the point x*. A physical interpretation of this f(x) is to dip a bar of chocolate into some very hot pot and find out how long it takes to melt... Or if you prefer stiring the pot with a long metal spoon and see how long it takes for your fingers to burn (assuming only heat comes from the end of the long spoon).

Originally Posted by ThePerfectHacker
In this case the solution is given by:
(Here I correct my own errors directly): $\; u(x,t) = \frac{1}{2a \sqrt{\pi t}}\int_{-\infty}^{x} \exp \left( -\frac{(\xi-x^*)^2}{4a^2} d\xi \right)
$

Sorry about those confusing errors! But thanks to you I stumbled upon something very interesting: I think it is possible to calculate Fourier series for this f(x)= 1 or 0 and integrate the series termwise and find that it converges to Gauss kernel or its integral = the normal distribution! Check out this integral:

$
\; \; \; I(\xi)= \int_0^{-\infty} e^{a^2 x^2} \, cos\, \xi x \; dx =
\frac{1}{2a \sqrt{\pi t}}\exp \left( -\frac{\xi^2}{4a^2} \right)
$

This is what I call cool. It should be possible to see how the series solution changes with longer and longer bars as $L \to \infty$ and the Fourier series converges to the normal distribution (or error fcn).

If you're a student hacker (or a perfect student) feel free to take this up with your teacher. I've never thought about this before! On the other hand it might be a re-discovery of the discrete Fourier transform? Anyway, very pedagogical for me was this, Obi-One. You can do it in Matlab for normal distribution mean=x* and var = t a^2 and see how curve converges to f(-x). Perhaps you can even see Gibbs phenomena of overshooting near x*. (I don't know how accurate Matlabs normal distribution is in that respect)

Or check out how Gauss kernel (the normal density fcn) converges to the "derivative" of the bndary condition f(x). Myself I view this process backwards: I start with a "spike" of jelly at x* and then the jelly sinks down and spreads out until it becomes uniformly distributed along the x-axis.

The Fourier transform of Gauss kernel is equal to itself (except for a scaling factor). In other words it is a fix-point for the mapping between fcns and their Fourier transform. OK, I guess that's enough for one day. Only reason I wrote this was that you say you love math! When I read this course long time ago I actually got an A but all I knew about Laplace transform was that I could change derivatives to "s" and "s^2" and solve the PDE....

Page 2 of 2 First 12