Reference Guide

Full Command and Function Reference 3-203
RKF
Type: Command
Description: Solve for Initial Values (Runge–Kutta–Fehlberg) Command: Computes the solution to an initial
value problem for a differential equation, using the Runge-Kutta-Fehlberg (4,5) method.
RKF solves y'(t) = f(t,y), where y(t
0
) = y
0
. The arguments and results are as follows:
{ list } contains three items in this order: the independent (t) and solution (y) variables, and the
right-hand side of the differential equation (or a variable where the expression is stored).
x
tol
sets the absolute error tolerance. If a list is used, the first value is the absolute error
tolerance and the second value is the initial candidate step size.
x
Tfinal
specifies the final value of the independent variable.
RKF repeatedly calls RKFSTEP as it steps from the initial value to x
Tfinal
.
Access: …µ
RKF
Input/Output:
L
3
/A
1
L
2
/A
2
L
1
/A
3
L
2
/I
1
L
1
/I
2
{ list }
x
tol
x
T final
{ list }
x
tol
{ list }
{ x
tol
x
hstep
}
x
T final
{ list }
x
tol
L = Level; A = Argument; I = item
Example: Solve the following initial value problem for y(8), given that y(0) = 0:
),(2
1
1
2
2
ytfy
t
y =
+
=
1. Store the independent variable’s initial value, 0, in T.
2. Store the dependent variable’s initial value, 0, in Y.
3. Store the expression,
2
2
2
1
1
y
t
+
, in F.
4. Enter a list containing these three items:
{ T Y F }
.
5. Enter the tolerance. Use estimated decimal place accuracy as a guideline for choosing a
tolerance: 0.00001.
6. Enter the final value for the independent variable: 8.
The stack should look like this:
{ T Y F }
.00001
8
7. Press
RKF
. The variable T now contains 8, and Y now contains the value .123077277659.
The actual answer is .123076923077, so the calculated answer has an error of approximately
.00000035, well within the specified tolerance.
See also: RKFERR, RKFSTEP, RRK, RRKSTEP, RSBERR
RKFERR
Type: Command
Description: Error Estimate for Runge–Kutta–Fehlberg Method Command: Returns the absolute error
estimate for a given step h when solving an initial value problem for a differential equation.
The arguments and results are as follows:
{ list } contains three items in this order: the independent (t) and solution (y) variables, and the
right-hand side of the differential equation (or a variable where the expression is stored).
h is a real number that specifies the step.
y
delta
displays the change in solution for the specified step.