210 likes | 407 Views
Trisection Algorithms. Presented by Namir Shammas. To Joe Horn, the “pinball wizard” or number rounding!. Dedication. “The much better is also the enemy of the good” -- Namir. My better Creed. In your dreams!!. Trisection Method.
E N D
Trisection Algorithms Presented by NamirShammas
To Joe Horn, the “pinball wizard” or number rounding! Dedication
“The much better is also the enemy of the good”-- Namir My better Creed
Trisection Method Each iteration divide the root-bracketing interval [A, B] into three parts, instead of two as does the Bisection. Chooses the first point X1within the interval [A, B] closest to the end point A, or B, that has the smallest absolute function value (call this point Z). If f(X1) and f(Z) have opposite signs, the iteration has finished its task. If f(X1) and f(Z) have the same signs, we calculate X2which closer to the other interval end point (call it Y).
Trisection Method (cont.) Determines whether the interval [X1, X2] or [X2, Y] is the new root-bracketing interval.
Trisection Plus Method Adds inverse linear interpolation to the Trisection method. Set Fa=f(A) and Fb=f(B) and start iterations as shown next until [A, B]<tolerance. If |Fa| < |Fb| calculate X1= A + (B - A) / 3 and evaluate Fx1=f(X1). This is case 1where [A, X1] has the root.
Trisection Plus Method If Fx1 * Fa < 0 Calculate X3 as the inverse linear interpolation using [A, Fa] and [X1, Fx1]. Also calculate Fx3=f(X3). If Fa * Fx3 < 0 then set point B = point X3, else set point A = point X3 and point B = point X1.
Trisection Plus Method (cont.) If Fx1 * Fa> 0 Calculate X2= A + 2 * (B - A) / 3. Also calculate Fx2=f(X2). This is case 2where [X1, X2] has the root. If Fx1 * Fx2 < 0 Calculate X3as the inverse linear interpolation using [X1, Fx1] and [X2, Fx2]. Also calculate Fx3=f(X3). If Fx1 * Fx3 < 0 then set point A=point X1 and point B=point X3, else set A=point X3and point B=point X2.
Trisection Plus Method (cont.) If Fx1 * Fx2 > 0 Calculate X3 as the inverse linear interpolation using [X2, Fx2] and [B, Fb]. Also calculate Fx3=f(X3). If Fx2 * Fx3 < 0 then set point A = point X2 and point B = point X3, else set point A = point 3. If |Fa| > |Fb| we deal with symmetrical 3 cases as above.
Trisection Plus Method (cont.) Included in HHC material are HP Prime listings for the Bisection Plus, Trisection, and Trisection Plus algorithms. Also included are version 2 of the above listings. Version 2 of the listings store, in matrix M0, the values for [A, B] along with X1, X2, and X3 (in case of the Trisection Plus) for each iterations. Viewing matrix M0 allows you to inspect the programs of each iteration.