Determine the step size h that can be used in the tabulation of f(x)= (1 +...
2. Graph the functions f(x)x(x 1)(x-2) ..(x- k) for k- 1,2,..,10. (These are examples of the polynomials occurring in the error formula for polynomial interpolation.) We want to produce an evenly spaced table of values for the function f(x) sin(x) for x E [O,T/2] such that, with cubic interpolation, we can give the values of the function at any point in the interval with an error less than 5 10-12. That means finding a number n such that with h-/2n...
Q2. Let f(x) = √ x. Using equally spaced nodes on the interval [0.25, 1], what is the upper bound for the error of the cubic Newton interpolation.
We want to produce an evenly spaced table of values for the function f(x) sin(x) for x E [0,Tt/2] such that, with cubic interpolation, we can give the values of the function at any point in the interval with an error less than 5 10-12. That means finding a number n such that with h = π/2n and Xk-kh, k-0, , n the cubic interpolation polynomial with the interpolation points XK-1,XK, X+1 XK+2 for x has an error less than...
Numerical Methods
Consider the integral 2 (a) [16 marks] Use the composite Simpson's rule with four intervals to calculate (by hand) approximate value of the integral Calculate the maximum value of the error in your approximation, and compare it with the true error. (b) 19 marks] Determine the number of subintervals n and the step size h so that the composite Simpson's rule for n subintervals can be used to compute the given integral with an accuracy of 5 ×...
5. Let f(x) = cosx where 0<x< . Find the optimal step size h if the C.D.F of order 0(h) is used to estimate f'(xo).
QUESTION 5: f(x) = 2 -(x-1) + x(x + 1) – 2x(x + 1)(x - 1) + 2x(x + 1)(x - 1)(x - 2) function (-1,2), (0,1), (1,2), (2, -7), (3,10) passes through these points and (4,5) Find the interpolation polynomial that passes through the point. 그 QUESTION 6: f(x) = cosx + x3 + xe-* using the values you want for this function write the second Lagrange interpolation polynomial that cuts and using this polynomial f(1,5) value find the...
this is numerical analysis. Please do a and b
4. Consider the ordinary differential equation 1'(x) = f(x, y(x)), y(ro) = Yo. (1) (a) Use numerical integration to derive the trapezoidal method for the above with uniform step size h. (You don't have to give the truncation error.) (b) Given below is a multistep method for solving (1) (with uniform step size h): bo +1 = 34 – 2n=1 + h (362. Yn) = f(n=1, 4n-1)) What is the truncation...
Exercise 6: Given the table of the function f(x)-2" 2 X 0 3 2 f(x) 1 2 4 8 a) Write down the Newton polynomials P1(x), P2(x), Pa(x). b) Evaluate f(2.5) by using Pa(x). c) Obtain a bound for the errors E1(x), E2(x), Es(x) Exercise 7: Consider f(x)- In(x) use the following formula to answer the given questions '(x) +16-30f+16f,- 12h a) Derive the numerical differentiation formula using Taylor Series and find the truncation error b) Approximate f'(1.2) with h-0.05...
Consider the function f(x) 1 25x which is used to test various interpolation methods. For the remainder of this problem consider only the interval [-1, 1] The x-values for the knots (or base-points) of the interpolation algorithm are located at x--1,-0.75, -0.5, -0.25, 0, 0.25, 0.5, 0.75 1. (a) Create a "single" figure in Matlab that contains 6 subplots (2x3) and is labelled as figure (777), i.e the figure number is 777. Plot in each subplot the function f(x) using...
Exercise 3 For the computation of the expectation Ef[h(x)] when f is the normal pdf and h(x) - exp A. Show that Ef[h(x)] can be computed in closed form and derive its value. ( 2p) + exp (-(xur) -(x-2)2 (x-4)2 Construct a regular Monte Carlo approximation based on a normal N (0,1) sample of size Nsim-10A4 and produce an error evaluation. Compare the above with an importance sampling approximation based on an importance function g corresponding to the U(-6 -...