You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transform the independent variable (e.g. ``t``) of the ODE system `sys` to a dependent variable `iv` (e.g. ``f(t)``).
57
-
An equation in `sys` must define the rate of change of the new independent variable (e.g. ``df(t)/dt``).
58
-
Alternatively, `eq` can specify such an equation.
56
+
Transform the independent variable (e.g. ``t``) of the ODE system `sys` to a dependent variable `iv` (e.g. ``u(t)``).
57
+
An equation in `sys` must define the rate of change of the new independent variable (e.g. ``du(t)/dt``).
58
+
This or other additional equations can also be specified through `eqs`.
59
59
60
60
The transformation is well-defined when the mapping between the new and old independent variables are one-to-one.
61
-
This is satisfied if one is a strictly increasing function of the other (e.g. ``df(t)/dt > 0`` or ``df(t)/dt < 0``).
61
+
This is satisfied if one is a strictly increasing function of the other (e.g. ``du(t)/dt > 0`` or ``du(t)/dt < 0``).
62
62
63
63
Keyword arguments
64
64
=================
65
-
If `dummies`, derivatives of the new independent variable are expressed through dummy equations; otherwise they are explicitly inserted into the equations.
65
+
If `dummies`, derivatives of the new independent variable with respect to the old one are expressed through dummy equations; otherwise they are explicitly inserted into the equations.
66
66
If `simplify`, these dummy expressions are simplified and often give a tidier transformation.
67
-
If `verbose`, the function prints intermediate transformations of equations to aid debugging.
68
-
Any additional keyword arguments `kwargs...` are forwarded to the constructor that rebuilds the system.
67
+
If `fold`, internal substitutions will evaluate numerical expressions.
68
+
Additional keyword arguments `kwargs...` are forwarded to the constructor that rebuilds `sys`.
69
69
70
70
Usage before structural simplification
71
71
======================================
72
72
The variable change must take place before structural simplification.
73
73
Subsequently, consider passing `allow_symbolic = true` to `structural_simplify(sys)` to reduce the number of unknowns, with the understanding that the transformation is well-defined.
74
74
75
+
Usage with non-autonomous systems
76
+
=================================
77
+
If `sys` is autonomous (i.e. ``t`` appears explicitly in its equations), it is often desirable to also pass an algebraic equation relating the new and old independent variables (e.g. ``t = f(u(t))``).
78
+
Otherwise the transformed system will be underdetermined and cannot be structurally simplified without additional changes.
79
+
75
80
Example
76
81
=======
77
82
Consider a free fall with constant horizontal velocity.
78
-
The laws of physics naturally describes position as a function of time.
79
-
By changing the independent variable, it can be reformulated for vertical position as a function of horizontal distance:
83
+
Physics naturally describes position as a function of time.
84
+
By changing the independent variable, it can be reformulated for vertical position as a function of horizontal position:
Mt =ODESystem([D(x) ~2*x], t; name =:M) |> complete#TODO: avoid complete. can avoid it if passing defined $variable directly to change_independent_variable
97
+
Mt =ODESystem([D(x) ~2*x], t; name =:M) |> complete
0 commit comments