Answer in Matlab form and explain steps please
Applied Numerical Methods ENGR&240 ENGR 240: Applied Numerical Methods Winter 2019 Week 3 Programming Assignment DUE DATE: See Canvas OBJECTIVES Learn how to identify and formulate a roots problem. Leam how to use anonymous functions and pass parameters to generalized numerical methods functions. * . Leam how to implement the Bisection method . Learn how to implement Newton-Raphson iteration. . Learn how to implement the Secant method. Learn how to use MATLAB's fzero function. . INSTRUCTIONS: Write a single MATLAB m-file that solves all problems below. For each problem, write the requested answers to ASCII data files with the exact filenames specified (e.g. "A3.dat"). Submit your main m-file and all associated m-files to me by the due date. Your entire assignment should run, generating all of the required data files, by typing the name of the main m-file at the command prompt; you can demonstrate this in class next week Note for this assignment and most that follow it is critical that you use the exact same initial guesses, stopping criteria, ete as specified in the problem statements. That said, it is also useful and informative to experiment with different initial guesses and/or stopping criteria to see how the algorithms behave and you are encouraged to do so. Results of that experimentation are a potential topic for discussing next week Problem l Consider the following model that predicts the dissociation of water vapor into hydrogen and oxygen at high temperatures. The mole fraction, x, of H20 that dissociates can be represented by x 2pt Where K is the equilibrium constant and p, is the total pressure. Solve for the mole fraction, x, corresponding to pressures (p) ranging from 1 to 5 in increments of 0.2 using the following methods. Use K-0.055 for all cases. .Use the bisection method with &, IE-4. You can use the bisect _param.m function developed in the videos or write your own version for extra practice. Use an initial bracket of x-0.01 and x- 0.1 for all values of p Save your results for x, &, and the associated iteration counts in three column vectors. . Use the fzero function with &,- 1E-4 and the same initial bracket as you used for bisection. Save your results for x and the associated residuals in two column vectors. Page 1 of 2