Why won't Maple graph this function?

  • Context: Maple 
  • Thread starter Thread starter qrt388
  • Start date Start date
  • Tags Tags
    Function Graph Maple
Click For Summary

Discussion Overview

The discussion revolves around issues encountered while attempting to graph a mathematical function using Maple software. Participants explore problems related to 3D plotting and contour plotting of the function defined by the user, addressing syntax and definition concerns.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant reports that Maple fails to generate a plot and returns a blank space when attempting to graph the function.
  • Another participant questions the use of the exponential function syntax, suggesting that the original expression may be incorrectly formulated and offers alternatives for correct syntax.
  • There is a suggestion that the function has not been properly defined, with one participant asserting that it should be defined as a function of two variables.
  • Another participant argues that defining the function as a two-variable function is not necessary for Maple to process it, but acknowledges that it may be convenient for evaluation at specific points.
  • Concerns are raised about whether the necessary plotting commands have been properly declared in Maple, specifically mentioning the need to use 'with(plots):' to access contour plotting functions.

Areas of Agreement / Disagreement

Participants express differing views on the necessity of defining the function explicitly and the correct syntax for the exponential function. The discussion remains unresolved regarding the best approach to rectify the plotting issues.

Contextual Notes

There are indications of missing assumptions regarding the function's definition and syntax, as well as potential dependencies on prior declarations in Maple that have not been confirmed.

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
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K