110 likes | 387 Views
Muller’s Derivation. Muller’s Method. quadratic. y = f(x). x. x 1. x 2. x 3. Muller’s Method. Start with three points (x 1 ,y 1 ), (x 2 ,y 2 ), (x 3 ,y 3 ) and the quadratic in the form of y = d 1 (x-x 2 )(x-x 3 ) + c 2 (x-x 3 ) + y 3 y 1 – y 2 Define c 1 = -------
E N D
Muller’s Method quadratic y = f(x) x x1 x2 x3
Muller’s Method Start with three points (x1,y1), (x2,y2), (x3,y3) and the quadratic in the form of y = d1(x-x2)(x-x3) + c2(x-x3) + y3 y1 – y2 Define c1 = ------- x1 – x2 Substitute (x2,y2) into the above quadratic ( ), we get y2 = d1(x2-x2)( x2-x3) + c2(x2-x3) + y3 y2 - y3 ------- = c2 x2 - x3
Continue Substitute (x1,y1) into the above quadratic ( ), we get y1 = d1(x1-x2)( x1-x3) + c2(x1-x3) + y3 y1 - y3 ------- = d1(x1-x2) + c2 x1 - x3 y1 – y2 + y2 - y3 ---------------- - c2 = d1(x1-x2) x1 - x3 y1 – y2 + y2 - y3 c2 ---------------- - ------- = d1 (x1 - x3)(x1-x2) (x1-x2)
Continue y1 – y2 y2 - y3 (x1-x3)c2 ------------- + ---------- - -------------- = d1 (x1-x3)(x1-x2) (x1-x3)(x1-x2) (x1-x2)(x1-x3) (y2 - y3)( x2 - x3) ------------------ c1 x2 - x3 (x1-x3)c2 --------- + --------------------- - ------------- = d1 (x1-x3) (x1-x3)(x1-x2) (x1-x2)(x1-x3)
Continue c1 c2 (x2-x3)(x1-x3)c2 -------- + -------------- - ---------- = d1 (x1-x3) (x1-x3)(x1-x2) (x1-x2)(x1-x3) c1 c2 (x2-x1) -------- + ------------ = d1 (x1-x3) (x1-x3)(x1-x2) c1 -c2 ----------- = d1 (x1-x3)
Continue Consider the quadratic ( )again y = d1(x-x2)(x-x3) + c2(x-x3) + y3 y = d1(x-x3+x3-x2)(x-x3) + c2(x-x3) + y3 y = d1(x-x3)(x-x3)+ d1(x3-x2)(x-x3)+ c2(x-x3) + y3 y = d1(x-x3)2 + d1(x3-x2)(x-x3) + c2(x-x3) + y3 Let s = d1(x3-x2) + c2 then y = d1(x-x3)2 + s(x-x3) + y3 Solve for a root: 0 = d1(x-x3)2 + s(x-x3) + y3
Continue To find the root closest to x3, find x so that z = 1/(x - x3) is as large as possible. So solve for z in 0 = d1 + sz + y3z2 __________ z = -s s2 – 4y3d1 ------------------- 2 y3 _________ z = -s - sign(s) s2 – 4y3d1 ---------------------------- 2 y3 So, 2 y3 x = x3 - ---------------------- ___________ s + sign(s) s2 – 4y3d1
Try Some Examples • Solve x3 – x + 2 = 0 >> roots([1 0 -1 2]) ans = -1.52137970680457 0.76068985340228 + 0.85787362659518i 0.76068985340228 - 0.85787362659518i >> mullerquick(inline('x^3-x+2'),0,-.5, -1) x(1) = -1.75830573921179 - 0.00000000000000i x(2) = -1.49926302975117 - 0.00000000000000i x(3) = -1.52092880889720 - 0.00000000000000i x(4) = -1.52137930965153 - 0.00000000000000i x(5) = -1.52137970680523 - 0.00000000000000i x(6) = -1.52137970680457 - 0.00000000000000i x(7) = -1.52137970680457 - 0.00000000000000i
Continue >> mullerquick(inline('x^3-x+2'),.5+1i,.6+.9i,.7+.8i) x(1) = 0.71856199101924 + 0.89859921025906i x(2) = 0.78795773752017 + 0.88306417324757i x(3) = 0.77762178199432 + 0.83914587049108i x(4) = 0.74755387793361 + 0.84538974913787i x(5) = 0.75194614048869 + 0.86698574649461i x(6) = 0.76696166211287 + 0.86374867314893i x(7) = 0.76473312809717 + 0.85353675807555i x(8) = 0.75767823986813 + 0.85503342406855i x(9) = 0.75871781522482 + 0.85995999239523i x(10) = 0.76213246715513 + 0.85922968010984i … x(87) = 0.76068985340228 + 0.85787362659518i x(88) = 0.76068985340228 + 0.85787362659518i x(89) = 0.76068985340228 + 0.85787362659518i x(90) = 0.76068985340228 + 0.85787362659518i x(91) = 0.76068985340228 + 0.85787362659518i x(92) = 0.76068985340228 + 0.85787362659518i x(93) = 0.76068985340228 + 0.85787362659518i