Solving Integral Equations
08-24-2019, 09:07 PM (This post was last modified: 09-07-2019 08:00 PM by Albert Chan.)
Post: #2
 Albert Chan Senior Member Posts: 2,516 Joined: Jul 2018
RE: Solving Integral Equations
Hi, Eddie

My guess is the integral calculations will take the most time.
Instead of always do integral from 0 to x, why not re-use old integral calculations ?

∫(f(u), u=0 to x) = ∫(f(u), u=0 to t) + ∫(f(u), u=t to x)

(08-24-2019 03:34 PM)Eddie W. Shore Wrote:  ∫( sin^2 t dt, 0, x) = 1.4897
Guess = 1
Root ≈ 2.4999

This is my Mathematica code, only for proof of concept.

Quote:f[x_] := Sin[x]^2;
F[a_,b_] := Integrate[f[x], {x,a,b}];
a = 1.4897

newton[{x_,t_,Ft}] := Module[{Fx = Ft + F[t,x]}, {x - (Fx-a)/f[x], x, Fx}];
newton[x_] := newton[{x,0,0}]

> NestList[newton, 1.0, 5]

{1.0,
﻿ ﻿{2.71878, 1., 0.272676},
﻿ ﻿{2.38150, 2.71878, 1.54649},
﻿ ﻿{2.48529, 2.38150, 1.44043},
﻿ ﻿{2.49964, 2.48529, 1.48436},
﻿ ﻿{2.49991, 2.49964, 1.4896}}

Note: x=2.49991 already converged to 1.4897. The value 1.4896 were previous integral, 0 to 2.49964
 « Next Oldest | Next Newest »

 Messages In This Thread Solving Integral Equations - Eddie W. Shore - 08-24-2019, 03:34 PM RE: Solving Integral Equations - Albert Chan - 08-24-2019 09:07 PM

User(s) browsing this thread: 1 Guest(s)