
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The commands and calculations involved in a programming integration using basic language. It covers the steps to input lower and upper limits, number of subdivisions, and the calculations of left sum, midpoint sum, and approximations using trapezoidal rule and simpson's rule.
Typology: Study notes
1 / 1
This page cannot be seen from the preview
Don't miss anything!
Prgm: INTEGRAL Where to Find The Commands :Disp “LOWER LIMIT” Disp and Input are accessed via PRGM, I/O :Input A Enter lower limit of integration. :Disp “UPPER LIMIT” :Input B Enter upper limit of integration. :Disp “DIVNS” :Input N Enter number subdivisions. :(B A)=N! H Stores size of one subdivision in H (Note that! means hit STO button). :A! X Start X off at beginning of interval. :0! L Initialize L, which keeps track of left sums, to zero. :0! M Initialize M , which keeps track of midpoint sums, to zero. :1! I Initialize I , the counter for the loop. :Lbl P Label for top of loop. Lbl is accessed via PRGM, CTL. :L + H Y 1! L Increment L by Y 1 H , the area of one more rectangle. (Y 1 is accessed via Y -VARS, or 2nd VARS.) :X + : 5 H! X Move X to middle of interval. :M + H Y 1! M Evaluate Y 1 at the middle of interval and increment M by rectangle of this height. :X + : 5 H! X Move X to start of next interval. :I S > (I ; N ) I S > ( is accessed via PRGM, CTL. This is the most difficult step in the program: adds 1 to I and does the the next step if I N (i.e., if haven’t gone through loop enought times); otherwise, skips next step. Thus, if I N , goes back to Lbl P and loops through again. If I > N , loop is finished and goes on to print out results. Continue here if I > N , in which case the value of X is now B. :Goto P Goto is accessed via PRGM, CTL. Jumps back to Lbl P if J N. :Disp “LEFT/RIGHT” :Disp L L now equals the left sum, so display it. :L + H Y 1! R Add on area of right-most rectangle, store in R. :A! X Reset X to A. :R H Y 1! R Subtract off area of left-most rectangle. :Disp R R now equals right sum, so display it. :(L + R)= 2! T Trap approximation is average of L and R. :Disp “TRAP/MID/SIMP” :Disp T Display trap approximation. :Disp M Display midpoint approximation. :( 2 M + T )= 3! S Simpson is weighted average of M and T. :Disp S Display Simpson’s approximation.