ME502 2022 Assign3 Draft Version 01
ME502 2022 Assign3 Draft Version 01
- Ropar
1st Semester 2022-23
Assignment #3
General Instructions:
1. Deadline to submit this assignment: To be announced soon. Study and revise class notes and the book(s).
2. Submit the assignment(s) using white A4-size pages(s). On the first page, clearly mention the following - Name &
entry number of student, Course number and title, Assignment number, Date of submission.
3. Answer to each question must start on a new page. Answer to all the sub-part of a question should appear together.
4. Assume any missing data with proper justification.
5. Write the references for any information (such as figure, table, data, and website) that is being cited in your
assignments (if applicable). Use some standard format to write the references. (For instance ASME format - which
is given here: https://www.asme.org/publications-submissions/journals/information-for-authors/journal-
guidelines/references
PROBLEM 1:
Use both the interpolating methods (Newton’s divided-difference interpolating polynomials method
& Lagrange interpolating polynomials method) to estimate the value of the function for each of the
following cases:
(a)
x -1.5 1 3 4
y = f (x) 0.8325 0.37 3.33 5.92
Evaluate the value of f (x) at x = 2.326
(b)
x 0 0.3 0.7 1.5
y = f (x) 1.15 0.6833 0.4303 2.471
Evaluate the value of f (x) at x = 0.93
PROBLEM 2:
Write a program in some language/tool of your choice (for example, C, Python, Scilab, Matab,
C++ etc), to obtain the interpolation (using Lagrangian polynomials) for the highest order possible
polynomial for the following cases:
(a)
x 0.6 1.1 1.3 2.2 3.3 4.4 5.1
y = f (x) 0.0265 0.1918 0.2906 0.6093 0.4593 0.1921 0.0924
Evaluate the value of f (x) at x = 1.75
(b)
x 1 1.5 2 2.5 3 3.5 4 4.5 5
y = f (x) 0.1469 0.3905 0.5758 0.6149 0.5355 0.4050 0.2763 0.1742 0.1033
Evaluate the value of f (x) at x = 1.75
1
PROBLEM 3:
Write a program in some language/tool of your choice (for example, C, Python, Scilab, Matab,
C++ etc), to obtain the spline interpolation for the following cases:
(a)
x -1.5 1 3 4
y = f (x) 0.8325 0.37 3.33 5.92
Evaluate the value of f (x) at x = 2.326 by using linear splines.
(b)
x -1.5 1 3 4
y = f (x) 0.8325 0.37 3.33 5.92
Evaluate the value of f (x) at x = 2.326 by using quadratic splines.
(c)
x -1.5 1 3 4
y = f (x) 0.8325 0.37 3.33 5.92
Evaluate the value of f (x) at x = 2.326 by using cubic splines.