0% found this document useful (0 votes)
39 views

ESO-208A Computational Methods in Engineering Assignment 1 2022-23 Semester-1

This document outlines the details of Assignment 1 for a computational methods in engineering course. It provides instructions for students to write computer programs to find roots of nonlinear equations and polynomials using various numerical methods, including bisection, false position, fixed point, Newton-Raphson, secant, Muller, and Bairstow. It specifies two test functions and a test polynomial for students to use to test their programs, and provides details on required inputs, outputs, and stopping criteria for the programs.

Uploaded by

Usha ch
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

ESO-208A Computational Methods in Engineering Assignment 1 2022-23 Semester-1

This document outlines the details of Assignment 1 for a computational methods in engineering course. It provides instructions for students to write computer programs to find roots of nonlinear equations and polynomials using various numerical methods, including bisection, false position, fixed point, Newton-Raphson, secant, Muller, and Bairstow. It specifies two test functions and a test polynomial for students to use to test their programs, and provides details on required inputs, outputs, and stopping criteria for the programs.

Uploaded by

Usha ch
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ESO-208A

Computational Methods in Engineering


Assignment 1
2022-23 Semester-1

Due date: Friday, September 1, 2022, 11:59 pm

Submit a single zip folder in the Brihaspati server under Assignment-1. The name of the
zip-folder should be your roll-number (e.g., If your roll no. is 123456, the folder name
should be '123456.zip'). The folder should include-

(i) All the computer program file(s)


(ii) A PDF file of the plots and the solution of the test cases (given in the assignment).
Comment on the convergence and stability of different methods.

Programming Assignment 1: Nonlinear Equations


1. Write a computer program for finding a root of the non-linear equation, 𝑓(𝑥) = 0, using the
following methods:

a. Bisection
b. False-position
c. Fixed-Point
d. Newton-Raphson
e. Secant

The program should have the facility for providing the following input– (i) non-linear
equation, (ii) option to choose one of the five methods mentioned above [for Fixed-Point
method, also providing the (x); for Newton-Raphson method, also providing the f’(x)],
(iii) starting values, and (iv) stopping criteria in form of maximum iterations and maximum
relative approximate error (in %).

It should provide as an 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) 𝒇(𝒙) = 𝒙 − 𝐜𝐨𝐬 𝒙

Use the initial bracket as (0,1) or the initial guess as 0; maximum iterations 50; and
maximum εr = 0.01%. For Fixed-Point method, use (x)=cos x.
(2) 𝒇(𝒙) = 𝒆𝒙𝒑(− 𝒙) − 𝒙 = 𝟎

Use the initial bracket as (0,1) or the initial guess as 0; maximum iterations 50; and
maximum εr = 0.05%. For Fixed-Point method, use (x)=exp(−x).

2. Write a computer program for finding roots of a polynomial f ( x) using the following
methods: (a) Muller (b) Bairstow

The program should have the facility for providing the following input– (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 %).

It should provide as an output (i) Plot f ( x) vs x and (ii) Roots of the equation.

Test polynomial:

f(x) = x4 −7.4x3 + 20.44x2 −24.184x + 9.6448 = 0

Muller method: Start with (−1,0,1) and then (0,1,2)


Bairstow method: Start with (α0= −5, α1=4) and then (α0= −2, α1=2)
Maximum iteration: 50
Maximum relative approximate error: 0.01%

You might also like