Question: Complete without using syms. ONLY use Matlab. Develop 2 user defined functions to evaluate the root of an equations f(x) using Newton-Raphson and Secant methods.
Develop 2 user defined functions to evaluate the root of an equations f(x) using Newton-Raphson and Secant methods. Inputs for each user defined function: - Equation f(x) as an anonymous function or symbolic function, depending on the method. Derivative should be done by the code, not the user. - Initial Value(s) - Desired approximate percent relative error is n significant figures. Test your function by calculating the lowest positive root of f=x525x2+25, which is 1.0211 Requirements for each function: - Must use while loop. - Error definition. a=CurrentapproximationCurrentapproximationPreviousapproximation100% - Must use if statement(s) - Output display: Using \#\#\# Method, the root is located at H\#\# after \#H iterations
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
