0% found this document useful (0 votes)
6 views3 pages

Numerical Methods Exercises and Solutions

The document contains a series of exercises focused on numerical methods, including interpolation, error estimation, and solving equations. It covers various techniques such as Newton's formula, Lagrange's interpolation, trapezoidal and Simpson's rules, and iterative methods for finding roots. Additionally, it addresses systems of linear equations and numerical solutions for differential equations.
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)
6 views3 pages

Numerical Methods Exercises and Solutions

The document contains a series of exercises focused on numerical methods, including interpolation, error estimation, and solving equations. It covers various techniques such as Newton's formula, Lagrange's interpolation, trapezoidal and Simpson's rules, and iterative methods for finding roots. Additionally, it addresses systems of linear equations and numerical solutions for differential equations.
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

EXERCISES

Exercise 1 Interpolate the function lnx by a quadratic polynomial at x = 10, 11, 12.
(a) Estimate the error committed for x = 11.1 when approximating lnx by the interpolating
polynomial.
(b) How does the sign of the error depend on x?

Exercise 2 Consider a function f which is twice continuously differentiable on the interval I


= [−1, 1]. Interpolate the function by a linear polynomial through the support points (xi,f(xi)),
i = 0, 1, x0, x1 ∈ I. Verify that
  max | f / / ( ) | max | ( x  x0 )( x  x1 ) |
 I xI

is an upper bound for the maximal absolute interpolation error on the interval I. Which values
x0, x1 minimize α? What is the connection between (x −x0)(x − x1) and cos(2arccos x)?

Exercise 3. Given the data of the function y = cos(x) as follows:


x 0    
6 4 3 2
y 1 0,866025 0,707107 0,5 0

a) Construct the Newton's formula using the divided differences in both forms: forward
and backward.
 π 
b) Use the forward formula to compute approximately the value of f   . Compare the
 12 
obtained value with the exact value.

Exercise 4. Given the value of (xi, yi) as follows:

x -4 -1 0 2 5
y 1245 33 5 9 1335

Construct the Newton's formula using the divided differences in both forms: forward and
backward?

Exercise 5. Use the Lagrange’s interpolation formula to decompose the following rational
functions into the proper rational expressions:
3x 2 +x+1 x2 + x - 3
a) b)
(x-1)(x-2)(x-3) x 3 - 2x 2 - x + 2
Exercise 6. Let a ≤ x0 < x1 < x2 < · · · < xn ≤ b be an arbitrary fixed partition of the interval
[a, b]. Show that there exist unique γ0, γ1, ... , γn with
n b

  P( x )   P( x)dx
i 0
i i
a
for all polynomials P with degree (P) ≤ n.

Hint: P(x) = 1, x,... , xn. Compare the resulting system of linear equations with that
representing the polynomial interpolation problem with support abscissas xi, i = 0, ... , n.

Exercise 7 If f ∈ C2[a,b] then there exists an x   a, b  such that the error of the trapezoidal
rule is expressed as follows:
b
1 1
(b  a)( f (a)  f (b))   f ( x)dx  (b  a)3 f / / ( x).
2 a
12
Exercise 8. Consider the definite integral
1
dx
I =
0
1+x
Partition [0,1] into n = 10 subintervals of equal length; calculate I and evaluate the error using
the following method:
a) Trapezoidal rule.
b) Simpson’s rule (Parabolic rule).

Exercise 9. In number theory, it is proved that the number of primes in the range (a, b) (0 < a
b
dx
< b) is approximately I = 
a
lnx
a) Make a program in Scilab to calculate the number of primes in the range (100, 200).
200
dx
b) Calculate approximately the integration I =  using the parabolic method with n
100
lnx
= 100. Compare with the result given in a).

Exercise 10. Find a real solution of this equation using the iterative method such that the
error is 10-4
f(x) = x 3 - x - 1 = 0.

Exercise 11. Find a positive solution of the equation using the interpolation method with the
error 10-3
f(x) = x 3 - 0,2x 2 - 0,2x - 1,2 = 0.
3
Exercise 12. Compute the approximate value of 3 by solving the following equation
f(x) = x 3 - 3 = 0.
in [1, 3] by using (iterate each method five times)
a) The interpolation method,
b) Newton’s method,
Exercise 13. Consider the system of linear equations
 10 2 1   x1   1 
    
 1 10 1   x2    5 
 1 3 20   x3  10 

Solve this system using
a) The Jacobi’s method,
b) The Gauss–Seidel method,
where each method starts with x(0) = (0, 0, 0) and iterate 4 times.
Exercise 14. Compute the numerical solution of the problem using

 y  x  y 2
 0  x  0, 4; h  0,1
 y (0)  1
a) Euler’s method
b) Euler’s improved method.
c) Runge-Kutta method (RK4).

You might also like