Casio Program Help for AP Calc Riemann Sums

Click For Summary

Discussion Overview

The discussion centers around troubleshooting a program for calculating Riemann sums on a Casio fx-cg10 calculator. Participants are exploring syntax errors, programming logic, and potential issues with variable naming and looping structures.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant notes a syntax error in the code and questions the use of (2N) in the expression (B-A)/(2N)->H, suggesting it should simply be N.
  • Another participant asks if setting M to zero is necessary and expresses uncertainty about the function Dsz N.
  • Concerns are raised about the Goto command being problematic due to its lack of a formal exit feature, which may lead to errors.
  • A participant emphasizes that (B-A)/N->H is the correct formulation and warns that the Casio may misinterpret variable names like 2Hf and 2HL as multiplication instead of distinct variables.
  • Suggestions are made to explore other looping structures available on the Casio calculator, such as Do Loops or IF statements, as alternatives to Goto.
  • There is a recommendation to check the calculator's manual for variable naming restrictions and to search online for existing programs that could assist with the integration function.

Areas of Agreement / Disagreement

Participants express differing views on the correct formulation of the Riemann sum expression and the appropriateness of using Goto commands in programming. There is no consensus on the best approach to resolve the syntax error or the overall programming strategy.

Contextual Notes

Participants highlight potential limitations related to variable naming conventions and the specific programming capabilities of the Casio fx-cg10, which may affect the implementation of the Riemann sum calculation.

Who May Find This Useful

Individuals interested in programming calculators, specifically for AP Calculus applications, and those seeking assistance with syntax and logic in programming Riemann sums.

15kororya
Messages
1
Reaction score
0
Hi brand new to the site. I keep on having a syntax error when I run the code below on my casio fx-cg10. Btw I also put a display triangle on the last m as well
upload_2015-3-18_18-12-57.png
 
Computer science news on Phys.org
Well, I will comment for what little it will be worth.

(B-A)/(2N)->H Shouldn't the 2N simply be N?
0->M Do you want to set M to zero (this may be true to zero out variables, just asking)
Dsz N I don't recognize this function
Goto 1 This could also be a problem for you as a goto function is down and dirty without a formal exit feature. Not sure how your calculator functions to catch errors after this Goto 1.

Have you tried a simpler program as the triangle may mean you are awaiting inputs. Not sure either.
 
Definitely (B-A)/N-> H and NOT (2N) as the Casio will try to multiply N*2 (doesn't support 2 variable names, and this could also be your problem further down in your program as well.)

You should check to see if your CASIO has other looping structures other than GOTO (although I am a down and dirty programmer and don't have any aversion to this). ie Do Loops or IF, THEN, ELSE to do the summation under the function. Certain words are reserved as programming commands, but your use of 2Hf and 2HL may not be allowed by the CASIO (they could be, check your manual if your calculator allows long variable names). On a Ti 83/84 this would not be an allowed variable name, but would be interpreted as 2*H*f or 2*H*L.

You might also do a web search or visit a Casio programming site and see if someone has done this for you (I suspect they have). This is an integration function as you have named it and new calculators have this function built in. However, 20 years ago, this wasn't the case and older programmable calculators had to use this type of program to compensate for not having built in numerical integration. You should be successful in finding a BASIC program and making it would with your CASIO as it is fairly similar.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
7K
  • · Replies 32 ·
2
Replies
32
Views
4K
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
11K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 75 ·
3
Replies
75
Views
7K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K