Maxima Function
desolve (eqn, x)
desolve([eqn_1,...,eqn_n],[x_1,...,x_n])
The function dsolve
solves systems of linear ordinary
differential equations using Laplace transform. Here the eqn's
are differential equations in the dependent variables x_1, ...,
x_n. The functional dependence of x_1, ..., x_n on an
independent variable, for instance x, must be explicitly indicated
in the variables and its derivatives. For example, this would not be the
correct way to define two equations:
The correct way would be:
eqn_1: 'diff(f(x),x,2) = sin(x) + 'diff(g(x),x); eqn_2: 'diff(f(x),x) + x^2 - f(x) = 2*'diff(g(x),x,2);
The call to the function desolve
would then be
desolve([eqn_1, eqn_2], [f(x),g(x)]);
If initial conditions at x=0
are known, they can be supplied before
calling desolve
by using atvalue
.
(%i1) <b><code class="literal">'diff(f(x),x)='diff(g(x),x)+sin(x);</code></b> d d (%o1) -- (f(x)) = -- (g(x)) + sin(x) dx dx (%i2) <b><code class="literal">'diff(g(x),x,2)='diff(f(x),x)-cos(x);</code></b> 2 d d (%o2) --- (g(x)) = -- (f(x)) - cos(x) 2 dx dx (%i3) <b><code class="literal">atvalue('diff(g(x),x),x=0,a);</code></b> (%o3) a (%i4) <b><code class="literal">atvalue(f(x),x=0,1);</code></b> (%o4) 1 (%i5) <b><code class="literal">desolve([%o1,%o2],[f(x),g(x)]);</code></b> x (%o5) [f(x) = a %e - a + 1, g(x) = x cos(x) + a %e - a + g(0) - 1] (%i6) <b><code class="literal">[%o1,%o2],%o5,diff;</code></b> x x x x (%o6) [a %e = a %e , a %e - cos(x) = a %e - cos(x)]
If desolve
cannot obtain a solution, it returns false
.