1). We remind that the finite difference method is a class of numerical techniques for solving differential equations by approximating derivatives with finite differences. In order to achieve the second order accuracy, we consider the Taylor series expansion:
f(x0+h)=f(x0)+1!f′(x0)h+2!f′′(x0)h2+3!f′′′(x0)h3+Rn(x),
where Rn(x) denotes the reminder term. Another expansion is:
f(x0−h)=f(x0)−1!f′(x0)h+2!f′′(x0)h2−3!f′′′(x0)h3+R~n(x),
where R~n(x) is another reminder term. From the latter we find: f(x0+h)−f(x0−h)=2f′(x0)h+2h33!f′′′(x0)+Rn(x)−R~n(x)
and: f(x0+h)+f(x0−h)=2f(x0)+f′′(x0)h2+Rn(x)+R~n(x)
The latter yields: f′(x0)=2hf(x0+h)−f(x0−h)−h23!f′′′(x0)−2h(Rn(x)−R~n(x)); f′′(x0)=h2f(x0+h)−f(x0−h)−2f(x0)−h2(Rn(x)+R~n(x)).
Thus, the approximate expressions are f′(x0)≈2hf(x0+h)−f(x0−h) and f′′(x0)≈h2f(x0+h)+f(x0−h)−2f(x0).
We express f′′′(x0) as: f′′′(x0)≈2hf′′(x0+h)−f′′(x0−h)≈2h1(h2f(x0+2h)+f(x0)−2f(x0+h)−h2f(x0)+f(x0−2h)−2f(x0−h))=2h3f(x0+2h)−2f(x0+h)+2f(x0−h)−f(x0−2h)
2). We can substitute the approximations directly and receive the system for the values f(x0−2h), f(x0−h), f(x0), f(x0+h), f(x0+2h) at different points. On the other hand, we can solve the system directly. Namely, we substitute the expression y=ceλx, c,λ∈C into the homogenuous equation and receive: ceλx(λ3+2λ2+4λ+8)=0. The roots are: λ=−2,2I,−2I. Thus, the general solution of the homogenuous system is: y=c1e−2x+c2e2Ix+c3e−2Ix, where c1,c2,c3∈C . We check, whether the following function yp=αxe2x+βe2x, α,β∈C, is a solution of the initial equation. The derivatives has the form: yp′=2αxe2x+(α+2β)e2x, yp′′=4αxe2x+(4α+4β)e2x, yp′′′=8αxe2x+(12α+8β)e2x. We substitute it into equation and receive: (32αx+(12α+8α+4α+8β+8β+16β))e2x=(32αx+(24α+32β))e2x=xe2x
From the latter we receive: α=321, β=−43α=−1283 Thus, yp=1281(4x−3)e2x. The solution (without initial conditions) has the form: y=c1e−2x+c2e2Ix+c3e−2Ix+1281(4x−3)e2x. We set y(0)=0 and y(3)=28.2 and receive a system for coefficients c1,c2,c3. Thus, we get the solution of the original system with initial conditions.
Comments