1
$\begingroup$

Cross posted in mathematica.SE.


Question : I want to test the solution which is given below is right by Matlab/Maple/Mathematica.

Please look the post in mathstackexhange

or

Please look below.

Q: Solve the following heat equation on the semi-infinite rod

$$u_t=ku_{xx}$$ where $x,t>0$ and $u_x(0,t) =0$ and $u(x,0)=\begin{cases} 1, & 0 < x <2 \\ 0, & 2\leq x \end{cases} $

Answer

We found the following answer $$ u(x,t) = \frac{2}{\pi}\int_{0}^{\infty}e^{-s^2 t}\frac{1-\cos(2s)}{s}\cos(sx)ds. $$

Code

But I am not sure the solution is right. I am not capable of to write a code in order to test it. Could you help me?

$\endgroup$
  • $\begingroup$ You could use a chebfun and then compute the integral. $\endgroup$ – nicoguaro Oct 17 '17 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.