Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

MA 204: Computational Methods & Scientific

Computing

February 11, 2016

Problem 1. (a) Use the secant method to find a zero of the function f (x) = x3 −
sinh x + 4x2 + 6x + 9 in the interval [7, 8].

(b) Use the same method to find a zero of the function f (x) = x20 − 1 in the interval
[0, 10].

(c) Assuming that two starting points are given, find a zero of the function f (x) =
ex − tan x.

Problem 2.

(a) Write a computer program to solve the equation cos x − xex = 0 by means of
Newton’s method. Find the root nearest 0. Try with different initial values. What
did you observe?

(b) Write a computer program to solve the equation x = tan x by means of Newton’s
method. Find the roots nearest 4.5 and 7.7.
January 28, 2016

Problem 3.
Find the smallest positive root of the following equations to maximum precision on your
computer using Bisection method, Regula falsi method, Secant method and Newton-
Raphson method. Compare your results, the number of iterations required and the
accuracy attained.

(a) e−x − sin(x) = 0


2
(b) x − e−x = 0

(c) x3 − x − 2 = 0

Problem 4.

(a) Develop fixed point iteration method for finding the root of 32 x − tan x = 0.1.
Consider various possibilities of g(x) and generate the sequence for each case. For
each case try with different initial values and observe the number of iteration taken
in finding a zero of the function.

(b) For the same equation, employ Regula falsi method and display the end points
of the interval in each iteration. What did you observe?

2
February 3, 2016. Week 5.

Problem 5.
Carry out five iterations of Newton’s method on the following system:

f (x, y) = 1 + x2 − y 2 + ex cos y; g(x, y) = 2xy + ex sin y.

Use starting values x0 = −1 and y0 = 4.

Problem 6.
Perform five iterations of Newton’s method on the system,

xy 2 + x2 y + x4 = 3; x3 y 5 − 2x5 y − x2 = −2,
starting with (0, 1).

Problem 7.
When enter 5, the output should be

0 1 2 3 4
4 0 1 2 3
3 4 0 1 2
2 3 4 0 1
1 2 3 4 0

and when enter 3 the output should be

0 1 2
2 0 1
1 2 0

3
February 11, 2016. Week 6.

Problem 8. (a) Write a Matlab code to solve the linear system U x = b, where U is
an upper triangular matrix with Ui,j = (i + j)2 , and bi = i, for i, j = 1, 2, 3, ...n.

(b) Solve the lower triangular system Lx = b, with Li,j = (i + j)2 , and bi = i, for
i, j = 1, 2, 3, ...n.

Problem 9.
Develop an algorithm for Gauss-elimination method and use it to solve the system
    
6 −2 2 4 x1 12
 12 −8 6 10  x2   34 
 3 −13 9 3  x3  =  27 
    

−6 4 1 −18 x4 −38

Ans: x = (1 − 3 − 2 1).

You might also like