Skip to content

Sprott jerk

Sprott's jerk equation x''' = -A x'' - x' + |x| - 1, chaotic near A = 0.6.

  • Name: sprott_jerk
  • Field: mathematics/dynamical_systems
  • Formalism: ordinary differential equations
  • References: Sprott 1997; Datseris and Parlitz 2022

Factory

@register_model(
    field='mathematics/dynamical_systems',
    tags=('chaos', 'ode', 'third order'),
    references=('Sprott 1997', 'Datseris and Parlitz 2022'),
    defaults={'until': 200.0, 'dt': 0.1},
)
def sprott_jerk(
    x: float = 0.0,
    velocity: float = 0.0,
    acceleration: float = 1.0,
    *,
    A: float = 0.6,
) -> System:
    """Return Sprott's jerk equation `x''' = -A x'' - x' + |x| - 1`, chaotic near A = 0.6.

    Args:
        x:
            The initial position.

        velocity:
            The initial first derivative.

        acceleration:
            The initial second derivative.

        A:
            The damping of the second derivative.

    Returns:
        system:
            The model, with the state `jerk.x` of order 3 and its derivatives `jerk.x_d1` and `jerk.x_d2`.

    Examples:
        >>> from skcomplex.models.mathematics.dynamical_systems import sprott_jerk
        >>> sprott_jerk(A=0.5).elements[0].A
        0.5
    """
    return System(elements=[JerkElement('jerk', x=x, x_d1=velocity, x_d2=acceleration, A=A)])

Components

class JerkElement(Element):
    """Sprott's jerk flow `x''' = -A x'' - x' + |x| - 1` of a state of order 3.

    Args:
        label:
            The label of the element.

        visual:
            How the element is drawn, or `None` for `default_visual_`.

        x:
            The initial position.

        x_d2:
            The initial second derivative.

        x_d1:
            The initial first derivative.

        A:
            The damping of the second derivative.

    Examples:
        >>> from skcomplex.models.mathematics.dynamical_systems import JerkElement
        >>> JerkElement('jerk', A=0.5).A
        0.5
    """

    def __init__(
        self,
        label: str,
        visual: VisualSpec | None = None,
        *,
        x: Annotated[object, StateSpec(order=3, initial=(0.0, 1.0))] = 0.0,
        x_d2: float = 1.0,
        x_d1: float = 0.0,
        A: Annotated[object, ParameterSpec()] = 0.6,
    ) -> None:
        super().__init__(label, visual=visual)
        self.x = x
        self.x_d2 = x_d2
        self.x_d1 = x_d1
        self.A = A

    def _get_laws(self, s: SimpleNamespace) -> list[BaseLaw]:
        """Return the third derivative of the position.

        Args:
            s:
                The namespace of the symbols the laws can use.

        Returns:
            laws:
                The laws of the element.
        """
        return [RateLaw(s.x, -s.A * derivative(s.x, 2) - derivative(s.x, 1) + abs_symbolic(s.x) - 1)]

Equations

jerk.x: diff(x_jerk(t), t, t, t) == -A_jerk*diff(x_jerk(t), t, t) + abs(x_jerk(t)) - diff(x_jerk(t), t) - 1