Why won't Maple graph this function?

  • Context: Maple 
  • Thread starter Thread starter qrt388
  • Start date Start date
  • Tags Tags
    Function Graph Maple
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 6K views
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

[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:
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