Answers
Comprehensive answers and worked solutions for Numerical Analysis with MATLAB.
1. Graphical Method
Given
a) Equation is nonlinear because highest power of is .
b) Sign-change intervals:
So root lies in .
Again,
So narrower interval is .
c) Graph of cubic crosses -axis near
2. Bisection Method
Given
a)
Since , root exists in .
b) Interval is suitable because is continuous and signs at endpoints are opposite.
c) Bisection table with :
| Iteration | ||||
|---|---|---|---|---|
| 0 | 1.000000 | 2.000000 | 1.500000 | -3.625000 |
| 1 | 1.500000 | 2.000000 | 1.750000 | -1.640625 |
| 2 | 1.750000 | 2.000000 | 1.875000 | -0.408203 |
| 3 | 1.875000 | 2.000000 | 1.937500 | 0.273193 |
| 4 | 1.875000 | 1.937500 | 1.906250 | -0.073090 |
| 5 | 1.906250 | 1.937500 | 1.921875 | 0.098644 |
| 6 | 1.906250 | 1.921875 | 1.914062 | 0.012427 |
Final interval:
Approximate root:
3. Fixed Point Iteration Method
Given
a) Two possible fixed-point forms:
Use
because it converges near root.
b) Suitable initial guess:
c) Iteration table:
| Iteration | Error | ||
|---|---|---|---|
| 0 | 1.500000 | 1.650964 | 0.150964 |
| 1 | 1.650964 | 1.632291 | 0.018672 |
| 2 | 1.632291 | 1.634624 | 0.002333 |
Since error , stop.
Approximate root:
4. Secant Method
Given
a)
So root lies in .
b) Choose
c) Secant formula:
Five iterations:
| Iteration | ||||
|---|---|---|---|---|
| 1 | 2.000000 | 3.000000 | 2.600000 | -1.824000 |
| 2 | 3.000000 | 2.600000 | 2.693252 | -0.237227 |
| 3 | 2.600000 | 2.693252 | 2.707193 | 0.011956 |
| 4 | 2.693252 | 2.707193 | 2.706524 | -0.000072 |
| 5 | 2.707193 | 2.706524 | 2.706528 | -0.000000 |
Approximate root:
5. Newton-Raphson Method
Given
a) Stopping criterion:
b)
Newton-Raphson formula:
c) Take .
| Iteration | ||||
|---|---|---|---|---|
| 0 | -1.500000 | -4.875000 | 12.750000 | -1.117647 |
| 1 | -1.117647 | -0.894362 | 8.217993 | -1.008817 |
| 2 | -1.008817 | -0.062111 | 7.088407 | -1.000055 |
| 3 | -1.000055 | -0.000385 | 7.000550 | -1.000000 |
| 4 | -1.000000 | -0.000000 | 7.000000 | -1.000000 |
| 5 | -1.000000 | 0.000000 | 7.000000 | -1.000000 |
Root after six iterations:
6. Gaussian Elimination Method
System:
a) Augmented matrix:
b) Upper triangular form:
c) Back substitution:
So
7. Gaussian Elimination with Partial Pivoting
System:
a) Partial pivoting is required because first pivot is very small. Dividing by it may cause large round-off error.
b) Row interchange:
Largest absolute value in first column becomes pivot.
c) Start:
Eliminate first column:
Second pivot: , so swap
Then
Back substitution gives
8. Gauss-Seidel Method
Given
a) Iterative form:
b) Diagonal dominance:
So system is diagonally dominant. Gauss-Seidel will converge.
c) With :
| Iteration | |||
|---|---|---|---|
| 0 | 0.000000 | 0.000000 | 0.000000 |
| 1 | 1.100000 | 0.980000 | 1.326000 |
| 2 | 1.134600 | 0.840480 | 1.374776 |
| 3 | 1.153430 | 0.831836 | 1.381135 |
| 4 | 1.154930 | 0.830901 | 1.381716 |
After four iterations:
IUS Preps - Your Academic Success Partner