跳转到内容

This page is also in English.

Read it in English

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

Léela en español

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

日本語で読む

求解微分方程(Solve differential equations,solve_ode)

求解微分方程或方程组,可附带初始条件。

也可以写作 solve_pde。

使用这个函数时,求解器只要找到步骤就会展示。

怎么写

solve_ode(equations, unknown, variable)

求关于该变量的未知函数。

equations
方程,或包含初始条件(如 y(0) = 1)的列表。接受一个方程或放在方括号中的方程列表。
unknown
要求解的未知数,例如 y。接受一个变量或变量列表。
variable
要处理的变量,是一个名称,例如 x。接受一个变量或变量列表。

示例

  • 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)

    在求解器中,solve_ode(y'(x) = y(x), y, x) 的结果是 [[y(x) -> C(1)*e^x]]。

    在求解器中打开
  • {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)

    在求解器中,solve_ode([y'(x) = y(x), y(0) = 1], y, x) 的结果是 [[y(x) -> e^x]]。

    在求解器中打开
  • 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)

    在求解器中,solve_ode(y''(x) + y(x) = 0, y, x) 的结果是 [[y(x) -> C(1)*cos(x) + C(2)*sin(x)]]。

    在求解器中打开