1 / 8

Muller ‘ s mothod

Muller ‘ s mothod. Hun Hee Lee. Muller ’ s method. Muller ’ s method for solving an equation of one variable f(x)=0. Muller ’ s method is an iterative method that requires three starting values (x i ,f(x i )), (x i-1 ,f(x i-1 )),(x i-2 ,f(x i-2 )).

urania
Download Presentation

Muller ‘ s mothod

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Muller‘s mothod Hun Hee Lee

  2. Muller’s method Muller’s method for solving an equation of one variable f(x)=0. Muller’s method is an iterative method that requires three starting values (xi,f(xi)), (x i-1,f(x i-1)),(x i-2,f(x i-2)). A parabola is constructed that passes though the three point; then the quadratic formula is use to fine of the quadratic equation for the next approximation

  3. g(X)=ax2+bx+c y=g(x) y=f(x) h x1 x2 h x3 f(x)=0

  4. Algorithm: Muller’s method to sovle an quation of one variable Input: intial values x0,x1,x2,Error bound  Calculate: Approximate solution x I+1 compute f(x0), f(x1), f(x2) compute h2=x2-x1,h1=x1-x0 Eliminating c of g(x)

  5. set i=2 Do { a of g(x) Let G=ci if if Set x i+1=x i+h i+1 Comute f(x i+1)and Set i= i+1 }WHILE ( |h| ) Output :x i+1 END

  6. g(X)=ax2+bx+c S>0,G<0 hi+1 y=g(x) S>0,G>0 hi+1 x=G-S x i x i x= G+s S<0 hi+1

  7. #include<stdio.h>#include<math.h>#include<conio.h>#include<stdlib.h>double f,X,err;double F(double X);double M(double x1);void main(){ int loop_index; double x1; err=1.0e-12; printf("type initial vaule:"); scanf("%lf",&x1); X=M(x1); printf("root=%f",X); getch();} Program source double M(double x1){ double xr,xl,xc,h,hi,fc,fr,fl,DLR,f1,f2,f3,G,S,DEN; hi=1.0e-8; h=hi; xr=x1+h;fr=F(xr); xl=x1-h;fl=F(xl); f1=(fr-fc)/h; xc=x1; fc=F(xc); X=xc;do { f2=(fc-fl)/h; f3=(f2-f1)/(2*h); f1=f2; G=f2+f3*h; S=G*G-4.0*fc*f3; if(S>=0) S=sqrt(S); if (G>=0) DEN=G+S; else DEN=G-S; h=-2.0*fc/DEN; fl=fc; X=X+h; fc=F(X);f2=(fc-fl)/h; printf("%20.16lf",h);getch(); } while(fabs(h)>=err); return (X); }

  8. double F(double X){ f=pow(X,5)-2*pow(X,4)+4*pow(X,3)-8*X*X+4*X-8; return f;}

More Related