# [Maxima] desolve cannot solve some differential equations that ode2 can?

Jaime Villate villate at fe.up.pt
Wed Nov 14 19:33:33 CST 2007

```On Wed, 2007-11-14 at 15:05 -0800, novakyu wrote:
> eqn1: %i * 'diff(a(t),t) = exp(%i * d * t) * b(t);
> eqn2: %i * 'diff(b(t),t) = exp(-%i * d * t) * a(t);

> (%i27) desolve([eqn1, eqn2],[a(t),b(t)]);
>
> `algsys' cannot solve - system too complicated.
> `desolve' can't handle this case.

desolve finds the Laplace transform of each equation and, only in the
simple cases when the resulting system is an algebraic system, it solves
it.
ode2 solves various different types of first and second order
differential equations.
desolve does not know how to simplify your system with a simple
substitution such as c(t)=exp(%i*d*t)*b(t). If you give it some help, it

(%i24) eqn1: %i * 'diff(a(t),t) = exp(%i * d * t) * b(t)\$
(%i25) eqn2: %i * 'diff(b(t),t) = exp(-%i * d * t) * a(t)\$
(%i26) eqn1, b(t)=exp(-%i * d * t)*c(t);
(%o26) %i*'diff(a(t),t,1) = c(t)
(%i27) eqn2, b(t)=exp(-%i * d * t)*c(t), diff, ratsimp;
(%o27) %e^-(%i*d*t)*(%i*'diff(c(t),t,1)+d*c(t)) = %e^-(%i*d*t)*a(t)
(%i28) %*exp(%i * d * t);
(%o28) %i*'diff(c(t),t,1)+d*c(t) = a(t)
(%i29) desolve([%o26,%o28],[a(t),c(t)]);
(%o29) [a(t) = %e^(%i*d*t/2)*((2*(-%i*a(0)*d-%i*c(0))+%i*a(0)*d)
*sin(sqrt(d^2+4)*t/2)
/sqrt(d^2+4)
+a(0)*cos(sqrt(d^2+4)*t/2)),
c(t) = %e^(%i*d*t/2)*((%i*c(0)*d-2*%i*a(0))*sin(sqrt(d^2+4)*t/2)
/sqrt(d^2+4)
+c(0)*cos(sqrt(d^2+4)*t/2))]

Regards,
Jaime Villate

```