1 / 6

Example

Learn how to estimate the derivative of a function at x=0.5 using Richardson extrapolation and how to calculate the corresponding error.

wiggins
Download Presentation

Example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Example Estimate the derivative of f(x) at x=0.5 using h=0.5, the true value is -0.9125 F(x)=(-0.1*x^4 )-(0.15*x^3)-(0.5*x^2)-(0.25*x)+1.2 Solution: X(i-1)=0 f(x(i-1))=1.2 X(i)=0.5 f(x(i))=0.925 X(i+1)=1.0 f(x(i+1))=0.2 F’(x(i))= ((f(x(i+1))- f(x(i))) / h) + 0(h)  F’ (0.5)=~ ( (0.2 – 0.925) ) 0.5 = -1.45  |E(t)|=58.9 0(h)= halring (h) halres the error (approximately) 0(h^2)= halring (h) quarters the error (approximately)

  2. Richardson Extrapolation There are three ways to improve derivatives estimates Decrease h Use a higher order formula that employs more points Richardson extrapolation: Uses two derivatives estimates to compute a third , more accurate approximation. If “D” is Derivative: D=~ ( (4/3)*D(h2) ) - ( (1/3)*D(h1) )

  3. Derivatives of unequally spaced data F’(x)= f(x(i-1)) * ( (2x - x(i) - x(i+1) ) ) / (x(i-1) - x(i) ) * (x(i-1) - x(i+1)) + f(x(i)) * ( (2x- x(i-1) – x(i+1)) / (x(i) – x(i-1))* (x(i) – x(i+1)) + F(x(i+1)) * ( (2x- x(i-1) - x(i) ) / (x(i+1) – x(i-1) ) * (x(i+1) – x ) This is the derivative of a 2nd-order language interpolating polynomial that fits three points.

  4. Chapter 25 Ordinary Differential Equations Runge-Kutta Methods Euler’s Method Y(i+1)= y(i)+ f(x(i) , y(i) ) * h h=step size , f(x(i),y(i))= DE evaluated It also called Euler-Cauchy or the point slope method.

  5. Example Solve using Euler’s: (Dy/dx)= -2x^3 + 12x^2 - 20x + 8.5 From x=0 to x=4  y=1  y(0) h=0.5 Exact solution is y= -0.5^4 + 4*x^3 - 10x^2 +8.5 Solution: y(i+1)= y(i) + f(x(i),y(i))* h Y(0.5)=y(0) + f(0,1)* 0.5 Slope at x=0 =f(0,1) dy/dx | (x=0,y=1) = 8.5 y(0.5)= 1 + 8.5(0.5)= 5.25

  6. True solution at x=0.5 is 3.2188  E(t)= true – approximation = 3.2188 – 5.25 = -2.0312 E(t)= - 63.1 % 2nd step: y(1)= y(0.5) + f(0.5,5.25)*0.5 y(1)=5.25 + [-2*(0.5)^3 + 12*(0.5)^2 - 20 *(0.5) + 8.5 ] * 0.5 y(1)= 5.875 True solution at x=1 is 3  E(t)= -95.8%

More Related