mathematica 求一到一元微分学的题

1个回答

  • 在输入方程之后,提示

    Input is not an ordinary differential equation

    那么,是不是意味着这个方程mathematica不能直接求出数值解,需要自行编写求解程序呢?

    另问,mathematica能直接用 NDSolve[]函数 求解的偏微分方程组是不是很有限呢?

    [Omega] := 1;

    B := 10;

    A := 0.1;

    x0 := -1;

    x1 := 0;

    y0 := 0;

    y1 := 0;

    s = NDSolve[{-3 [Omega]^2 x[t] + (

    2 [Omega] y[t] Derivative[1][R][t])/R[t] -

    2 [Omega] Derivative[1][y][t] + (

    2 x[t] (R^[Prime][Prime])[t])/R[t] + (x^[Prime][Prime])[t] ==

    0, 2 [Omega] Derivative[1][x][t] - (

    y[t] (R^[Prime][Prime])[t])/R[t] + (y^[Prime][Prime])[t] ==

    0, -B + R[t] - A Sin[t [Omega]] == 0, x

    [0] == x0, x'[0] == x1, y[0] == y0, y'[0] == y1}, {x, y}, {t, 0,

    10}]

    [Omega] := 1;B := 10;A := 1/10;x0 := -1;x1 := 0;y0 := 0;y1 := 0;s = NDSolve[{-3 [Omega]^2 x[t] + (2 [Omega] y[t] R'[t])/R[t] - 2 [Omega] y'[t] + (2 x[t] R''[t])/R[t] + x''[t] == 0, 2 [Omega] x'[t] - (y[t] R''[t])/R[t] + y''[t] == 0, x[0] == x0, x'[0] == x1, y[0] == y0, y'[0] == y1} /. R -> (B + A Sin[# [Omega]] &), {x, y}, {t, 0, 10}]

    关键就是把那个代数方程给代入进去,而不是全交给NDSolve求解.如果要交给NDSolve去求,在语法上应该要在第二个参数处(也就是{x, y}这里)加上个R,不过这样依旧不可求,这应该算是NDSolve在微分代数方程上还不够完善的一个地方吧