I've got to show that, in the case that $f(x) = u_0, 0 < x \le L$, or $f(x) = 0, x > L$, that some function $u(x,t) = \frac{1}{2}u_0[2erf(\frac{x}{\sqrt{4c^2t}}) - erf(\frac{x-L}{\sqrt{4c^2t}}) - erf(\frac{x+L}{\sqrt{4c^2t}})]$.
Now, in lectures, we've been given that $$u(x,t) = \frac{1}{\sqrt{4\pi c^2t}} \int_{-\infty}^{\infty} e^\frac{-(x-y)^2}{4c^2t} f(y) dy$$
Now, I know I'll have to split this integrand up into infinity symbols and $L$ terms, but I'm not sure how to do this, with respect to our initial conditions.
Any input would be great - I'm fine in setting up the changes of variable for input into the error function, just having a bit of trouble splitting the integrand. Thank you!!
(This is a study question, too, rather than a homework question)