|
Description
|
|
|
Procedure form outputs for initial value dsolve/numeric solutions (ODE and DAE) have several interactive features. This page describes these features, and demonstrates how to use them.
|
|
|
Examples
|
|
|
Initial values
|
|
|
The initial values used in obtaining the current solution can be queried by calling the dsolve/numeric output procedure with option 'initial' as follows:
|
>
|
|
| (1) |
| (2) |
>
|
|
| (4) |
| (5) |
| (6) |
|
In addition, initial values can be changed by calling the solution procedure with an equation of the form , where newvalues is a list of new numeric initial values in the same order as specified for the solution output (i.e. if calling the solution procedure returns the values for in a list, initial must be specified as ).
|
| (8) |
|
For listprocedure and operator output form, the list can be provided to any of the procedures, or individual values can be changed by providing a single value instead of a list:
|
>
|
|
| (9) |
>
|
|
| (10) |
| (11) |
|
New to Maple 12, this feature now also works with range solutions and DAE problems.
|
|
For DAE problems, the process is the same as for initial value problems, but consistency checks are performed as soon as any values are changed. Note that if the initial values are changed to inconsistent values, the solution procedure(s) will not be usable until correct values are set:
|
>
|
|
| (12) |
| (13) |
| (14) |
|
Choose a bad value for y(0):
|
>
|
|
>
|
|
| (15) |
| (16) |
|
For range solutions (both for ODE and DAE), the solution is recomputed for the originally specified range whenever the initial values are changed.
|
|
|
Parametrized problems
|
|
|
It is now possible to obtain procedure solutions for parametrized ODE and DAE initial value problems with dsolve/numeric. Both the ODE/DAE defining equations, and the initial values, can depend upon the parameters.
|
|
The problem parameters must be declared when obtaining the dsolve/numeric solution procedure, and can be set using the procedure in much the same way as the initial values. For example:
|
>
|
|
| (17) |
|
Solutions cannot be obtained until the parameters are set:
|
|
Parameter values can be queried and set as follows:
|
| (18) |
>
|
|
| (19) |
| (21) |
| (22) |
| (23) |
| (25) |
|
Parameters also work for DAE problems, as well as problems with specified ranges. For DAE problems though, just as for setting of the initial data, the parameters must be consistent with the constraints of the problem:
|
>
|
|
| (26) |
| (27) |
>
|
|
|
Repair the incorrect value
|
| (28) |
| (29) |
|
Note that it is not always possible to simply adjust the parameters of a problem to be consistent with the constraints, but it may also be necessary to adjust the initial conditions simultaneously. When this is the case, the initial_and_parameters keyword must be used instead. For example:
|
>
|
|
| (30) |
>
|
|
| (31) |
>
|
|
| (32) |
| (33) |
|
|
Other Features
|
|
|
In addition to the features discussed above, there are several other small interactive features available for dsolve/numeric procedures.
|
>
|
|
| (34) |
| (35) |
|
The argument 'start' can be used to query the initial point specified for the problem:
|
|
The argument 'last' can be used to query the last computed point for the solution procedure (the last computed point does not include the interactive queries described on this page). This is most useful for problems with events.
|
| (37) |
|
For range-defined problems, 'left' and 'right' can be used to query the endpoints of the range.
|
>
|
|
| (38) |
|
The 'method' argument can be used to query the numerical method being used to obtain the solution of the problem:
|
|
The 'numfun' argument can be used to query the number of function evaluations performed for integration from the initial point to the most recently requested solution value (supported for all solvers that support maxfun):
|
|
|
|
|