Maple Heat equation with Neumann B.C. in Maple

AI Thread Summary
The discussion revolves around coding the heat equation with Neumann boundary conditions in Maple. The user seeks assistance in checking their code, which involves the heat equation defined by the partial differential equation (PDE) diff(u(x,t),t)=diff(u(x,t),x,x), with initial condition U(x,0)=2*x and Neumann boundary conditions Ux(0,t)=0 and Ux(L,t)=0. A suggestion is made to utilize the pdsolve command in Maple, which can solve PDEs while incorporating specified boundary and initial conditions. This approach is recommended to streamline the coding process and ensure accurate solutions for the heat equation under Neumann conditions.
lolly
Messages
1
Reaction score
0
Hello!
I have written the code in Maple for Heat equation with Neumann B.C. Could anyone check it? I will be very grateful!

Heat equation: diff(u(x,t),t)=diff(u(x,t),x,x);
Initial condition: U(x,0)=2*x;
Boundary conditions: Ux(0,t)=0; Ux(L,t)=0;
I use centered difference approximation for the Neumann conditions. For my case:
ec9a874377a5.jpg

The code:
7f770ce86447.jpg


I really do not know about my mistakes. I know how to solve it with Dirichle B.C. But I do not know how to write the code in Maple for Neumann B.C.
Thank You!
 
Physics news on Phys.org
</code>My suggestion would be to use the pdsolve command in Maple. This command allows you to solve Partial Differential Equations (PDE). You can specify the boundary conditions and initial conditions in the command and it will generate the solution to your PDE. For example, for the Heat equation with Neumann B.C., the following command could be used: pdsolve(diff(u(x,t),t)=diff(u(x,t),x,x),u(x,0)=2*x,u(0,t)=0,u(L,t)=0);Hope this helps!
 

Similar threads

Replies
1
Views
2K
Replies
1
Views
2K
Replies
4
Views
3K
Replies
9
Views
5K
Replies
5
Views
987
Replies
3
Views
4K
Back
Top