Casio fx-9750GIII: Integrals with Infinite Limits
A Substitution to Get to Infinity...
It is quite a challenge to calculate numerical integrals with infinite limits such as
∫( f(x) dx, a, ∞)
∫( f(x) dx, -∞, a)
∫( f(x) dx, -∞, ∞)
A trick is to substitute x = tan Θ. Then:
Θ = arctan x
dx = sec^2 Θ dΘ = cos^-2 Θ dΘ
lim t→∞ arctan t = π/2
lim t→-∞ arctan t = -π/2
In this blog, assume that radian angle mode is used in all calculations.
Let's go over some examples and see how it works. I used a Casio fx-9750GIII, however, this technique should work with all calculators with numerical integral calculations. Furthermore, changing the integral will allow for Simpson's Rule or Trapezoid Rule approximation.
For the upper limit, I approximate π/2.
A = 1.5708 (π/2 to 4 places)
B = 1.570796 (π/2 to 6 places)
C = 1.57079633 (π/2 to 8 places)
∫( e^(-x^2) dx, 0, ∞)
∫( e^(-tan^2 Θ)/cos^2 Θ dΘ, 0, ≈π/2)
Upper Limit: A (see above), Result: 0.8862269255
Upper Limit: B, Result: 0.8862269255
Upper Limit: C, Result: 0.8862269255
∫(x^0.5 * e^(-x) dx, 0, ∞)
∫((tan Θ)^0.5 * e^(-tan Θ))/cos^2 Θ dΘ, 0, π/2)
Upper limits A, B, C: 0.862269255
Coincidently, ∫( e^(-x^2) dx, 0, ∞) = ∫(x^0.5 * e^(-x) dx, 0, ∞) = Γ(1.5) = √(π)/2
∫( e^x*(x^2 + 1) dx, -∞, 0)
∫( e^(tan Θ) * (tan^2 Θ + 1)/cos^2 Θ dΘ, -π/2, 0)
= ∫( e^(tan Θ) * 1/cos^2 Θ * 1/cos^2 Θ dΘ, -π/2, 0)
∫( e^(tan Θ)/cos^4 Θ dΘ, -π/2, 0)
For upper limits A, B, C, the answer returned is 3, which is the exact answer.
For integrals like this all is needed is a four digit approximation of π/2 = 1.5708.
Let's keep going:
∫( (x^2 + 1)/(x^4 - 1) dx, 0, ∞)
∫( 1/cos^Θ * (tan^2 Θ + 1)/(tan^4 Θ - 1) dΘ, 0, π/2)
= ∫( 1/(sin^4 Θ - cos^4 Θ) dΘ, 0, π/2)
On the fx-9750GIII get MA Error.
∫( 1/√(x^2 + 3*x + 1) dx, 0, ∞)
∫( 1/(cos^2 Θ * √(tan^2 Θ + 3 * tan Θ + 1)) dΘ, 0, π/2)
like example 4, I get the MA Error.
Observation: the transformation works best if the integral involves some form of either of the following:
f(x) * e^(g(x))
f(x) * e^(-g(x))
The Gamma Function is an excellent candidate for this transformation.
Γ(t) = ∫( x^(t-1) * e^-x dx, 0, ∞)
∫( tan^(t-1) Θ * e^(-tan Θ)/cos^2 Θ dΘ, 0, π/2)
Mier-Jedrzejuwicz, W.A.C. Ph.D. Tips And Programs for the HP 32S Synthetix Publication. Berkeley, CA. September 1988. ISBN 0-937637-05-X
Download the book here: https://literature.hpcalc.org/items/1756
All original content copyright, © 2011-2022. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.