Question #175524

1) Based on the finite difference method, what is the advanced scheme of the first, second and third derivatives with second order accuracy?


2) Consider the following equation:


d3y/dt3+2d2y/dt2+4dy/dt+8y=te2t


Where y(0) = 0 and y(3) = 28.2

By using the results from the session (1), solve the equation for t E [0 ; 3], with delta(t) = 0.3



1
Expert's answer
2021-04-29T16:25:00-0400

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)+f(x0)1!h+f(x0)2!h2+f(x0)3!h3+Rn(x),f(x_0+h)=f(x_0)+\frac{f'(x_0)}{1!}h+\frac{f''(x_0)}{2!}h^2+\frac{f'''(x_0)}{3!}h^3+R_n(x),

where Rn(x)R_n(x) denotes the reminder term. Another expansion is:

f(x0h)=f(x0)f(x0)1!h+f(x0)2!h2f(x0)3!h3+R~n(x),f(x_0-h)=f(x_0)-\frac{f'(x_0)}{1!}h+\frac{f''(x_0)}{2!}h^2-\frac{f'''(x_0)}{3!}h^3+\tilde{R}_n(x),

where R~n(x)\tilde{R}_n(x) is another reminder term. From the latter we find: f(x0+h)f(x0h)=2f(x0)h+2h3f(x0)3!+Rn(x)R~n(x)f(x_0+h)-f(x_0-h)=2f'(x_0)h+2h^3\frac{f'''(x_0)}{3!} +R_n(x)-\tilde{R}_n(x)

and: f(x0+h)+f(x0h)=2f(x0)+f(x0)h2+Rn(x)+R~n(x)f(x_0+h)+f(x_0-h)=2f(x_0)+f''(x_0)h^2+R_n(x)+\tilde{R}_n(x)

The latter yields: f(x0)=f(x0+h)f(x0h)2hh2f(x0)3!(Rn(x)R~n(x))2hf'(x_0)=\frac{f(x_0+h)-f(x_0-h)}{2h}-h^2\frac{f'''(x_0)}{3!} -\frac{(R_n(x)-\tilde{R}_n(x))}{2h}; f(x0)=f(x0+h)f(x0h)2f(x0)h2(Rn(x)+R~n(x))h2f''(x_0)=\frac{f(x_0+h)-f(x_0-h)-2f(x_0)}{h^2}-\frac{(R_n(x)+\tilde{R}_n(x))}{h^2}.

Thus, the approximate expressions are f(x0)f(x0+h)f(x0h)2hf'(x_0) \approx\frac{f(x_0+h)-f(x_0-h)}{2h} and f(x0)f(x0+h)+f(x0h)2f(x0)h2f''(x_0)\approx\frac{f(x_0+h)+f(x_0-h)-2f(x_0)}{h^2}.

We express f(x0)f'''(x_0) as: f(x0)f(x0+h)f(x0h)2h12h(f(x0+2h)+f(x0)2f(x0+h)h2f(x0)+f(x02h)2f(x0h)h2)=f(x0+2h)2f(x0+h)+2f(x0h)f(x02h)2h3f'''(x_0)\approx\frac{f''(x_0+h)-f''(x_0-h)}{2h}\approx\frac{1}{2h}\left(\frac{f(x_0+2h)+f(x_0)-2f(x_0+h)}{h^2}-\frac{f(x_0)+f(x_0-2h)-2f(x_0-h)}{h^2}\right)=\frac{f(x_0+2h)-2f(x_0+h)+2f(x_0-h)-f(x_0-2h)}{2h^3}

2). We can substitute the approximations directly and receive the system for the values f(x02h)f(x_0-2h), f(x0h)f(x_0-h), f(x0)f(x_0), f(x0+h)f(x_0+h), f(x0+2h)f(x_0+2h) at different points. On the other hand, we can solve the system directly. Namely, we substitute the expression y=ceλxy=ce^{\lambda x}, c,λCc,\lambda\in{\mathbb{C}} into the homogenuous equation and receive: ceλx(λ3+2λ2+4λ+8)=0ce^{\lambda x}(\lambda^3+2\lambda^2+4\lambda+8)=0. The roots are: λ=2,2I,2I\lambda=-2,2I,-2I. Thus, the general solution of the homogenuous system is: y=c1e2x+c2e2Ix+c3e2Ixy=c_1e^{-2x}+c_2e^{2Ix}+c_3e^{-2Ix}, where c1,c2,c3Cc_1,c_2,c_3\in{\mathbb{C}} . We check, whether the following function yp=αxe2x+βe2xy_p=\alpha xe^{2x}+\beta e^{2x}, α,βC\alpha,\beta\in{\mathbb{C}}, is a solution of the initial equation. The derivatives has the form: yp=2αxe2x+(α+2β)e2xy_p'=2\alpha x e^{2x}+(\alpha+2\beta) e^{2x}, yp=4αxe2x+(4α+4β)e2xy_p''=4\alpha x e^{2x}+(4\alpha+4\beta) e^{2x}, yp=8αxe2x+(12α+8β)e2xy_p'''=8\alpha x e^{2x}+(12\alpha+8\beta) e^{2x}. We substitute it into equation and receive: (32αx+(12α+8α+4α+8β+8β+16β))e2x=(32αx+(24α+32β))e2x=xe2x(32\alpha x+(12\alpha+8\alpha+4\alpha+8\beta+8\beta+16\beta))e^{2x}=(32\alpha x+(24\alpha+32\beta))e^{2x}=xe^{2x}

From the latter we receive: α=132\alpha=\frac{1}{32}, β=34α=3128\beta=-\frac{3}{4}\alpha=-\frac{3}{128} Thus, yp=1128(4x3)e2xy_p=\frac{1}{128}(4x-3)e^{2x}. The solution (without initial conditions) has the form: y=c1e2x+c2e2Ix+c3e2Ix+1128(4x3)e2xy=c_1e^{-2x}+c_2e^{2Ix}+c_3e^{-2Ix}+\frac{1}{128}(4x-3)e^{2x}. We set y(0)=0y(0)=0 and y(3)=28.2y(3)=28.2 and receive a system for coefficients c1,c2,c3.c_1,c_2,c_3. Thus, we get the solution of the original system with initial conditions.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS