Question: Explain steps and answer in Matlab form please Applied Numerical Methods ENGR&240 ANSWERS: Write your bisection results for x, and the iteration counts as A1.dat,
Explain steps and answer in Matlab form please Applied Numerical Methods ENGR&240 ANSWERS: Write your bisection results for x, and the iteration counts as A1.dat, A2.d respectively. Wri te your fzero results for x and the associated residuals to A4.dat and A5. dat respectively All should be 21 x 1 column vectors. Problem2 Consider the following two roots problems: o (x) sin(2.5x)-tan(x/3) - For this problem you will find the first positive root of each function using two different methods as follows. .Use Newton-Raphson (newtonraphson.m) with a stopping criterion of e,- 1E-5 and initial guesses of 1.0 for fand 0.4 for g. Save the final value of &, associated with the root of each function and store them in a two-element row vector ([uf o). Also save the iteration counts for each function and store them in a two-element row vector. Write a function m-file that implements the secant method. Your function should accept the function and two initial guesses as input arguments. For the stopping criterion and a maximum iteration count you can use input arguments with defaults as is done in bisect param.m and newtonraphson.m. Use a stopping criterion of &, IE-5 and initial guesses of [1.0,1.2] for fand [0.4, 0.6] for g. Save the final value of Ga associated with the root of each function and store them in a two-element row vector (lCaf, Gog ]). Also save the iteration counts for each function and store them in a two-element row vector ANSWERS: Write your Newton-Raphson results for the roots of fx) and g(x) to A6.dat and A7.dat respectively. Write your&a results and iteration counts for Newton-Raphson to A8.dat and A9.dat respectively (both 1x2). Write your Secant Method results for the roots of f(x) and g(x) to A10.dat and A11.dat. Write your & results and iteration counts for the Secant Method to A12.dat and A13.dat (both 1x2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
