Full Version: Trying To Enter Program
plastikaa
This is the first time I've tried to enter a program on my calculator so im not too good at this, but anyway I think ive manged to enter all of the program in correclty apart from I cant find one thing on my calculator (fx-9750G - im guessing its compatible with this program for the cfx-9850G), below shows the program Im trying to enter:

QUOTE
# TITLE:  Comparison of Integrating Methods
# AUTHOR: Roy F.A. Maclean
# EMAIL:  rfam AT lycosmail.com
# WEB:    http://members.tripod.co.uk/rfam
# DATE:  8Nov1995, 9850version:15Nov1996
# MAKE:  CASIO
# MODEL:  cfx-9850G
# SIZE:  95
#
# Store function to integrate as a function of x into f-memory 'f6'.
# Program prompts for 'a' and 'b' the lower and upper bounds of
# integration. Then for S - the number of sections to divide
# the interval into. The higher the number the more accurate.
# The result of the trapesium method, the simpson method and the inbuilt
# integrating will be displayed for comparison.
#
# Integrate        |optn|f4|f4|
#
# Frac              |optn|f6|f4|f3|


@@ Program "CMPARINT"

0->A~Z
"A"?->A:"B":?->B
"S"?->S:(B-X)/S->H
f6->T:T->U
Integrate(f6,A,B)->V
Lbl 1
X+H->H
C=S-1=>Goto 2
1-Frac (C/2)->W
T+4Wf6->T
U+2f6->U
Isz C:Goto 1
Lbl 2
"T":H(U+f6)/2_
"S":H(T+f6)/3_
"I":V


I cant seem to find the _ which follows the 2 and 3. Can someone tell me where this is? Also am I correct in just entering the letters like normal letters for all of them in the program apart from the f6 which I know is a function I have to store, and have to enter by using the f6 recall thing.

Thanks help will be much appreicated.
Bob Vila
the _ thing you are refering to can be accessed by pushing SHIFT.jpg then VARS.jpg then F5.jpg (should look like a right triangle)
Andy.Davies
yep, whats what they are representing smile.gif
plastikaa
Hmmm this progrma doesnt seem to be working, the trapezium rule and simpsons rule give similar ansers but integration gives a completely different result. Is something wrong in the code posted above ive checked what ive entered a couple of times to check and it appears the same.
TacoFred
i think integrate function is
integrate(function,variable,lowerbound,upperbound)
octobclrnts
well I know that from a 9850 standpoint that the variable is not needed it's just integrate([function in terms of x],[lower bound],[upper bound]). I believe however that line 3 should read:

"S"?->S:(B-A)/S->H
plastikaa
Ive already tried that alteration as it didnt seem to match up with the 'real' formula and still no sucess with the program, can someone enter the program and see if it works, and possibly tell me the functions, bounds and sections they used and give the results aswell.

Also all the / are divisions right?
Bob Vila
did you try using divide.jpg or abc.jpg instead of "/"?
plastikaa
Yes I used the division button.

...Somethings wrong with the code for the number of sectors as when the number is increased the trapezium and simpsons values increase.
caspro
Just discovered this old post from nearly 2 years ago.
The poster plastikaa hasn't been back on the forum since,
but in any case I've had a look to see how to fix the program.

You do change it to (B-A)/S as was suggested.
Also need to add an A->X,
and X+H->H should be X+H->X
and the built-in bit goes last.

All of which leaves the program like this:

0->A~Z
"A"?->A:"B":?->B
"S"?->S:(B-A)/S->H
A->X:f6->T:T->U
Lbl 1
X+H->X
C=S-1=>Goto 2
1-Frac (C/2)->W
T+4Wf6->T
U+2f6->U
Isz C:Goto 1
Lbl 2
"T":H(U+f6)/2_
"S":H(T+f6)/3_
"I":Integrate(f6,A,B

EDIT: Just to add that for the simpson rule to work S must be an even number.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.