Hands-on-Solving Nonlinear Equations with MATLAB I

  1. We have given the following function;

    $\displaystyle f(x)=3x + sin(x) - e^x
$

    The MATLAB program for the algorithm (see the lecture notes; an algorithm for halving the interval (Bisection)) is given.

    \includegraphics[scale=1]{figures/1-15}

    save with the name mybisec.m. Then;

    \includegraphics[scale=1]{figures/1-16}

    Modify this MATLAB program for the bisection method for using a tolerance value of 1E-4 (see next page).

    \includegraphics[scale=1]{figures/1-17}
    save with the name modbisect.m. Then (see next page);

    \includegraphics[scale=1]{figures/1-18}
  2. Now, we have given the following function;

    $\displaystyle f(x)=x^6 -x -1=0
$

    Apply all the procedures you studied above to find the root(s) of this function by modifying the given codes (Interval Halving (bisect.m) and Newton's (newton.m) methods).


Cem Ozdogan 2011-12-27