{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Explicit Runge-Kutta method of order 5(4)."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "n",
              "annotation": "int",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Number of equations."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "status",
              "annotation": "string",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Current status of the solver: 'running', 'finished' or 'failed'."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "t_bound",
              "annotation": "float",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Boundary time."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "direction",
              "annotation": "float",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Integration direction: +1 or -1."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "t",
              "annotation": "float",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Current time."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "y",
              "annotation": "ndarray",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Current state."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "t_old",
              "annotation": "float",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Previous time. None if no steps were made yet."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "step_size",
              "annotation": "float",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Size of the last successful step. None if no steps were made yet."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "nfev",
              "annotation": "int",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Number evaluations of the system's right-hand side."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "njev",
              "annotation": "int",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Number of evaluations of the Jacobian. Is always 0 for this solver as it does not use the Jacobian."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "nlu",
              "annotation": "int",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Number of LU decompositions. Is always 0 for this solver."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "fun",
              "annotation": "callable",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Right-hand side of the system. The calling signature is "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "fun(t, y)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Here "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "t"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is a scalar, and there are two options for the ndarray "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "y"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ": It can either have shape (n,); then "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "fun"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " must return array_like with shape (n,). Alternatively it can have shape (n, k); then "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "fun"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " must return an array_like with shape (n, k), i.e., each column corresponds to a single column in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "y"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". The choice between the two options is determined by "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "vectorized"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " argument (see below)."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "t0",
              "annotation": "float",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Initial time."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "y0",
              "annotation": "array_like, shape (n,)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Initial state."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "t_bound",
              "annotation": "float",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Boundary time - the integration won't continue beyond it. It also determines the direction of the integration."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "first_step",
              "annotation": "float or None, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Initial step size. Default is "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " which means that the algorithm should choose."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "max_step",
              "annotation": "float, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Maximum allowed step size. Default is np.inf, i.e., the step size is not bounded and determined solely by the solver."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "rtol, atol",
              "annotation": "float and array_like, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Relative and absolute tolerances. The solver keeps the local error estimates less than "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "atol + rtol * abs(y)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Here "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "rtol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " controls a relative accuracy (number of correct digits), while "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "atol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " controls absolute accuracy (number of correct decimal places). To achieve the desired "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "rtol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", set "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "atol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to be smaller than the smallest value that can be expected from "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "rtol * abs(y)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " so that "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "rtol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " dominates the allowable error. If "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "atol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is larger than "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "rtol * abs(y)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " the number of correct digits is not guaranteed. Conversely, to achieve the desired "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "atol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " set "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "rtol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " such that "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "rtol * abs(y)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is always smaller than "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "atol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". If components of y have different scales, it might be beneficial to set different "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "atol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " values for different components by passing array_like with shape (n,) for "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "atol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Default values are 1e-3 for "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "rtol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and 1e-6 for "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "atol"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "vectorized",
              "annotation": "bool, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Whether "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "fun"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is implemented in a vectorized fashion. Default is False."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This uses the Dormand-Prince pair of formulas "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". The error is controlled assuming accuracy of the fourth-order method accuracy, but steps are taken using the fifth-order accurate formula (local extrapolation is done). A quartic interpolation polynomial is used for the dense output "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "2"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Can be applied in the complex domain."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/scipy/integrate/_ivp/rk.py",
  "item_line": 293,
  "item_type": "class",
  "aliases": [
    "scipy.integrate.RK45"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "fun",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "t0",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "y0",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "t_bound",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "max_step",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "inf"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "rtol",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "0.001"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "atol",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "1e-06"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "vectorized",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "False"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "first_step",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "extraneous",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "VAR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "RK45"
  },
  "references": [
    ".. [1] J. R. Dormand, P. J. Prince, \"A family of embedded Runge-Kutta",
    "       formulae\", Journal of Computational and Applied Mathematics, Vol. 6,",
    "       No. 1, pp. 19-26, 1980.",
    ".. [2] L. W. Shampine, \"Some Practical Runge-Kutta Formulas\", Mathematics",
    "       of Computation,, Vol. 46, No. 173, pp. 135-150, 1986."
  ],
  "qa": "scipy.integrate._ivp.rk:RK45",
  "arbitrary": [],
  "local_refs": [
    "atol",
    "direction",
    "first_step",
    "fun",
    "max_step",
    "n",
    "nfev",
    "njev",
    "nlu",
    "rtol",
    "status",
    "step_size",
    "t",
    "t0",
    "t_bound",
    "t_old",
    "vectorized",
    "y",
    "y0"
  ]
}