Exp 1

3
Prepared by: Md. Shahadat Hasan Sohel, Lecturer, EEE, BUET Page 1 Department of Electrical and Electronic Engineering Bangladesh University of Engineering and Technology EEE 424: Numerical Methods Laboratory Experiment 1 #Solutions to Non-linear Equations - Muller’s Method Introduction: Muller’s method is a generalization of the Secant method. The Secant method finds the zero of the line passing through points on the graph of the function that corresponds to the two immediately previous approximations, whereas Muller’s method uses the zero of the parabola through the three immediately previous points on the graph as the new approximation. There are a number of root-finding problems for which the Secant, False Position, and Newton’s methods will not give satisfactory results. They will not give rapid convergence, for example, when the function and its derivative are simultaneously close to zero. But Muller’s method will be applicable in such cases. Figure: (a) Secant method and (b) Muller’s method.

description

Algorithm on numerical methods

Transcript of Exp 1

  • Prepared by: Md. Shahadat Hasan Sohel, Lecturer, EEE, BUET Page 1

    Department of Electrical and Electronic Engineering Bangladesh University of Engineering and Technology

    EEE 424: Numerical Methods Laboratory Experiment 1 #Solutions to Non-linear Equations - Mullers Method

    Introduction:

    Mullers method is a generalization of the Secant method. The Secant method finds the zero of the line passing through points on the graph of the function that corresponds to the two immediately previous approximations, whereas Mullers method uses the zero of the parabola through the three immediately previous points on the graph as the new approximation.

    There are a number of root-finding problems for which the Secant, False Position, and Newtons methods will not give satisfactory results. They will not give rapid convergence, for example, when the function and its derivative are simultaneously close to zero. But Mullers method will be applicable in such cases.

    Figure: (a) Secant method and (b) Mullers method.

  • Prepared by: Md. Shahadat Hasan Sohel, Lecturer, EEE, BUET Page 2

    Algorithm for Mullers method to find solution for f(x):

    1. Take 3 initial guesses x1, x2, x3 2. Find the functional values at those points f1=f(x1), f2=f(x2), f3=f(x3) 3. Using (x1,f1), (x2,f2) and (x3,f3) points to construct a parabola y=ax2+bx+c (May use

    Matlab polyfit function) 4. Find the two roots of the quadratic equation xn1 and xn2, of the parabola, which will be

    the x axis intersection points of the parabola 5. Find x4=min(|f(xn1)| ,|f(xn2|) 6. If error< , stop; error=(xnew-xold)/xold*100%.

    else Discard x1 and usex2, x3, x4 to repeat the procedure.

    Exercise:

    1. Find the cubic root of 5 using Secant method and Mullers method (x3-5=0). Plot number of iteration needed against the estimated root in Mullers method and Secant method toachieve a solution of a function where the maximum permissible error is e=10-5.

    2. For the following R-L-C circuit, the capacitor is charged to voltage V0 with charge q0,

    then the switch is turned on.

    The differential equation for the charge of the capacitor is given by,

  • Prepared by: Md. Shahadat Hasan Sohel, Lecturer, EEE, BUET Page 3

    Solving this equation for q, we get

    Assume the charge must be dissipated to 1 percent of its original value (q/q0 = 0.01) in t=0.05 s, with L = 5 H and C = 104F. Find the required value of R using Mullers method. Plot the value of estimated root after each iteration.

    Introduction:Exercise: