Infinite Integrals by Gaussian Quadrature
|
11-23-2022, 01:55 PM
Post: #1
|
|||
|
|||
Infinite Integrals by Gaussian Quadrature
The program INFGAUS calculates the integral:
∫ e^-x * f(x) dx from x = a to x = ∞ f(x) is the subroutine FX. The subroutine starts with the x value on the stack and ends with the RTN command. The HP 45 algorithm, which is incorporated into the program INFGAUS estimates the integral by the sum e^-a * Σ(( w_i * f(z_i + a)) for i=1 to 3) where w_1 = 0.71109390099 z_1 = 0.4157745568 w_2 = 0.2785177336 z_2 = 2.29428036 w_3 = 0.0103892565 z_3 = 6.289945083 Source HP-45 Applications Handbook Hewlett Packard Company. 1974. DM41X Program: INFGAUS The code can work is for the entire HP 41C/DM41 family. The calculator is set to Fix 2 mode. Registers 01 through 08 are needed. Code: 01 LBL^T INFGAUS Examples Example 1 ∫ e^-x * x^3.99 dx from x = 0 to ∞ (calculate Γ(4.99)) Code: LBL^T FX A? 0 Result: 23.64 Example 2 ∫ e^-x * x^2 ÷ (x - 1) dx from x = 2 to ∞ Code: LBL^T FX A? 2 Result: 0.62 Example 3 ∫ (e^-x)^2 dx from x = 0 to ∞ = ∫ (e^-x) * (e^-x) dx from x = 0 to ∞ Code: LBL^T FX A? 0 Result: 0.50 (it turns out 0.5 is the exact answer) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Infinite Integrals by Gaussian Quadrature - Eddie W. Shore - 11-23-2022 01:55 PM
RE: Infinite Integrals by Gaussian Quadrature - Albert Chan - 12-14-2022, 08:21 PM
RE: Infinite Integrals by Gaussian Quadrature - Albert Chan - 12-19-2022, 02:22 PM
RE: Infinite Integrals by Gaussian Quadrature - Albert Chan - 12-19-2022, 08:11 PM
|
User(s) browsing this thread: 1 Guest(s)