Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Differentiation-Continuous Functions - Numerical Methods - Lecture Slides, Slides of Mathematical Methods for Numerical Analysis and Optimization

Main points are: Differentiation-Continuous Functions, Forward Difference Approximation, Graphical Representation, First Derivative, Exact Value of Acceleration, Absolute Relative True Error, Negative Number

Typology: Slides

2012/2013

Uploaded on 04/16/2013

mmadhav
mmadhav 🇮🇳

5

(8)

76 documents

1 / 42

Related documents


Partial preview of the text

Download Differentiation-Continuous Functions - Numerical Methods - Lecture Slides and more Slides Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity! Differentiation-Continuous Functions Docsity.com Forward Difference Approximation ( ) ( ) ( ) x xfxxf x xf Δ Δ 0Δ lim −+ → =′ For a finite 'Δ' x ( ) ( ) ( ) x xfxxfxf ∆ −∆+ ≈′ Docsity.com Example 1 Cont. Solution ( ) ( ) ( ) t ttta iii ∆ − ≈ + νν 1 16=it 2Δ =t 18 216 1 = += ∆+=+ ttt ii ( ) ( ) ( ) 2 161816 νν −≈a Docsity.com Example 1 Cont. ( ) ( ) ( )188.91821001014 1014ln200018 4 4 −      −× × =ν m/s02.453= ( ) ( ) ( )168.91621001014 1014ln200016 4 4 −      −× × =ν m/s07.392= Hence ( ) ( ) ( ) 2 161816 νν −≈a Docsity.com Example 1 Cont. 2 07.39202.453 − ≈ 2m/s474.30≈ The exact value of ( )16a can be calculated by differentiating ( ) t t t 8.9 21001014 1014ln2000 4 4 −      −× × =ν as ( ) ( )[ ]tν dt dta = b) Docsity.com Backward Difference Approximation of the First Derivative We know ( ) ( ) ( ) x xfxxf x xf Δ Δ 0Δ lim −+ → =′ For a finite 'Δ' x , ( ) ( ) ( ) x xfxxfxf ∆ −∆+ ≈′ If 'Δ' x is chosen as a negative number, ( ) ( ) ( ) x xfxxfxf ∆− −∆− ≈′ ( ) ( ) x xxfxf Δ Δ−− = Docsity.com Backward Difference Approximation of the First Derivative Cont. This is a backward difference approximation as you are taking a point backward from x. To find the value of ( )xf ′ at ixx = , we may choose another point 'Δ' x behind as 1−= ixx . This gives ( ) ( ) ( ) x xfxfxf iii ∆ − ≈′ −1 ( ) ( ) 1 1 − − − − = ii ii xx xfxf where 1Δ −−= ii xxx Docsity.com Backward Difference Approximation of the First Derivative Cont. x x-Δx x f(x) Figure 2 Graphical Representation of backward difference approximation of first derivative Docsity.com Example 2 Cont. ( ) ( ) ( )168.91621001014 1014ln200016 4 4 −      −× × =ν m/s07.392= ( ) ( ) ( )148.91421001014 1014ln200014 4 4 −      −× × =ν m/s24.334= ( ) ( ) ( ) 2 141616 νν −≈a 2 24.33407.392 − = 2m/s915.28≈ Docsity.com Example 2 Cont. The absolute relative true error is 100 674.29 915.28674.29 xt − =∈ %5584.2= The exact value of the acceleration at from Example 1 is ( ) 2m/s674.2916 =a s16=t Docsity.com Derive the forward difference approximation from Taylor series Taylor’s theorem says that if you know the value of a function '' f at a point ix and all its derivatives at that point, provided the derivatives are continuous between ix and 1+ix , then ( ) ( ) ( )( ) ( ) ( ) +−′′+−′+= +++ 2111 !2 ii i iiiii xx xfxxxfxfxf Substituting for convenience ii xxx −= +1Δ ( ) ( ) ( ) ( ) ( ) +′′+′+=+ 21 Δ!2Δ x xfxxfxfxf iiii ( ) ( ) ( ) ( ) ( ) +∆′′− ∆ − =′ + x xf x xfxf xf iiii !2 1 ( ) ( ) ( ) ( )x x xfxf xf iii ∆+∆ − =′ + 01 Docsity.com Central Divided Difference Hence showing that we have obtained a more accurate formula as the error is of the order of . ( )2Δ0 x x f(x) x-Δx x x+Δx Figure 3 Graphical Representation of central difference approximation of first derivative Docsity.com Example 3 The velocity of a rocket is given by ( ) 300,8.9 21001014 1014ln2000 4 4 ≤≤−      −× × = tt t tν where ''ν is given in m/s and ''t is given in seconds. (a) Use central divided difference approximation of the first derivative of to calculate the acceleration at . Use a step size of . (b) Find the absolute relative true error for part (a). ( )tν st 16= st 2Δ = Docsity.com Example 3 cont. Solution ( ) ( ) ( ) t ttta iii ∆ − ≈ −+ 2 11 νν 16=it 18 216 1 = += ∆+=+ ttt ii 14 216 1 = −= ∆−=− ttt ii ( ) ( ) ( )( )22 141816 νν −≈a ( ) ( ) 4 1418 νν − ≈ 2=∆t Docsity.com Comparision of FDD, BDD, CDD The results from the three difference approximations are given in Table 1. Type of Difference Approximation Forward Backward Central 30.475 28.915 29.695 2.6967 2.5584 0.069157 Table 1 Summary of a (16) using different divided difference approximations ( )16a ( )2/ sm %t∈ Docsity.com Finding the value of the derivative within a prespecified tolerance In real life, one would not know the exact value of the derivative – so how would one know how accurately they have found the value of the derivative. A simple way would be to start with a step size and keep on halving the step size and keep on halving the step size until the absolute relative approximate error is within a pre-specified tolerance. Take the example of finding for ( )tv′ ( ) t t t 8.9 21001014 1014ln2000 4 4 −      −× × =ν at using the backward divided difference scheme. 16=t Docsity.com 2 1 0.5 0.25 0.125 28.915 29.289 29.480 29.577 29.625 1.2792 0.64787 0.32604 0.16355 Finding the value of the derivative within a prespecified tolerance Cont. Given in Table 2 are the values obtained using the backward difference approximation method and the corresponding absolute relative approximate errors. t∆ ( )tv′ %a∈ Table 2 First derivative approximations and relative errors for different Δt values of backward difference scheme Docsity.com Finite Difference Approximation of Higher Derivatives Cont. Subtracting 2 times equation (4) from equation (3) gives ( ) ( ) ( ) ( )( ) ( )( ) 3212 ΔΔ2 xxfxxfxfxfxf iiiii ′′′+′′+−=− ++ ( ) ( ) ( ) ( ) ( ) ( )( ) +′′′−+−=′′ ++ xxf x xfxfxf xf i iii i ΔΔ 2 2 12 ( ) ( ) ( ) ( ) ( ) ( )x x xfxfxf xf iiii Δ0Δ 2 2 12 + +− ≅′′ ++ (5) Docsity.com Example 4 The velocity of a rocket is given by ( ) 300,8.9 21001014 1014ln2000 4 4 ≤≤−      −× × = tt t tν Use forward difference approximation of the second derivative of to calculate the jerk at . Use a step size of . ( )tν st 16= st 2Δ = Docsity.com Example 4 Cont. Solution ( ) ( ) ( ) ( ) ( )2 12 2 t ttttj iiii ∆ +− ≈ ++ ννν 16=it 18 216 1 = += ∆+=+ ttt ii ( ) ( ) 20 2216 22 = += ∆+=+ ttt ii ( ) ( ) ( ) ( ) ( )22 161822016 ννν +−≈j 2=∆t Docsity.com Example 4 Cont. Knowing that ( )[ ] t t dt d 1ln = and 2 11 ttdt d −=    ( ) 8.9 21001014 1014 1014 210010142000 4 4 4 4 −      −× ×       × −× = tdt dtta t t 3200 4.294040 +− −− = ( ) ( ) ( ) 8.9210021001014 10141 1014 210010142000 24 4 4 4 −−        −× × −      × −× = t t Docsity.com Example 4 Cont. ( ) ( )[ ] 2)3200( 18000 t ta dt dtj +− = = ( ) 3 2 m/s77909.0 )]16(3200[ 1800016 = +− =j The absolute relative true error is 100 77909.0 84515.077909.0 × − =∈t % 4797.8= Similarly it can be shown that Docsity.com Higher order accuracy of higher order derivatives The formula given by equation (5) is a forward difference approximation of the second derivative and has the error of the order of ( )xΔ . Can we get a formula that has a better accuracy? We can get the central difference approximation of the second derivative. The Taylor series for ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 4321 !4!3!2 x xf x xf x xf xxfxfxf iiiiii ∆ ′′′′ +∆ ′′′ +∆ ′′ +∆′+=+ where xxx ii Δ1 +=+ (6) Docsity.com Example 5 Cont. Solution ( ) ( ) ( ) ( ) ( )2 11 2 t ttt ta iiii ∆ +− ≈ −+ ννν 16=it 18 216 1 = += ∆+=+ ttt ii 14 216 1 = −= ∆−=− ttt ii ( ) ( ) ( ) ( ) ( )22 141621816 ννν +−≈j 2=∆t Docsity.com Example 5 Cont. ( ) ( ) ( )188.91821001014 1014ln200018 4 4 −      −× × =ν m/s02.453= ( ) ( ) ( )168.91621001014 1014ln200016 4 4 −      −× × =ν m/s07.392= ( ) ( ) ( )148.91421001014 1014ln200014 4 4 −      −× × =ν m/s24.334= Docsity.com Example 5 Cont. ( ) ( ) ( ) ( ) ( )22 141621816 ννν +−≈j ( ) 4 24.33407.392202.453 +− ≈ The absolute relative true error is 100 77908.0 78.077908.0 × − =∈t 3m/s77969.0≈ %077992.0= Docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved