Maple Why won't Maple graph this function?

Click For Summary
The discussion revolves around issues with plotting a mathematical function using Maple software. The user encounters a blank space when attempting to create a 3D plot with the expression f:=(x+(3*y)-1)*exp^(-(x^2-(y^2))). It is suggested that the exponential function is incorrectly formatted, and clarification is provided on whether the intended expression is e^(-x^2-y^2) or e^(x^2*y^2). The correct syntax for the exponential function is emphasized, along with the importance of proper bracketing. Additionally, there is a note that defining f as a function of x and y is not necessary for plotting, but it can be useful for evaluations. Lastly, the need to include the command with(plots) to access plotting functions in Maple is highlighted, as this is essential for generating contour plots.
qrt388
Messages
2
Reaction score
0
> f:=(x+(3*y)-1)*exp^(-(x^2(-(y^2));
> plot3d(f,x=-3..3,y=-3..3);

After this, Maple says it is initializing a plot and then I get a big blank space.

I'm also trying to find the contours, but when I type:

> contourplot(f,x=-3..3,y=-3..3,contours=5);

Maple just gives: contourplot(f,x=-3..3,y=-3..3,contours=5)

How can I fix these two things?
 
Physics news on Phys.org
exp^ doesn't make any sense. Do you want

e^{-x^2-y^2} \text{ or } e^{x^2 y^2}?

if you want the first write
exp(-x^2-y^2);
if you want the second (which is more-or-less what you currently have in your expression) write
exp(x^2*y^2)

Edit: also your bracketing is very much off in your exponential function
 
Last edited:
Well, you've not defined it as a function to start with: f:=(x,y)-> ...
 
cristo said:
Well, you've not defined it as a function to start with: f:=(x,y)-> ...

You don't need to define f as a function of x and y in this case. Maple will accept f as being a function of indeterminates. It's convenient to define it the way you've written if you plan on evaluate f(x,y) at some points, but the way qrt388 has done it is fine. If qrt388 wants to evaluate f at some points he'll then need to use eval(f, [x=blah, y=blah]).

Also, have you declared with(plots): at some point? You can't use contourplots unless you've told Maple to access those commands
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K