Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3874842
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:11:54+00:00 2026-05-19T22:11:54+00:00

My Calculus teacher gave us a program on to calculate the definite integrals of

  • 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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T22:11:54+00:00Added an answer on May 19, 2026 at 10:11 pm

    the polynomial, (x^2+11x+28)/(x+4)

    This is equal to x+7. The trapezoidal rule should give exactly correct results for this function! I’m guessing that this isn’t actually the function you’re working with…

    There is no general way to determine, given the output of a function, what its input was. (For one thing, many functions can map multiple different inputs to the same output.)

    So, there is a formula for the error when you apply the trapezoidal rule with a given number of steps to a given function, and you could use that here to work out the value of n you need … but (1) it’s not terribly beautiful, and (2) it doesn’t seem like a very reasonable thing to expect you to do when you’re just starting to look at the trapezoidal rule. I’d guess that your teacher actually just wanted you to “plug and chug”.

    I don’t know (see above) what function you’re actually integrating, but let’s pretend it’s just x^2+11x+28. I’ll call this f(x) below. The integral of this from 0 to 9 is actually 940.5. Suppose you divide the interval [0,9] into n pieces. Then the trapezoidal rule gives you: [f(0)/2 + f(1*9/n) + f(2*9/n) + … + f((n-1)*9/n) + f(9)/2] * 9/n.

    Let’s separate this out into the contributions from x^2, from 11x, and from 28. It turns out that the trapezoidal approximation gives exactly the right result for the latter two. (Exercise: Work out why.) So the error you get from the trapezoidal rule is exactly the same as the error you’d have got from f(x) = x^2.

    The actual integral of x^2 from 0 to 9 is (9^3-0^3)/3 = 243. The trapezoidal approximation is [0/2 + 1^2+2^2+…+(n-1)^2 + n^2/2] * (9/n)^2 * (9/n). (Exercise: work out why.) There’s a standard formula for sums of consecutive squares: 1^2 + … + n^2 = n(n+1/2)(n+1)/3. So our trapezoidal approximation to the integral of x^2 is (9/n)^3 times [(n-1)(n-1/2)n/3 + n^2/2] = (9/n)^3 times [n^3/3+1/6] = 243 + (9/n)^3/6.

    In other words, the error in this case is exactly (9/n)^3/6 = (243/2) / n^3.

    So, for instance, the error will be less than 0.01 when (243/2) / n^3 < 0.01, which is the same as n^3 > 100*243/2 = 12150, which is true when n >= 23.

    [EDITED to add: I haven’t checked any of my algebra or arithmetic carefully; there may be small errors. I take it what you’re interested is the ideas rather than the specific numbers.]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a program in C++/OpenGL (using Dev-C++ compiler) for my calculus 2 class.
To all the people who know lambda calculus : What benefit has it bought
Lambda calculus of course is quite elegant, but doesn't it bother you that there
Does anyone know of a Calculus library for JavaScript? I've done some Googling and
I'm using F# to create a lambda calculus. I am currently stuck trying to
I am currently writing a program that reads records from a txt file and
I created a set of programs to calculate the area under a graph using
We don't teach children calculus first. We first teach them arithmetic, then algebra, then
So the Wikipedia entry on Lambda Calculus was interesting but I've finished it. I
I am learning lambda calculus but I cant seem to understand the encoding for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.