Why the heat equation doesn't work with NDSolve?

Hi.
I want to find a numerical solution for the heat equation.
I use Mathematica 10.0.
The code that I use to find the solution is this:

NDSolve[{D[u[t, x], t] == D[u[t, x], x, x], u[0, x] == 0, 
  u[t, 0] == Sin[t], u[t, 5] == 0}, u, {t, 0, 10}, {x, 0, 5}]

The problem is that, when I click on “evaluate notebook”, the program runs for few seconds and then it stops without error messagges, but only with a “beep” sound. So I click on “Help / Why the Beep?..” and this is the message that appears on the screen: “The kernel Local has quit (exited) during the course of an evaluation.”

What does it mean?
Please help me, I don’t know how to solve this problem.
Thanks for your suggestions.

Jo R

The code you posted works for me. Try running it in a fresh kernel. If it still doesn’t work, I suggest you post the notebook.

In[12]:= $Version

Out[12]= "10.0 for Microsoft Windows (64-bit) (December 4, 2014)"

In[13]:= sol = 
  NDSolve[{D[u[t, x], t] == D[u[t, x], x, x], u[0, x] == 0, 
     u[t, 0] == Sin[t], u[t, 5] == 0}, u, {t, 0, 10}, {x, 0, 5}] // 
   First;

In[14]:= Plot3D[u[t, x] /. sol, {t, 0, 10}, {x, 0, 5}, 
 PlotRange -> All]

Hi David Keith. Thank you for the answer. I post the notebook here.
It is possible that it’s an hardware problem?
I have an ASUS F552EP with:

  • microprocessor AMD quad-core 2.0 GHz
  • 6 GB RAM
    The OS is Windows 7 (64-bit).

One more thing, Jo. I notice this is the 2nd post in which you describe an unexpected kernel exit. Does anything work? For example, If you start Mathematica fresh and then input x = 2, do you get the same problem? If so, you might read the information on resetting preferences: Resetting Mathematica

(similar post is http://community.wolfram.com/groups/-/m/t/424530 - moderator)

Hi Jo – this notebook works OK for me. I suggest resetting Mathematica.

For simple equations it works perfectly. I’ve tried also to solve ordinary differential equations and it works without any problem. The problem appears when I try to solve more complex equations, like partial differential equations. I don’t know what to do, I’m spending a lot of time only to understand what kind of problem it is.

This is unusual. If resetting doesn’t work, you might want to contact tech support. Or . . . maybe someone else on the forum has an insight.

I’ve tried to solve the problem by resetting Mathematica, but it hasn’t worked.
However, I’m thinking that I activated the software with product key, but I didn’t registered it on the wolfram’s website. Would it be the cause of the problem?

I doubt that is the problem. The kernel can exit if out of memory. I would think 6GB was enough, but the least I have on a system is 8GB on my laptop.

Registering or not registering should have nothing to do with a crash.

Since this is repeatable for you, try catching a dump of it.

  • Start the Mathematica kernel by itself (Start menu - All Programs -
    Wolfram Mathematica - Wolfram Mathematica 10.0 Kernel).
  • Paste the line of code into it. (See first screen shot.)

  • Evaluate the line of code with Enter or Shift+Enter.
  • If there is a crash notice,
    • open the Task Manager,
    • locate the MathKernel process,
    • right-click on it, and
    • in the pop-up menu click on Create Dump File.

This will probably be too big to send by email. It can be uploaded
via http://upload.wolfram.com/. For the “Recipient:” field, put
“support@wolfram.com”. In the “Additional notes:”, mention this
discussion number, 424357.

It would be helpful if you sent the output from running systeminfo in a command-prompt window
(via Start - Programs - Accessories, or Start - Run - cmd.exe)
(This also is long. Copy and paste it into return email or put it into a file and attach the file.)
It looks like

C:\>systeminfo

Host Name:                 MLLRWIN
OS Name:                   Microsoft Windows 7 Professional
OS Version:                6.1.7601 Service Pack 1 Build 7601
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
OS Build Type:             Multiprocessor Free
... 

I opened the task manager while kernel was running and i saw that the memory occupied was 2GB max. So it isn’t the problem. It’s very strange. However thank you for your help.

Thank you Bruce Miller. I will do that.