08-24-2019, 03:34 PM
The program INTEGRALSOLVE solve the following equation:
(Format: ∫( integrand dvar, lower, upper)
∫( f(t) dt, 0, x) = a
∫( f(t) dt, 0, x) - a = 0
It is assumed that x>0.
We can use the Second Theorem of Calculus which takes the derivative of the integral:
d/dx ∫( f(t) dt, a, x) = f(x)
We don't have to worry about lower limit a at all for the theorem to work.
∫( f(t) dt, 0, x) - a
Take the derivative with respect to x on both sides (d/dx):
= d/dx ∫( f(t) dt, 0, x) - a
= d/dx ∫( f(t) dt, 0, x) - d/dx a
Let F(t) be the anti-derivative of f(t):
= d/dx (F(x) - F(0)) - 0
= d/dx F(x) - d/dx F(0)
F(0) is a constant.
= f(x)
Newton's Method to find the roots of f(x) can be found by the iteration:
x_(n+1) = x_n - f(x_n) / f'(x_n)
Applying that to find the roots of ∫( f(t) dt, 0, x) - a:
x_(n+1) = x_n - (∫( f(t) dt, 0, x_n) - a) / f(x_n)
Program:
Example 1:
∫( 2*t^3 dt, 0, x) = 16
Guess = 2
Root ≈ 2.3784
Example 2:
∫( sin^2 t dt, 0, x) = 1.4897
Guess = 1
(Radians Mode)
Root ≈ 2.4999
Source:
Green, Larry. "The Second Fundamental Theorem of Calculus" Differential Calculus for Engineering and other Hard Sciences. Lake Tahoe Community College.
http://www.ltcconline.net/greenl/courses...ECFUND.HTM
Retrieved July 25, 2019
Blog entry: http://edspi31415.blogspot.com/2019/08/h...lving.html
(Format: ∫( integrand dvar, lower, upper)
∫( f(t) dt, 0, x) = a
∫( f(t) dt, 0, x) - a = 0
It is assumed that x>0.
We can use the Second Theorem of Calculus which takes the derivative of the integral:
d/dx ∫( f(t) dt, a, x) = f(x)
We don't have to worry about lower limit a at all for the theorem to work.
∫( f(t) dt, 0, x) - a
Take the derivative with respect to x on both sides (d/dx):
= d/dx ∫( f(t) dt, 0, x) - a
= d/dx ∫( f(t) dt, 0, x) - d/dx a
Let F(t) be the anti-derivative of f(t):
= d/dx (F(x) - F(0)) - 0
= d/dx F(x) - d/dx F(0)
F(0) is a constant.
= f(x)
Newton's Method to find the roots of f(x) can be found by the iteration:
x_(n+1) = x_n - f(x_n) / f'(x_n)
Applying that to find the roots of ∫( f(t) dt, 0, x) - a:
x_(n+1) = x_n - (∫( f(t) dt, 0, x_n) - a) / f(x_n)
Program:
Code:
EXPORT INTEGRALSOLVE(f,a,x)
BEGIN
// f(X) as a string, area, guess
// ∫(f(X) dX,0,x) = a
// EWS 2019-07-26
// uses Function app
LOCAL x1,x2,s,i,w;
F0:=f;
s:=0;
x1:=x;
WHILE s==0 DO
i:=AREA(F0,0,x1)-a;
w:=F0(x1);
x2:=x1-i/w;
IF ABS(x1-x2)<1ᴇ−12 THEN
s:=1;
ELSE
x1:=x2;
END;
END;
RETURN approx(x2);
END;
Example 1:
∫( 2*t^3 dt, 0, x) = 16
Guess = 2
Root ≈ 2.3784
Example 2:
∫( sin^2 t dt, 0, x) = 1.4897
Guess = 1
(Radians Mode)
Root ≈ 2.4999
Source:
Green, Larry. "The Second Fundamental Theorem of Calculus" Differential Calculus for Engineering and other Hard Sciences. Lake Tahoe Community College.
http://www.ltcconline.net/greenl/courses...ECFUND.HTM
Retrieved July 25, 2019
Blog entry: http://edspi31415.blogspot.com/2019/08/h...lving.html