
ode - ordinary differential equations

Calling sequence:
ode(eq, y(x))
ode(sys, unks)

Parameters:
eq     --  equation or expression
y, x   --  indeterminates
sys    --  set of equations
unks   --  set of unknown functions

Summary:

ode(eq,y(x)) creates the ordinary differential equation defined by the equation
eq, or eq=0 if eq is an expression, with respect to the function y of the variable
x. Similarly, ode(sys, unks) creates a system of equations.

An ordinary differential equation (or a system) created by ode is a element of
the domain ode. It can then be solved with the command solve. The output
of solve is a list of solutions, where each solution is an expression in the case
of one single equation, or a list of assignments for the unknown functions
in the case of a system of equations. Initial conditions can be added in the

set sys using the differential operator D, for example f(1)=2, D(f)(0)=0,
D(D(f))(0)=1.

>>  loadlib("ode");ode(x^2*diff(y(x),x)+3*x*y(x)=sin(x)/x,y(x));

              /           2               sin(x)      \
          ode - 3 x y(x) + x  diff(y(x), x) = ------, y(x) -
              \                             x         /

>>  solve(%);

                    --     - 3    - 3       --
                    -  C1 x    - x    cos(x)  -
                    --                    --

>>  ode({diff(f(t),t,t)+4*f(t)=sin(2*t),f(0)=0,D(f)(0)=0},f(t)):
    solve(%);

                    -- sin(2 t)   t cos(2 t) --
                    -  -------- - ----------  -
                    --    8          4     --

>>  sys := {diff(x(t),t)-x(t)+y(t)=0,diff(y(t),t)-x(t)-y(t)=0}:
    solve(ode(sys, {x(t),y(t)}));

      [[x(t) = (I) C4 exp((1 + I) t) + (- I) C5 exp((1 - I) t), y

            (t) = C4 exp((1 + I) t) + C5 exp((1 - I) t)]]

See also:  D, solve

