حل معادله دیفرانسیل با استفاده از Excel
Hi
In this post, we are going to solve a simple differential Equation with Excel. Here we solve the problem with Iterative well-known method as Runge-Kutta1.
The goal is solving dy/dx=xy with initial condition y(0)=1.Do the following Procedures:
a.Open a workbook and make Sheet1 active (If it is not activated by default). Enter the text shown on following Pic.
b. Name the cell C4 as h.
c. Enter the series of values in A6:A11 and B6:B11.
d. In C6, enter the value 1.0. This is the initial condition y(0)=1.
e. Enter these formulas to compute the k parameters:
D6: =h*(B6 * C6)
E6: =h*((B6 + h/2) * (C6 + D6/2))
F6: =h*((B6 + h/2) * (C6 + E6/2))
G6: =h*((B6 + h) * (C6 + F6))
f. In C7, enter =C6 + (1/6)*(D6 + 2*E6 + 2*F6 + G6) to compute the first
approximation. Compare this formula with the first equation in the
Runge-Kutta recursion formula above.
g. Copy the cells D6:G6 to D7:G7. Then, copy C7:G7 down to row
10 and copy C10 to C11. This computes the successive y
approximations.
h. To compute the error in our approximations, enter in H6 =C6 –EXP
(B6^2 / 2); after formatting to scientific, copy it down to H11.
B. Liengme, A Guide to Microsoft Excel 2013 for Scientists and Engineers: Academic Press, 2015.