Knowee
Questions
Features
Study Tools

Consider the following finite-difference scheme for approximating the derivative of a function f(x)f'(x)≈a*f(x)+b*f(x+h)+c*f(x+2h)+d*f(x+3h)/h(2.1) Apply Taylor’s (Lagrange remainder) theorem about the point x to write down expressions for f(x + h), f(x + 2h) and f(x + 3h) in terms of h, f(x), f'(x), f''(x), etc, with remainder terms thatare O(h^4).(2.2) Substitute these expressions into (2.1) and hence determine a system of linear equations that must be satisfied by the coefficients a, b, c and d for the error of (2.1) to be O(h^3) as h → 0.(2.3) Solve the system from part (2.2) for the coefficients a, b, c and d. You may use technology to solve the system, but the answers must be exact.(2.4) Use the finite-difference formula (2.1) together with the coefficients you found in part (2.3) to estimate the derivative of f(x) = e^x at x = 0 for h = 0.5. What is the magnitude of the error in this case? How much smaller would h need to be to decrease the error by a factor of 1000?

Question

Consider the following finite-difference scheme for approximating the derivative of a function f(x)f'(x)≈af(x)+bf(x+h)+cf(x+2h)+df(x+3h)/h(2.1) Apply Taylor’s (Lagrange remainder) theorem about the point x to write down expressions for f(x + h), f(x + 2h) and f(x + 3h) in terms of h, f(x), f'(x), f''(x), etc, with remainder terms thatare O(h^4).(2.2) Substitute these expressions into (2.1) and hence determine a system of linear equations that must be satisfied by the coefficients a, b, c and d for the error of (2.1) to be O(h^3) as h → 0.(2.3) Solve the system from part (2.2) for the coefficients a, b, c and d. You may use technology to solve the system, but the answers must be exact.(2.4) Use the finite-difference formula (2.1) together with the coefficients you found in part (2.3) to estimate the derivative of f(x) = e^x at x = 0 for h = 0.5. What is the magnitude of the error in this case? How much smaller would h need to be to decrease the error by a factor of 1000?

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

(2.1) The given finite-difference scheme for approximating the derivative of a function f(x) is:

f'(x) ≈ af(x) + bf(x+h) + cf(x+2h) + df(x+3h) / h

(2.2) Applying Taylor’s (Lagrange remainder) theorem about the point x, we can write down expressions for f(x + h), f(x + 2h) and f(x + 3h) in terms of h, f(x), f'(x), f''(x), etc, with remainder terms that are O(h^4).

f(x + h) = f(x) + hf'(x) + h^2/2f''(x) + h^3/6*f'''(x) + O(h^4)

f(x + 2h) = f(x) + 2hf'(x) + 2^2h^2/2f''(x) + 2^3h^3/6*f'''(x) + O(h^4)

f(x + 3h) = f(x) + 3hf'(x) + 3^2h^2/2f''(x) + 3^3h^3/6*f'''(x) + O(h^4)

(2.3) Substituting these expressions into (2.1), we get:

f'(x) ≈ [af(x) + b(f(x) + hf'(x) + h^2/2f''(x) + h^3/6f'''(x)) + c(f(x) + 2hf'(x) + 2^2h^2/2f''(x) + 2^3h^3/6f'''(x)) + d(f(x) + 3hf'(x) + 3^2h^2/2f''(x) + 3^3h^3/6*f'''(x))] / h

This simplifies to:

f'(x) ≈ [a + b + c + d]f(x) + h[b + 2c + 3d]f'(x) + h^2[b/2 + 2c + 9d/2]f''(x) + h^3[b/6 + 4c/3 + 9d/2]*f'''(x)

For the error of (2.1) to be O(h^3) as h → 0, the coefficients a, b, c and d must satisfy the following system of linear equations:

a + b + c + d = 0 b + 2c + 3d = 1 b/2 + 2c + 9d/2 = 0 b/6 + 4c/3 + 9d/2 = 0

(2.4) Solving this system of equations, we get:

a = -3/2, b = 2, c = -3/2, d = 1

Using the finite-difference formula (2.1) together with these coefficients to estimate the derivative of f(x) = e^x at x = 0 for h = 0.5, we get:

f'(0) ≈ (-3/2)e^0 + 2e^0.5 - 3/2*e^1 + e^1.5 / 0.5 = 1.297

The exact derivative of f(x) = e^x at x = 0 is 1, so the error is |1 - 1.297| = 0.297.

To decrease the error by a factor of 1000, h would need to be approximately 0.0005.

This problem has been solved

Similar Questions

4 Third order derivative.a. Use Taylor series to derive the truncation error of the approximationf′′′(x) ≈( −f(x − 2h) + 2f(x − h) − 2f(x + h) + f(x + 2h))/2h^3assuming f ∈ C^5.b. Explain why dividing by h produces no roundoff error if h = 2−k, k ∈ N.c. Assuming that built-in functions return exact answers but that addition/subtraction produce roundoff errors and that h = 2^−k, k ∈ Z, show that the roundoff error RE in computing this expression satisfies the bound |RE| ≤ (K1 + K2h)u/h^3 where K1, K2 depend on f and x. You may use using the bound |θn| <nu/ (1 − nu)d. Hence estimate, in terms of u, the optimal choice for h.

Explain explicit finite difference method for the the case of having one unknown

explain explicite finite difference method/approach in CFD

Does Taylor's Theorem with Remainder guarantee that the second Taylor polynomial at x=3 has an error less than 0.0001 in the estimate of 10e3.4 ?

use matlab to do: Calculate the 2nd derivative and higher derivatives of f (x) = 1 + x + x^2 +x^3 + x^4 + x^5 + x^6 + x^7 + x^8 using the finite difference formulae for higher derivatives. How do the errors vary with step size?

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.