[go: up one dir, main page]

0% found this document useful (0 votes)
305 views4 pages

Assignment 12july 2022 Solution

This document provides solutions to 10 questions about numerical methods topics like interpolation, integration, root finding, and solving differential equations. The questions cover concepts like Lagrange polynomials, the trapezoidal rule, bisection method, Newton's method, and Runge-Kutta method.

Uploaded by

Subanandhini S
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)
305 views4 pages

Assignment 12july 2022 Solution

This document provides solutions to 10 questions about numerical methods topics like interpolation, integration, root finding, and solving differential equations. The questions cover concepts like Lagrange polynomials, the trapezoidal rule, bisection method, Newton's method, and Runge-Kutta method.

Uploaded by

Subanandhini S
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/ 4

Week 11 Assignment Solution

1. Which are true about interpolation?


I. It is a process for finding a value between two points on a line or curve.
II. Interpolation provides a mean for estimating functions at the intermediate points.

a) Only I
b) Only II
c) Both I & II
d) None of the above

Solution: (c) Both

2. A Lagrange polynomial passes through three data points as given below


𝑥 10 15 20
𝑓(𝑥) 19.45 10.63 7.82
The polynomial is determined as 𝑓 (𝑥 ) = 𝐿 (𝑥 ). (19.45) + 𝐿 (𝑥 ). (10.63) +
𝐿 (𝑥 ). (7.82)
The value of 𝑓(𝑥) at 𝑥 = 12 is

a) 12.78
b) 13.08
c) 15.20
d) 11.36

Solution: (c)
𝑥−𝑥 (12 − 15)(12 − 20) 24
𝐿 (𝑥 ) = = = = 0.48
𝑥 −𝑥 (10 − 15)(10 − 20) 50

𝑥−𝑥 (12 − 10)(12 − 20) −16


𝐿 (𝑥 ) = = = = 0.64
𝑥 −𝑥 (15 − 10)(15 − 20) −25

𝑥−𝑥 (12 − 10)(12 − 15) −6


𝐿 (𝑥 ) = = = = −0.12
𝑥 −𝑥 (20 − 10)(20 − 15) 50

So 𝑓(12) = 0.48 ∗ 19.45 + 0.64 ∗ 10.63 − 0.12 ∗ 7.82 = 15.2008

3. The value of ∫ 𝑥 𝑒 𝑑𝑥 by using one segment trapezoidal rule is

a) 5446.3
b) 5336.2
c) 4986.5
d) 5278.4

Solution: (a)
Week 11 Assignment Solution

𝑓 (𝑏) − 𝑓(𝑎)
𝑓(𝑥)𝑑𝑥 = (𝑏 − 𝑎)
2
Here, 𝑎 = 0, 𝑏 = 3, 𝑓(𝑎) = 0 and 𝑓(𝑏) = 3630.859. Hence, ∫ 𝑥 𝑒 𝑑𝑥 = 5446.3

4. To solve the ordinary differential equation


𝑑𝑦
10 + 𝑥 𝑒 = ycos(𝑥 ) + 𝑥𝑠𝑖𝑛(𝑦) , 𝑦(0) = 5
𝑑𝑥

using Runge-Kutta 4th order method, the equation is re-written as

a) = ycos(𝑥) + 𝑥𝑠𝑖𝑛(𝑦) , 𝑦(0) = 5

b) = (ycos(𝑥) + 𝑥𝑠𝑖𝑛(𝑦)) , 𝑦(0) = 5

c) = (ycos(𝑥) + 𝑥𝑠𝑖𝑛(𝑦) − 𝑥 𝑒 ), 𝑦(0) = 5

d) = 𝑥𝑠𝑖𝑛(𝑦) − 𝑥 𝑒 , 𝑦(0) = 5

Solution: (c) The LHS contains the derivative part. All other terms are shifted to right
side.

5. Given 4 + 𝑥 = 𝑦 , y(0.5)=2, and using a step size of h  0.2 , Find the value of
𝑦(0.7) using Runge-Kutta 4th order method is

a) 2.8634
b) 2.5546
c) 2.1865
d) 1.9856

Solution: (b) 2.5546

6. What will be the area under the curve using the Trapezoidal Rule

x 1.4 1.6 1.8 2.0 2.2


y 4.3215 4.7428 5.5205 6.0525 6.8762

a) 4.3829
b) 5.4863
c) 6.3427
d) 3.2857

Solution: (a) 4.3829


Week 11 Assignment Solution

Using Trapezoidal Rule


∫ydx=h2[y0+y4+2(y1+y2+y3)]

∫ydx=0.22[4.3215+6.8762+2×(4.7428+5.5205+6.0525)]

∫ydx=0.22[4.3215+6.8762+2×(16.3158)]

∫ydx=4.3829
Solution by Trapezoidal Rule is 4.3829

7. The real root of the equation 5x − 2cosx −1 = 0 (up to two decimal accuracy) is

[You can use any method known to you. A range is given in output rather than single
value to avoid approximation error]

a) 0.45 to 0.47
b) 0.35 to 0.37
c) 0.41 to 0.43
d) 0.53 to 0.56

Solution: (d) 0.53 to 0.56


8. Which is/are false?

I. The bisection method is guaranteed to work for finding roots of all continuous
functions.
II. Trapezoidal rule is a technique for approximating the indefinite integral.
III. Lagrange polynomial is used for Polynomial Interpolation.

a) Only I
b) Only II
c) II and III
d) None

Solution: (b) Trapezoidal rule is a technique for approximating the definite integral.

9. Find the root of 𝑥 − 𝑥 − 10 = 0 approximately upto 5 iterations using Bisection


Method. Let a = 1.5 and b = 2.

a) 1.68
b) 1.92
c) 1.86
d) 1.66

Solution: (c) 1.86


Week 11 Assignment Solution

10. Match the following

A. Newton Method 1. Integration


B. Lagrange Polynomial 2. Root finding
C. Trapezoidal Method 3. Differential Equation
D. RungeKutta Method 4. Interpolation

a) A-2, B-4, C-1, D-3


b) A-3, B-1, C-2, D-4
c) A-1, B-4, C-3, D-2
d) A-2, B-3, C-4, D-1

Solution: (a)

You might also like