Professional Documents
Culture Documents
Runge Kutta
Runge Kutta
b
N
h
i
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
0
2
10
0.2
t_i
0.00000
0.20000
0.40000
0.60000
0.80000
1.00000
1.20000
1.40000
1.60000
1.80000
2.00000
2.20000
2.40000
2.60000
2.80000
3.00000
3.20000
3.40000
3.60000
3.80000
4.00000
4.20000
4.40000
4.60000
4.80000
5.00000
5.20000
5.40000
5.60000
5.80000
6.00000
6.20000
6.40000
initial value
0.5
exact
0.5000000
0.8292986
1.2140877
1.6489406
2.1272295
2.6408591
3.1799415
3.7324000
4.2834838
4.8151763
5.3054720
5.7274933
6.0484118
6.2281310
6.2176766
5.9572315
5.3737349
4.3779500
2.8608828
0.6894078
-2.2990750
-6.3031655
-11.5654343
-18.3821578
-27.1152088
-38.2065796
-52.1961209
-69.7432081
-91.6532037
-118.9097800
-152.7143967
-194.5345205
-246.1625189
error
0.0000000
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
k_1
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
k_2
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
thod of Order 4
k_3
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
k_4
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
To change the derivative function f, click on tools. then macros. Edit the macro named f
1. On the Tools menu, point to Macro, and then click Visual Basic Editor.
2. On the Insert menu in the Microsoft Visual Basic window, click Module.
3. In the Modulen window, type the code for your function. For example, a function to calculate a
6% sales commission might look like this:
The first line in the example above creates a function named Commission, which performs its
calculations on a number or cell reference. The function uses a variable, MyNum, to store the
number or value from the cell. The second line calculates the value of the Commission function by
multiplying the number or cell reference (MyNum) by 0.06 (a more sophisticated function could
have several lines of code to perform its calculations). The third line ends the function code.