Finite-time blow-up
Hyperbolic growth x' = a x^p, which diverges at the finite time x0^(1 - p) / (a (p - 1)) for p > 1.
- Name:
finite_time_blow_up - Field:
mathematics/dynamical_systems - Formalism: ordinary differential equations
- References: Forrest 2018
Factory
@register_model(
field='mathematics/dynamical_systems',
tags=('ode', 'singularity', 'hyperbolic growth'),
references=('Forrest 2018',),
defaults={'until': 0.9, 'dt': 0.01},
)
def finite_time_blow_up(x: float = 1.0, *, a: float = 1.0, p: float = 2.0) -> System:
"""Return hyperbolic growth `x' = a x^p`, which diverges at the finite time `x0^(1 - p) / (a (p - 1))` for p > 1.
Args:
x:
The initial value, positive.
a:
The growth coefficient.
p:
The growth exponent.
Returns:
system:
The model, with the state `growth.x`.
Examples:
>>> from skcomplex.models.mathematics.dynamical_systems import finite_time_blow_up
>>> finite_time_blow_up(p=3.0).elements[0].p
3.0
"""
return System(elements=[BlowUpElement('growth', x=x, a=a, p=p)])
Components
class BlowUpElement(Element):
"""Hyperbolic growth `x' = a x^p`, which diverges in finite time for `p > 1`.
Args:
label:
The label of the element.
visual:
How the element is drawn, or `None` for `default_visual_`.
x:
The initial value.
a:
The growth coefficient.
p:
The growth exponent.
Examples:
>>> from skcomplex.models.mathematics.dynamical_systems import BlowUpElement
>>> BlowUpElement('growth', p=3.0).p
3.0
"""
def __init__(
self,
label: str,
visual: VisualSpec | None = None,
*,
x: Annotated[object, StateSpec()] = 1.0,
a: Annotated[object, ParameterSpec()] = 1.0,
p: Annotated[object, ParameterSpec()] = 2.0,
) -> None:
super().__init__(label, visual=visual)
self.x = x
self.a = a
self.p = p
def _get_laws(self, s: SimpleNamespace) -> list[BaseLaw]:
"""Return the rate of the value.
Args:
s:
The namespace of the symbols the laws can use.
Returns:
laws:
The laws of the element.
"""
return [RateLaw(s.x, s.a * s.x**s.p)]
Equations
growth.x: diff(x_growth(t), t) == a_growth*x_growth(t)^p_growth
