views:

22

answers:

0

My Calculus teacher gave us a program on to calculate the definite integrals of a given interval using the trapezoidal rule. I know that programmed functions take an input and produce an output as arithmetic functions would but I don't know how to do the inverse: find the input given the output.

The problem states:

"Use the trapezoidal rule with varying numbers, n, of increments to estimate the distance traveled from t=0 to t=9. Find a number D for which the trapezoidal sum is within 0.01 unit of this limit (468) when n > D."

I've estimated the limit through "plug and chug" with the calculator and I know that with a regular algebraic function, I could easily do:

limit (468) = algebraic expression with variable x (then solve for x)

However, how would I do this for a programmed function? How would I determine the input of a programmed function given output?

I am calculating the definite integral for the polynomial, (x^2+11x+28)/(x+4), between the interval 0 and 9. The trapezoidal rule function in my calculator calculates the definite integral between the interval 0 and 9 using a given number of trapezoids, n.

Overall, I want to know how to do this:

Solve for n: 468 = trapezoidal_rule(a = 0, b = 9, n);

The code for trapezoidal_rule(a, b, n) on my TI-83:

Prompt A
Prompt B
Prompt N
(B-A)/N->D
0->S
A->X
Y1/2->S
For(K,1,N-1,1)
X+D->X
Y1+S->S
End
B->X
Y1/2+S->S
SD->I
Disp "INTEGRAL"
Disp I

Because I'm not familiar with this syntax nor am I familiar with computer algorithms, I was hoping someone could help me turn this code into an algebraic equation or point me in the direction to do so.

Edit: This is not part of my homework—just intellectual curiosity