0% found this document useful (0 votes)
110 views2 pages

Computer Assignment1

This document outlines a computer assignment to write programs for finding the roots of nonlinear and polynomial equations using numerical methods. The assignment requires programs to find roots using bisection, false position, modified false position, Newton-Raphson, and secant methods for nonlinear equations, and Muller and Bairstow methods for polynomials. The programs must include a user interface to input the equation, method, starting values and error criteria. They must output plots of the function and error vs iterations, and the roots. The document provides sample equations and parameters to test the programs. Students must submit a zip folder with the program files, outputs and plots in PDF format.

Uploaded by

Aryann kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views2 pages

Computer Assignment1

This document outlines a computer assignment to write programs for finding the roots of nonlinear and polynomial equations using numerical methods. The assignment requires programs to find roots using bisection, false position, modified false position, Newton-Raphson, and secant methods for nonlinear equations, and Muller and Bairstow methods for polynomials. The programs must include a user interface to input the equation, method, starting values and error criteria. They must output plots of the function and error vs iterations, and the roots. The document provides sample equations and parameters to test the programs. Students must submit a zip folder with the program files, outputs and plots in PDF format.

Uploaded by

Aryann kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ESO208: Computer Assignment-1

Marks: 100 Due Date: Monday, August 30, 2021

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)
f  x   600 x 4  550 x3  200 x 2  20 x  1  0
Bracketing Methods: xl  0.1 xu  1.0
Newton-Raphson : x0  0.5
Secant : x1  0.1 x0  1.0
Maximum iteration : 20
Maximum relative approximate error (%) : 0.05%

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

1
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)
f  x   600 x 4  550 x3  200 x2  20 x  1  0
 Method: x0  0.0 x1  0.1 x3  0.3
Muller
Bairstow Method : r  1 s  1
Maximum iteration : 20
Maximum relative approximate error (%) : 0.05%

(2)
f  x   x3  x 2  4 x  4  0
 Method: x0  0.0 x1  0.5 x3  1.0
Muller
Bairstow Method : r  1 s  1
Maximum iteration : 20
Maximum relative approximate error (%) : 0.05%

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 [email protected]; for section J10, it is [email protected].

You might also like