An ordinary differential equation relates an unknown function of one variable
to its derivatives. Write the unknown with undefined_function and its
derivatives with the derivative method on that handle, both documented in
Undefined functions:
Python
context = symi.Context()
x = context.symbol("x")
y = context.undefined_function("y")
y_of_x = y(x)# \(y'(x) = y(x) \Rightarrow y' - y = 0\)
equation = y.derivative([1],[x])- y_of_x
solution = context.solve_ordinary_differential_equation(equation, y_of_x,"x")# log(abs(y(x))) - (C1 + x) — an implicit solution
Solutions are returned in whatever form the closing route produces: an
implicit zero-equated expression with fresh integration constants
(first-order routes), or an explicit equal(y(x), …) form
(constant-coefficient route).
The expression-returning entries below are compatibility projections. When the
data, method, family scope, history, or regularity is part of the question, use
the request entries, whose results keep the evidence behind the answer: the
method that actually ran, the independent verifier's verdict, the rank verdict
behind a complete-family claim, the constants the family treats as free, and a
typed decline reason. A request that cannot be answered as stated declines; it
is never projected onto a weaker question whose answer is then reported under
the stronger one.
Solve an ODE for the unknown function named by dependent_function_call
(e.g. y(x)). The classifier ladder covers separable, linear first-order,
exact (with integrating factor), Bernoulli, Riccati (with particular
solution via the dedicated entry below), Lie-symmetry patterns, Kovacic
second-order linear, and constant-coefficient linear of any order. Equations
outside the ladder return the unevaluated ordinary_differential_equation
placeholder.
initial_conditions is a list of (point, value) pairs meaning
y(point) = value. They constrain the request, rather than merely advising a
preferred route: Symi fits the generated data and independently replays
every supplied condition before returning a particular solution. If it cannot
fit and verify those data, it declines instead of returning the unconstrained
family. Notes: this compatibility entry can express value data only; use
solve_ordinary_differential_equation_request for derivative data. WASM
passes a flat interleaved array [point_0, value_0, ...].
Solve one scalar ODE request. Each condition residual is read as equal to zero
and states one value or derivative datum at a coordinate-free point:
f(0) states f(0)=0 and f.derivative([1], [0]) - 2 states f′(0)=2.
scope is required: general is the compatibility spelling for
general_on_regular_chart, which asks for the complete local family and is
answered only when the map from the generated constants to the initial jet
has full rank; particular asks for one solution through the data.
implicit_local_family additionally requires an established implicit-function
chart and never accepts an explicit branch as a substitute.
method is automatic, laplace_transform, separable, linear_first_order,
exact, bernoulli, constant_coefficient, euler_cauchy, order_reduction,
lie_symmetry, or special_function. An explicit method runs only its named
route and declines when it does not apply. Automatic compares the certified
candidates by expression weight, explicitness, chart obligations, and stable
route order. The transform method runs the forward transform, frequency-domain
solve, and inversion; it never substitutes another route.
regularity is classical, piecewise_classical, or weak. An equation whose
coefficient switches at a point (a sign or piecewise coefficient) must be
requested as piecewise_classical: its solution is classical on each side and
matched in value and slope across the switch, not twice differentiable there.
A residual that integrates the unknown (a finite-memory Volterra term) is
answered by a memory-state reduction and replayed against the original
integral equation. A residual that evaluates the unknown at a lag is refused
here, because its history is part of the question: use
solve_ordinary_differential_equation_with_history.
Errors: a regularity that does not match the equation, a lag with no
history, or an unreadable condition residual is an invalid-argument error
naming the offending parameter.
Riccati-specific entry: with a known particular solution y1, the
substitution y=y1+1/v reduces the Riccati equation to a linear
first-order ODE. Falls back to the unevaluated placeholder when the shape is
not Riccati.
Solve a retarded delay ODE from a constant history on the stated interval
[history_start, history_end], which must cover every lag. The interval is
never inferred, so a delay equation cannot acquire a history it was not given.
The supported class is a scalar first-order linear equation with constant lags
and constant history; it is answered by an exact method-of-steps family valid
for every time, certified by induction on the step index. One history is one
solution, so the request is particular.
Classify a supported nonlinear first-order equation without projecting its
solution set onto one branch. The returned analysis keeps a regular family,
each singular or equilibrium solution, and every certified parameterized
branch separate. None means no supported classification closed with its
required exact proofs.
Search the fixed, deterministic first-order point-symmetry templates. Every
returned generator has an independently proved prolongation residual. A
search that finds no generator reports a typed decline instead of treating an
empty list as proof that no symmetry exists.
Reduce through a symmetry returned by the same context's verified search. A
failed reduction is None; it does not invalidate the independently useful
symmetry.
Solve a system of ODEs in one coordinate, one equation per declared unknown.
Each condition residual states one datum on exactly one component.
method is automatic, sequential (scalar requests solved one at a time,
each with its own fresh integration datum; declines when no elimination order
exists), or fundamental_matrix (the coupled route through a certified
fundamental matrix of the first-order state form). Every returned assignment is
verified against every equation and datum. The fundamental-matrix route accepts
constant systems, exact scalar-times-fixed and pairwise-commuting
variable-coefficient families, and triangular systems whose variation-of-
constants integrals close exactly; it declines when a required commutator or
integral cannot be proved.
context.linear_differential_operator(equation, dependent_function_call, independent_variable)
extracts a rational-coefficient scalar operator when the residual is linear in the declared
unknown. Its coefficients are ascending by derivative order; forcing gives (L[y]=f), and
restrictions lists denominators that must remain nonzero on its chart. It returns None when
linearity or rational-coefficient extraction cannot be certified.
context.ordinary_differential_equation_series(equation, dependent_function_call, independent_variable, expansion_point, initial_derivatives) returns an exact formal Taylor
series only at a certified ordinary point. The returned record carries normalized initial
coefficients, the all-index recurrence, operator chart restrictions, and proof status. It is not
a finite polynomial approximation; unsupported, singular, or inadequately initialized problems
return None.
index_start and order identify the recurrence. operator_coefficient_series is the
derivative-order concatenation, whose segment lengths are in
operator_coefficient_series_lengths; forcing_coefficients gives the shifted forcing series.
Type
classOrdinaryDifferentialEquationSeriesRecurrence
An all-index Taylor coefficient recurrence for a local ordinary differential equation series.
Check a supplied assignment without solving: no solver runs, so a swapped
component or a missing mode is reported against the assignment as given rather
than repaired. The report carries verdict, generality (the rank verdict on
the map from generated_constants to the initial jet), and required_rank.
Every request entry above returns one of these records. A record reports the
route that actually ran and the independent verifier's verdict alongside the
solution, so a caller can tell a proved answer from an unproved one, and
carries a typed decline rather than a weaker answer when the request could
not be met.
regular_family, singular_solutions, and parametric_solutions. Singular
and equilibrium branches are individually residual-checked but are not
advertised as the regular general family.
Type
classFirstOrderNonlinearSolutionAnalysis
The complete certified branch analysis of one nonlinear first-order equation.
A request entry names its scope, method, and regularity by one of these values.
Naming a method runs that route only: it declines when the route does not
apply, rather than falling through to another one.
A result reports its outcome through these values. generality is the rank
decision behind a complete-family claim and is separate from verification,
the independent verifier's decision about the solution itself: a solution can
be verified and still not be the general family.
A request that cannot be met carries one of these reasons instead of a weaker
answer. The reason names the step that did not close, so a decline can be acted
on rather than merely retried.