Sale!

ESO 208 Computer Assignment 1 solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (4 votes)

1. Write a computer program for finding roots of a non-linear equation f x( ) using the
following methods:
a. Bisection
b. False-position
c. Modified false-position
d. Newton-Raphson
e. Secant
The program should have the following features:
Input: A user interface for providing – (i) non-linear equation, (ii) option to choose one of the
five methods mentioned above, (iii) starting values, and (iv) stopping criteria in form
of maximum iterations and maximum relative approximate error (in %).
Output: (i) Plot of f x( ) vs x , (ii) Plot of relative approximate error vs iteration number,
and (iii) Roots of the equation.
Test functions:
(1)
 
4 3 2
0
1 0
600 550 200 20 1 0
Bracketing Methods: 0.1 1.0
Newton-Raphson : 0.5
Secant : 0.1 1.0
Maximum iteration : 20
Maximum relative approximate error (%) : 0.05%
l u
f x x x x x
x x
x
x x 
     
 

 
(2)
 
0
1 0
exp( ) 0
Bracketing Methods: 0.0 1.0
Newton-Raphson : 0.5
Secant : 0.1 1.0
Maximum iteration : 20
Maximum relative approximate error (%) : 0.05%
l u
f x x x
x x
x
x x 
   
 

 
2
2. Write a computer program for finding roots of a polynomial f x( ) using the following
methods:
a. Muller
b. Bairstow

Input: A user interface for providing – (i) polynomial, (ii) option to choose one of the two
methods, (iii) starting values, and (iv) stopping criteria in form of maximum iterations
and maximum relative approximate error (in %).
Output: (i) Plot f x( ) vs x and (ii) Roots of the equation
Test polynomials:
(1)
 
4 3 2
0 1 3
600 550 200 20 1 0
Muller Method: 0.0 0.1 0.3
Bairstow Method : 1 1
Maximum iteration : 20
Maximum relative approximate error (%) : 0.05%
f x x x x x
x x x
r s
     
  
   

(2)
 
3 2
0 1 3
4 4 0
Muller Method: 0.0 0.5 1.0
Bairstow Method : 1 1
Maximum iteration : 20
Maximum relative approximate error (%) : 0.05%
f x x x x
x x x
r s
    
  
   

Submission
Make a single zip folder with all your program file(s) name it roll number_CA1.zip (e.g., If your
roll number is 123456, the folder name should be ‘123456_CA1.zip’). The folder should include –
(i) All the computer program file(s), input file(s) and output file(s)
(ii) A PDF file of the plots and the solution of the test cases given in this assignment.
Upload the zip file on mooKIT. In case of any difficulties with mooKIT upload, you may email
the solution to eso208.sec*@gmail.com, where * is section number 1-10. Example: for section
J5, it is eso208.sec5@gmail.com; for section J10, it is eso208.sec10@gmail.com.