Found an interesting simple approximation for the integral of a function
|
06-15-2021, 09:16 PM
(This post was last modified: 06-18-2021 03:13 AM by Namir.)
Post: #1
|
|||
|
|||
Found an interesting simple approximation for the integral of a function
Hi,
I found in the 9th edition of "Numerical Analysis" by Burden & Faires, a question (number 16) on page 202 about estimating an integral using: Integral of f(x) from a to b = 9/4*h*f(x1) + 3/4*h*f(x2) Where h = (b-a)/3, x1 = a + h, and x2 = b. You can divide your interval (A, B) into a series of small (a, b) and reuse the above equation. Here is a Python implementation that uses the above equation is a series of small intervals: Code: from math import * The output is: Code: Area= 4.605170176738395 Does anyone know about this rather unusual algorithm? Namir |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Found an interesting simple approximation for the integral of a function - Namir - 06-15-2021 09:16 PM
RE: Found an interesting simple approximation for the integral of a function - ttw - 06-18-2021, 12:01 AM
RE: Found an interesting simple approximation for the integral of a function - Albert Chan - 06-18-2021, 12:52 AM
RE: Found an interesting simple approximation for the integral of a function - Namir - 06-18-2021, 05:13 AM
RE: Found an interesting simple approximation for the integral of a function - Albert Chan - 06-18-2021, 12:08 PM
RE: Found an interesting simple approximation for the integral of a function - Namir - 06-18-2021, 01:29 PM
|
User(s) browsing this thread: 2 Guest(s)