Lab 4 Solving Roots of Equations and Polynomials Using Packages and MATLAB
Lab 4 Solving Roots of Equations and Polynomials Using Packages and MATLAB
lab 4.xls
Examples 2;
Determine single root of using Goal Seek Function
f(x) = x cos x
Key in the required data in the worksheet.
Go to Data Tools.
What-If-Analysis
Goal Seek
Goal seek table will appear
Answer the required questions
lab 4.xls
Examples 3;
Determine roots of U(x,y) and V(x,y) simultaneously
using solver function.
U(x,y) = x2 + xy -10 = 0
V(x,y) = y + 3xy2 -57 = 0
initial values of x = 1 and y = 3.5
True value x = 2 and y = 3
Solution;
Step 1 Enter the initial values of x and y in the worksheet.
Step 2 Enter functions U and V in the worksheet.
Step 3 Enter sum of square of the functions U and V values.
(The result should be zero). If the value is not zero, the
function Solver can be used from the Tools menu.
Step 4 Use the function Solver and give the required
information.
lab 4.xls
Example 1
Use MATLAB function fzero to find the roots of;
f(x) = x10 1
With the interval of xl = 0 and xu = 4.
The true roots are at x = -1 and 1.
Use the initial guesses of 0 and 1.3 to determine
the positive root.
Thank You
By
Nor Sharliza Mohd Safaai