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

In summary, the conversation is about trying to graph the function T(x,t) = T1e^(lambda*x)sin(wt-lambda*x) in Maple, with given values for lambda, T1, and omega. The person is having trouble understanding how to graph a multiple variable function and is unsure which plot to use. They share their attempts and ask for advice. Another person suggests removing the (x,t) in the graphing code and it works.
  • #1
Ultramilk
10
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
  • #2
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.
 
  • #3
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.
 
  • #4
Oh wow that worked :O
 

1. How is heat flow represented in a heat equation graph?

The heat flow is represented by the change in temperature over time on the y-axis, and the distance or location on the x-axis.

2. What is the purpose of graphing a heat equation?

The purpose of graphing a heat equation is to visually represent the changes in temperature and heat flow over time and distance, making it easier to analyze and understand the behavior of the system.

3. How is the initial temperature and boundary conditions reflected in a heat equation graph?

The initial temperature is represented by the starting point of the graph, while the boundary conditions are shown as the limits or boundaries of the graph.

4. What does the slope of a heat equation graph indicate?

The slope of a heat equation graph indicates the rate of change of temperature over time or distance. A steeper slope indicates a faster change in temperature, while a flatter slope indicates a slower change.

5. Can a heat equation graph be used to predict future temperatures?

Yes, a heat equation graph can be used to predict future temperatures by analyzing the trend and patterns in the graph. However, it is important to note that other factors such as external heat sources or changes in the system may affect the accuracy of the prediction.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
446
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
Replies
1
Views
527
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
884
  • Introductory Physics Homework Help
Replies
14
Views
981
Back
Top