How can I graph a heat equation with multiple variables in Maple?

Ultramilk
Messages
10
Reaction score
0

Homework Statement


Graph T(x,t) = T1e^(lambda*x)sin(wt-lambda*x) in Maple
lambda = -.2
T1 = 10
omega = constant

Homework Equations


Maybe heat equation
ut(x,t) = uxx(x,t)


The Attempt at a Solution


I'm really unsure on how to graph a multiple variable function/equation in Maple. I gave it a couple of tries using plot3d, but I really don't have a clear understanding of how exactly the functions work (I only plot 2d stuff before this).

My only close attempt was when I typed in:
plot3d(T1e^(lambda*x)sin(wt-lambda*x), x=0..10, t=0..10)
where I had define lambda := -.2 and T1 := 10;
It didn't give me any errors, but it gave me an empty plot.

I also looked up procedures in graphing heat equation, but it didn't give me a plot I wanted. Rather I wanted a plot in 3d, while it gave me a plot in 2d as the end result.

I guess my biggest problem right now is how to get Maple to treat omega (w) as a constant. Should I leave it out while trying to plot it? Because when I do I get a curved 2d line on the graph.
I'm unsure if graphing if covered in this forum, but it would be really helpful if a person could direct me in the right direction, maybe drop some advice as to which plot to use (like PDEplot or if plot3d is fine?)

Thanks a lot for the help guys.
 
Physics news on Phys.org
So I kept trying it, and looking up guides to graph said equation in the end I got:

T(x,t) := 10 exp(-.2 *x)*sin(omega*t+.2*x);
plot3d(T(x, t), x = -10 .. 10, t = 0 .. 10, axes = framed, orientation = [-20, 20])

I don't think I need too many lines of code to graph it, but I keep getting a flat graph. I mean I get a 2d plot on the xt plane while I want a 3d plot. I'm not 100% what I'm doing wrong, does anybody have a clue?

Thank you.
 
Ultramilk said:
So I kept trying it, and looking up guides to graph said equation in the end I got:

T(x,t) := 10 exp(-.2 *x)*sin(omega*t+.2*x);
plot3d(T(x, t), x = -10 .. 10, t = 0 .. 10, axes = framed, orientation = [-20, 20])

I don't think I need too many lines of code to graph it, but I keep getting a flat graph. I mean I get a 2d plot on the xt plane while I want a 3d plot. I'm not 100% what I'm doing wrong, does anybody have a clue?

Thank you.

I assume you have assigned a value to ω (you can't leave it undefined in a plot). I think if you remove the (x,t) like this:

T := 10 exp(-.2 *x)*sin(omega*t+.2*x);
plot3d(T, x = -10 .. 10, t = 0 .. 10, axes = framed, orientation = [-20, 20]);

it will work.
 
Oh wow that worked :O
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top