Numerical Methods
Roots of Equations
Laboratory Activity 2
I. Objectives
1. Develop algorithms for a given task using pseudocodes.
2. Implement the pseudocodes into a program using Matlab.
II. Problems
1. Use the Newton-Raphson method to estimate the root of
𝑦 = 𝑥𝑥
Use Xi = 2. Create 20 iterations. Show on the table the number of iterations, Xr, and εa.
Interpret your iteration and describe the results. Show necessary calculus solutions.
2. ECE Titans lost to CE Beavers. It was analyzed that a player’s ball projectile equation is
𝑦 = 𝑠𝑖𝑛𝑥𝑐𝑜𝑠𝑥𝑡𝑎𝑛𝑥
Where x is the horizontal distance of the player from the ring and at condition y=0, the
ball will go in.
Use the Secant method to estimate the distance where he could probably shoot the ball
so they could have won. The minimum true error is 0.005% for the ball to go inside the
ring.
Use Xi-1 = pi/2 and Xi=2pi/3. Show on the table the number of iterations, Xr, εt and εa.
Interpret your iteration and describe the results.
3. Plot 𝑦 = 3𝑥 2 + 1. Between Newtown-Raphson and Secant Method, which is the worst
method to use? Compare.
III. Methodology
<Discuss your solution to the problems here, including the pseudocodes and the code
themselves. Put the codes inside a box, labeling them appropriately. Use Courier
New font when typing the codes>
Problem 1
Problem 2
Problem 3
Problem 4
IV. RESULTS AND INTERPRETATION
<For each of the problems, provide screenshots on the flow of the program just created.
Interpret the results of the algorithm as to its accuracy, precision, etc.>
Problem 1
Problem 2
Problem 3
Problem 4
V. CONCLUSIONS AND RECOMMENDATIONS
VI. REFERENCES