This document contains 6 exercises involving solving nonlinear equations numerically. The exercises cover bisection, Newton's, and fixed point methods. They involve solving equations graphically and numerically to specified tolerances and comparing results between methods.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
20 views
2 Exercises On Methods For Nonlinear Equations
This document contains 6 exercises involving solving nonlinear equations numerically. The exercises cover bisection, Newton's, and fixed point methods. They involve solving equations graphically and numerically to specified tolerances and comparing results between methods.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10
Exercise session of September 27 2022
Luca Bonaventura
L.Bonaventura NM-ENG-LAB-2 September 27 2022 1/7
Exercise 1
Let ↵1 and ↵2 > ↵1 the zeros of the nonlinear equation
f (x) = x 2 x +1 e x =0 x 2 [ 2, 1].
Apply the bisection method on the interval [ 2, 1] with a
tolerance ✏tol = 10 12 . Which of the two zeros of the function is obtained? How many iterations are necessary? Compute ↵1 and ↵2 using the Newton method with the same tolerance on the absolute error and choosing graphically the initial guesses. Which zero is approximated faster by the Newton method? Why?
L.Bonaventura NM-ENG-LAB-2 September 27 2022 2/7
Exercise 2
Consider the nonlinear equations
f (x) = x 4 x3 7x 2 + x + 6 = 0 g (x) = x 4 3x 3 3x 2 + 11x 6=0
for x 2 [ 3, 4]. Plot the function f (x) on the given interval
and graphically identify initial guesses for the solutions of the equation; Use these guesses to compute approximations of all the solutions, using the Newton method with relative error tolerance 10 10 . Compare the convergence behaviour observed for all the solutions of the two equations. Compare the results with those obtained using the MATLAB function fsolve with the same initial guesses and absolute error tolerance. Compare the results with those obtained using (when possible) the bisection method with absolute error tolerance also equal to 10 10 .
L.Bonaventura NM-ENG-LAB-2 September 27 2022 3/7
Exercise 3
Consider the equation
f (x) = x 5 8x 4 + 21x 3 14x 2 20x + 24 = 0 on the interval [1.5, 3.5]. Compute the solutions with the Newton method, using as initial values the left and the right endpoint of the interval [1.5, 3.5], respectively. Use a tolerance 10 12 on the relative error. Compute the number of iterations required by the Newton method for each solution. Explain the differences on the basis of the theory.
L.Bonaventura NM-ENG-LAB-2 September 27 2022 4/7
Exercise 4
Write MATLAB functions implementing the chord, secant, and
modified Newton (experiment with several ✏ values) methods using stopping criteria based on the relative error AND on the residual with two different tolerances. Apply them to solve the problems in Exercises 1 and 2.
L.Bonaventura NM-ENG-LAB-2 September 27 2022 5/7
Exercise 5
Consider the nonlinear equation e x 2x 2 = 0, x 2 [ 2, 4].
Determine graphically the number of solutions of the equation. Compute all the solutions of the equation using the fixed point method, rewriting the problem as x = (x) using the three different iteration functions r r 2 1 x 1 x 1 (x) = log(2x ), 2 (x) = e , 3 (x) = e 2 2 . Check graphically to which root each iteration function will converge to and select appropriate initial guesses. Set the absolute error tolerance equal to 10 8 .
L.Bonaventura NM-ENG-LAB-2 September 27 2022 6/7
Exercise 6 Consider the equation 3x 2 2x 2 f (x) = = 0. x 1 Determine graphically approximate solutions of the equation in [ 3, 3]. Consider then its fixed point reformulation with the iteration functions 3x 2 5x x 1 = 2 =x 2+ . x 1 x 1 Which iteration function could be used to compute the positive solution x ⇤ of the equation f (x ⇤ ) = 0 with the fixed point method? Approximate x ⇤ with the fixed point method with an absolute error tolerance equal to 10 9 using the initial guess x (0) = 1.2 Compare the result with that obtained with Newton method using the same absolute error tolerance. L.Bonaventura NM-ENG-LAB-2 September 27 2022 7/7