Probably a simple Maple syntax error(hopefully). Help?

  • Thread starter Thread starter mxotoni
  • Start date Start date
  • Tags Tags
    Maple
Click For Summary
SUMMARY

The discussion centers on a syntax error encountered while using Maple 2023 for graphing a function. The user defined a function f3 and attempted to plot it over the range x=0..0.69, but received a warning about being unable to evaluate the function. The issue was identified as using brackets instead of parentheses in the function definition, which led to Maple misinterpreting the input. Correcting this syntax resolved the error, allowing the graph to be generated successfully.

PREREQUISITES
  • Familiarity with Maple 2023 syntax and functions
  • Understanding of function plotting in Maple
  • Basic knowledge of mathematical expressions and their syntax
  • Experience with debugging common syntax errors in programming
NEXT STEPS
  • Review Maple 2023 documentation on function definitions and plotting commands
  • Learn about the differences between brackets and parentheses in Maple syntax
  • Explore advanced plotting techniques in Maple, including handling asymptotes
  • Investigate common error messages in Maple and their resolutions
USEFUL FOR

This discussion is beneficial for students, researchers, and educators using Maple for mathematical modeling and graphing, particularly those encountering syntax issues in their projects.

mxotoni
Messages
4
Reaction score
0
Probably a simple Maple syntax error(hopefully). Help? :)

1. I'm working on a research project. I've used this exact syntax below before and it worked on maple. I tried it a couple weeks later on the same computer in the math lab, and it didn't work. Then I tried it on my laptop- I think it is just a syntax- maybe someone can help me without knowing the theory behind the work.

Anyways, here's what I type into maple (tell me if you need the maple output)

c:=0.0012;
s:=-1.5;
m:=-2.8
f3:=1+s+c*[1+(1/(x^2))-(1/((1-x)^2))]-2*m*x;


(At this point everything is fine; the function is defined and the only unknown in the function is x)

Then, it's time for me to graph so f3 vs x, so this is what I type:

plot(f3,x=0..0.69);

I thought maybe the problem was the division by 0 (even though it should just give me an asymptote), I changed it to

plot(f3,x=0.1..0.69);


No luck even with this. The error I get is

"Warning, unable to evaluate the function to numeric values in the region;see the plotting command's help page to ensure the calling sequence is correct."


I'm frustrated because I got this to graph before with x=0..0.69. I know this graph is located in the first quadrant. I really hope it's a simple error. Any hints or suggestions or anything would be appreciated. I went to the maple site to troubleshoot, and it doesn't seem to me like I have the errors they listed.
 
Physics news on Phys.org
Just in case anyone was wondering, the issue was that I used brackets instead of parentheses. Maybe Maple thought it was a matrix!
 

Similar threads

Replies
13
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
7
Views
1K
Replies
28
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
1K
  • · Replies 7 ·
Replies
7
Views
6K