Processing math: 100%

Finite Difference Method - Exercises 1-3

Exercise 1.1: The forward difference formulas make use of the values of the function to the right of the base grid point. Thus the first derivative at point i(t = t_i) is defined as:

dxdt=x(t+Δt)x(t)Δt=xi+1xiΔt

Derive the forward difference formulas for:

d2xdt2,d3xdt3 and d4xdt4 at ti.


Solution:

d2xdt2|i=dxdt|i+1dxdt|iΔt=(xi+2xi+1Δt)(xi+1xiΔt)Δt=xi+22xi+1+xi(Δt)2
d3xdt3|i=d2xdt2|i+1d2xdt2|iΔt=(xi+32xi+2+xi+1(Δt)2)(xi+22xi+1+xi(Δt)2)Δt=xi+33xi+2+3xi+1xi(Δt)3
d4xdt4|i=d3xdt3|i+1d3xdt3|iΔt=(xi+43xi+3+3xi+2xi+1(Δt)3)(xi+33xi+2+3xi+1xi(Δt)3)Δt=d4xdt4|i=xi+44xi+3+6xi+24xi+1+xi(Δt)4


Exercise 1.2: The backward difference formulas make use of the values of the function to the right of the base grid point. Thus the first derivative at point i(t = t_i) is defined as:

dxdt=x(t)x(tΔt)Δt=xixi1Δt


Derive the forward difference formulas for:

d2xdt2,d3xdt3 and d4xdt4 at ti.
+

Solution:

d2xdt2|i=dxdt|idxdt|i1Δt=(xixi1Δt)(xi1xi2Δt)Δt=xi2xi1+xi2(Δt)2
d3xdt3|i=d2xdt2|id2xdt2|i1Δt=(xi2xi1+xi2(Δt)2)(xi12xi2+xi3(Δt)2)Δt=xi3xi1+3xi2xi3(Δt)3
d4xdt4|i=d3xdt3|id3xdt3|i1Δt=(xi3xi1+3xi2xi3(Δt)3)(xi13xi2+3xi3xi4(Δt)3)Δt=d4xdt4|i=xi4xi1+6xi24xi3+xi4(Δt)4


Exercise 1.3: Derive the formula for the fourth derivative according to the central difference method.
Solution:

d2xdt2|i=xi+12xi+xi1(Δt)2
d4xdt4|i=d2xdt2|i+12d2xdt2|i+d2xdt2|i1(Δt)2=(xi+22xi+1+xi(Δt)2)2(xi+12xi+xi1(Δt)2)+(xi2xi1+xi2(Δt)2)(Δt)2d4xdt4|i=xi+24xi+1+6xi4xi1+xi2(Δt)4

Nema komentara:

Objavi komentar