Estimated area under a curve program

In summary, the conversation was about a TI-86 program that uses different methods to estimate the area under a curve. However, the program is not functioning properly and has sometimes given incorrect answers. The code for the program was also shown and the person asked for help in streamlining it.
  • #1
Jeremy
28
0
I wrote a TI-86 program for estimating the area under a curve using "Right Rectangular Approximation Method" (RRAM), "Left..." (LRAM), and "Trapezoid" method.

However, it refuses to work. Sometimes it works, but I have gotten answers that are way off. Once i got something that was 3x the correct answer.

InpSt "Function;",EQ
St>Eq(EQ,y9)
Input "Min=",EN
Input "Max=",EX
Input "# of intervals:",EI
(EX-EN)/EI -> LI
EN -> NN
EN -> NP
0 -> AA
For (NN,EN,EX-LI,LI)
AA+y9(EN) -> AA
End
AA(LI) -> AA
0 -> AB
For (NP,EN+LI,EX,LI)
AB+y9(NP) -> AB
End
AB(LI) -> AB
(AA+AB)/2 -> AC
Disp "LRAM",AA
Disp "RRAM",AB
Disp "Trap",AC

why doesn't this work? also, could it be streamlined?
 
Physics news on Phys.org
  • #2
for simplicities sake i used -> as an arrow. i see now that it looks like a minus greater than sign.
 
  • #3


I would recommend troubleshooting your program to identify where the error is occurring. It is possible that there is a mistake in the code or a logic error that is causing incorrect results. You could try running the program with different functions and intervals to see if the issue persists. Additionally, you could compare your program with other similar programs to see if there are any differences that could be causing the error.

In terms of streamlining the program, you could consider using more efficient coding techniques or incorporating different methods for estimating the area under the curve. It may also be helpful to add in error handling to catch any potential issues that could arise. Overall, it is important to thoroughly test and debug your program to ensure accurate results.
 

Related to Estimated area under a curve program

1. What is the estimated area under a curve program?

The estimated area under a curve program is a mathematical tool used to approximate the area under a curve on a graph. It is commonly used in fields such as physics, economics, and statistics to estimate the total value of a set of data points.

2. How does the estimated area under a curve program work?

The program works by dividing the graphed curve into smaller segments and approximating the area of each segment using basic geometric shapes, such as rectangles or trapezoids. The sum of these approximated areas gives an estimate of the total area under the curve.

3. What are the benefits of using the estimated area under a curve program?

The program allows for a quick and efficient estimation of the area under a curve, which can be useful in situations where calculating the exact area is not necessary. It is also a useful tool for analyzing large sets of data and identifying patterns or trends.

4. What are the limitations of the estimated area under a curve program?

The estimated area under a curve program is only an approximation and may not be accurate for complex or irregularly shaped curves. It also relies on the user to choose the appropriate number and size of segments, which can affect the accuracy of the estimation.

5. How is the accuracy of the estimated area under a curve program determined?

The accuracy of the program depends on the number and size of segments used to approximate the curve. Generally, the more segments used, the more accurate the estimation will be. However, the accuracy can also be affected by the shape and complexity of the curve being approximated.

Similar threads

  • Programming and Computer Science
Replies
6
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
11K
  • Introductory Physics Homework Help
Replies
5
Views
2K
  • STEM Academic Advising
Replies
13
Views
2K
  • Advanced Physics Homework Help
Replies
6
Views
4K
Replies
7
Views
4K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
Back
Top