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

  • Thread starter Thread starter mxotoni
  • Start date Start date
  • Tags Tags
    Maple
Click For Summary
The user is encountering a syntax error in Maple while trying to graph a function defined as f3. Despite using the same syntax previously without issues, the function fails to plot, returning a warning about evaluating numeric values. The user suspects a division by zero might be the cause and attempts to adjust the plotting range without success. Ultimately, the problem was identified as using brackets instead of parentheses, which may have led Maple to interpret the input incorrectly. This highlights the importance of correct syntax in programming environments like Maple.
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!
 
The book claims the answer is that all the magnitudes are the same because "the gravitational force on the penguin is the same". I'm having trouble understanding this. I thought the buoyant force was equal to the weight of the fluid displaced. Weight depends on mass which depends on density. Therefore, due to the differing densities the buoyant force will be different in each case? Is this incorrect?

Similar threads

Replies
13
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · 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
5K