Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Solve differential equations (solve_ode)

Solve a differential equation, or a system, with optional initial conditions.

Also written solve_pde.

With this function, the solver shows the steps whenever it finds them.

How to write it

solve_ode(equations, unknown, variable)

Solve for the unknown function of the variable.

equations
The equation, or a list that includes initial conditions such as y(0) = 1. Takes an equation, or a list of equations in brackets.
unknown
The unknown to solve for, such as y. Takes a variable, or a list of variables.
variable
The variable to work with, a name such as x. Takes a variable, or a list of variables.

Examples

  • y′(x)=y(x)⇒y(x)=C1ex\displaystyle y'(x) = y(x) \Rightarrow y(x) = C_{1} e^{x}
    solve_ode(y'(x) = y(x), y, x)

    In the solver, solve_ode(y'(x) = y(x), y, x) gives [[y(x) -> C(1)*e^x]].

    Open in the solver
  • {y′(x)=y(x)y(0)=1⇒y(x)=ex\displaystyle \begin{cases} y'(x) = y(x) \\ y(0) = 1 \end{cases} \Rightarrow y(x) = e^{x}
    solve_ode([y'(x) = y(x), y(0) = 1], y, x)

    In the solver, solve_ode([y'(x) = y(x), y(0) = 1], y, x) gives [[y(x) -> e^x]].

    Open in the solver
  • y′′(x)+y(x)=0⇒y(x)=C1cos⁡(x)+C2sin⁡(x)\displaystyle y''(x)+y(x) = 0 \Rightarrow y(x) = C_{1} \cos(x)+C_{2} \sin(x)
    solve_ode(y''(x) + y(x) = 0, y, x)

    In the solver, solve_ode(y''(x) + y(x) = 0, y, x) gives [[y(x) -> C(1)*cos(x) + C(2)*sin(x)]].

    Open in the solver
  • solve_recurrence

    Solve a recurrence relation for a sequence.

  • recurrence_growth

    The order of growth of a divide-and-conquer recurrence, as big_theta of a simple function.