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

CM Experiments - Aug 2024

list of cm experiments for sem 3 in 2024 for cse ipu

Uploaded by

Mayank Sharma
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)
8 views2 pages

CM Experiments - Aug 2024

list of cm experiments for sem 3 in 2024 for cse ipu

Uploaded by

Mayank Sharma
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

CM: ES 251_LAB EXPERIMENTS

LIST OF EXPERIMENTS
Implementation to be done on C/C++
Introductory Program: Write a program to add, subtract, divide and multiply two
numbers.
2
1. Write a program to find a root of the equation 𝑥 𝑆𝑖𝑛 𝑥 = 1 using the Bisection
method. Run the program for the initial interval and the tolerance level provided
by the user.
2
2. Write a program to solve for a root of the equation 𝑥 𝑆𝑖𝑛 𝑥 = 1 using Newton
Raphson method. Run the program for the initial approximations 0, 1 and 2.
Compare the values obtained using N-R and Bisection methods of the
approximate root and no. of iterations obtained for different values of tolerance
level (0.1, 0.01, 0.001, 0.0001)
5 3
3. Write a program to solve for a root of the equation 𝑥 + 𝑥 + 3 = 0 using the
Secant method. Run the program for the initial approximations -1 and 1.
4. Write a program to predict this year's rainfall using the Lagrange Interpolation
method. Use the annual rainfall data for the last 10 years in your city. Is the
answer obtained reasonable?
5. Using 21 equally spaced nodes on the interval [-5 5], find the interpolating
1
polynomial 𝑝(𝑥) of degree 20 for the function 𝑓(𝑥) = 2 . Print the values of
1+𝑥

𝑝(𝑥) and 𝑓(𝑥) at 41 equally spaced points, including the nodes. What do you
observe?
1 2
−𝑥
6. Write a program to find the number of subintervals required to evaluate ∫ 𝑒 𝑑𝑥
0

1 −4
with utmost error of 2
* 10 for the composite Trapezoidal Rule.

7. Write a program to calculate a point of minima for a given function and an


interval. The search should continue until a pre-assigned error bound is reached
but not beyond 100 in each case. Run the program for f(x) =|ln x| on [0.5, 4].
'
8. Write a program to solve 𝑥 = 100(𝑠𝑖𝑛 𝑡 − 𝑥) with initial value x(0)=0 using
fourth order Runge-Kutta method on the interval [0 3] with step sizes 0.015,
0.020, 0.025, 0.030. Observe the numerical instability.
9. Write a program to find the largest and smallest eigenvalue of the matrix
[− 57, 192, 148; 20, − 53, − 44 ; − 48, 144, 115 ]using the Power
method.
10. Write a program for Fibonacci Search Algorithm. Run the code for
2
𝑓(𝑥) = 𝑥 + 𝑠𝑖𝑛 (53 𝑥) to find the minima of the function near the origin.

You might also like