Professional Documents
Culture Documents
Question # 1 [Marks: 5]
Develop a code for bisection method to find the root of function provided against your Cat, within tolerance of
0.001. Choose initial values of a and b such that root lies between the two. Clearly mention these initial values
of a and b
Cat 1: x2- 16 + Last Digit of your registration number
Cat 2 and Cat 4: x3-x-1 + Last Digit of your registration number
Cat 3 and Cat 5: 8-4.5*(x-sin(x)) + Last Digit of your registration number
Note: Only provide the resulting data for last 3 iterations in the following pattern. DO NOT provide code or
algorithm.
Initial a: ____ Initial b:_______
Iteration No a b x Fx
. . . . .
. . . . .
. . . . .
x -1 4 6
f (x) 34 57 85
Note: Provide
a. Algorithm
b. Matlab Code
c. f (Last 2 digits of Registration Number separated by decimal point) = ?
Page 1
Question # 3 [Marks: 10]
Write algorithm and code for Newton Raphson method, with following provisions:
1. Should use symbolic variables and symbolic operations on x.
2. Take the following inputs on screen from user:
a. Function F
b. Initial guess a
c. Tolerance tol
d. Max number of iterations imax
Note: Provide following
a. Algorithm
b. Code
Once the code is ready, solve the following differential equation to calculate y at x = 0.6. Write the solution up to 5
decimal places.
Function on right side of Equation: f (x,y) = 1+ y2
Initial conditions: y0 = 1 at x0 = 0
Step h = 0.05
Note: Provide
a. Algorithm
b. Matlab Code
c. y (0.3) = ?
Question # 5 [Marks: 5]
Write Matlab code to find the 1st order derivative by each of the below mentioned formulae for following data at point
x = 3.0A ( use last Digit of your registration no as A)
Page 2