Why won't Maple graph this function?

  • Thread starter qrt388
  • Start date
  • #1
qrt388
2
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???
 

Answers and Replies

  • #2
Kreizhn
743
1
exp^ doesn't make any sense. Do you want

[itex] e^{-x^2-y^2} \text{ or } e^{x^2 y^2} [/itex]?

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:
  • #3
cristo
Staff Emeritus
Science Advisor
8,122
74
Well, you've not defined it as a function to start with: f:=(x,y)-> ...
 
  • #4
Kreizhn
743
1
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
 

Suggested for: Why won't Maple graph this function?

  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
4
Views
6K
  • Last Post
Replies
1
Views
2K
Replies
2
Views
2K
Replies
2
Views
3K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
4
Views
5K
Replies
2
Views
3K
  • Last Post
Replies
4
Views
3K
Replies
13
Views
7K
Top