Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'A problem about DSolve and NDSolve' topicStudent Support Forum > General > Archives > "A problem about DSolve and NDSolve"

Help | Reply To Topic
Author Comment/Response
04/11/12 03:39am

The exact solution of the partial differential equation

with initial and boundary condition
{Derivative[0,1][y][x,0]==Cos[x] , y[0,t]==Sin[t]}

is y[x,t]=Sin[x]+Sin[t]+t*x^3/3.

This solution is not diffcult to obtained. But I found this problem cannot be solved with DSolve and NDSolve. Here is my code:
DSolve[{D[y[x,t],t,x]==x^2,Derivative[0,1][y][x,0]==Cos[x] , y[0,t]==Sin[t]},y,{x,t}]
and the output is the repeat of my code.

NDSolve[{D[y[x,t],t,x]==x^2,Derivative[0, 1][y][x, 0]==Cos[x] , y[0,t]==Sin[t]},y,{x,0,10},{t,0,10}]
and the output is:

What's going wrong?

URL: ,
Help | Reply To Topic