Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Why won't Maple graph this function?

  1. May 3, 2008 #1
    > 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???
  2. jcsd
  3. May 3, 2008 #2
    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
    if you want the second (which is more-or-less what you currently have in your expression) write

    Edit: also your bracketing is very much off in your exponential function
    Last edited: May 3, 2008
  4. May 3, 2008 #3


    User Avatar
    Staff Emeritus
    Science Advisor

    Well, you've not defined it as a function to start with: f:=(x,y)-> ...
  5. May 3, 2008 #4
    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
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook