Subject: How to solve ODEs with imaginary eigenvalues?
From: James Frye
Date: Tue, 8 Apr 2003 14:28:21 -0700 (PDT)
On Tue, 8 Apr 2003, Stavros Macrakis wrote:
> I am no expert on differential equations, but...
> -- Doesn't the eigenvector technique only work for *linear* differential
> equations? The I^3 term is not linear....
Nor am I. The problem is for a class I'm taking. (The text is "Mathematical
Modeling" by Meerschaert - problem 6-16) Part of the problem is to take the
nonlinear system given by the equations
L: 1$
K: 1/5;
f1 : (-I^3 - 4 * I - V) / L$
f2 : I / K$
and get the corresponding linear system by evaluation at V = I = 0. That's
what the lines
Amat: matrix ([diff (f1, I), diff (f1, V)], [diff (f2, I), diff (f2, V)])$
Bmat: Amat, I:0, V:0$
should do, I think. Then I call
evals: eigenvalues (Bmat);
to get the eigenvalues of the linear system, and the solution to that should
be:
soln: A * exp (t * (evals [1][1])) + B * exp (t * (evals [1][2]));
{ ?t -?t}
This is ok for K > 1/4, where the solutions are real {A E + B E },
where the ? are some real numbers. But for K < 1/4, I get complex eigenvalues.
Applying demoivre (and I wonder where that name comes from?) gives
-2t -2t
B %E (%I SIN(t) + COS(t)) + A %E (COS(t) - %I SIN(t))
so I think from here (that DE course was a LONG time ago!) I take the
real & imaginary parts, to get the general solution. But I don't know
how to get Maxima to do that, and indeed am not real sure how I would do
it by hand: that DE course was a LONG time ago! Any hints would be welcome.
This example seems pretty simple: maybe it could be cleaned up a bit and
the nonlinear term removed, and used in the documentation as a "how to
solve system of linear ODEs" example?
> -- What do you mean "Maxima uses C for its own purposes"? Are you
> thinking of the %C that Maxima uses for introducing "arbitrary
> constants"? %C is not the same as C.
I was thinking of the Cn used as prompt strings. Maybe just a plain C wouldn't
conflict, but why chance it?
James