| |
 |
|
|
Science Forum Index » Math - Symbolic Forum » Is this a possible Maxima bug or user error?...
Page 2 of 2 Goto page Previous 1, 2
|
| Author |
Message |
| pnachtwey... |
Posted: Mon Jun 23, 2008 3:29 pm |
|
|
|
Guest
|
On Jun 23, 4:05 pm, Jim <J... at (no spam) j.eu> wrote:
Quote: Mon, 23 Jun 2008 23:02:21 +0000, Jim:
Ac: matrix([0,1,0],[0,0,1],[0,-w^2,-2*z*w]);
And you need to plug your time evolution, right?
mat_function(exp,Ac*t);
matrix([1,((2*sqrt(z-1)*z*sqrt(z+1)+2*z^2-1)*%e^(t*w*sqrt(z^2-1)-t*w*z))/
(sqrt(z^2-1)*(4*w*z^2-2*w)-4*w*sqrt(z-1)*z^2*sqrt(z+1))+((2*sqrt(z-1)
*z*sqrt(z+1)-2*z^2+1)*%e^(-t*w*sqrt(z^2-1)-t*w*z))/(sqrt(z^2-1)*
(4*w*z^2-2*w)-4*w*sqrt(z-1)*z^2*sqrt(z+1))-(2*sqrt(z-1)*z*sqrt(z+1))/(sqrt
(z^2-1)*(2*w*z^2-w)-2*w*sqrt(z-1)*z^2*sqrt(z+1)),((sqrt(z^2-1)+z)*%e^
(t*w*sqrt(z^2-1)-t*w*z))/(sqrt(z^2-1)*(4*w^2*z^2-2*w^2)-4*w^2*sqrt(z-1)
*z^2*sqrt(z+1))+((sqrt(z^2-1)-z)*%e^(-t*w*sqrt(z^2-1)-t*w*z))/(sqrt(z^2-1)*
(4*w^2*z^2-2*w^2)-4*w^2*sqrt(z-1)*z^2*sqrt(z+1))-sqrt(z^2-1)/(sqrt(z^2-1)*
(2*w^2*z^2-w^2)-2*w^2*sqrt(z-1)*z^2*sqrt(z+1))],[0,((2*sqrt(z-1)*z*sqrt(z
+1)+2*z^2-1)*(w*sqrt(z^2-1)-w*z)*%e^(t*w*sqrt(z^2-1)-t*w*z))/(sqrt(z^2-1)*
(4*w*z^2-2*w)-4*w*sqrt(z-1)*z^2*sqrt(z+1))+((2*sqrt(z-1)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ning only I didn't do the grind(). I do find
the results interesting in that there are no sine or cosine functions
like I get using the Laplace transform method. It does look like I
must calculate two square roots but that should be easy and safe. You
can see that the there are many repeated terms that only need to be
calculated once. Now I must compare this to the answer I get from use
the Laplace transforms.
I rarely need to go beyond 3x3. Larger matrices would be necessary if
I identify more complex systems with more poles and zeros. I am
beginning to wonder if this whole approach is wrong and the simulators
should be redone using RK4.
I am just trying to see where the practical limits are.
Peter Nachtwey
Peter Nachtwey |
|
|
| Back to top |
|
| Robert Dodier... |
Posted: Tue Jun 24, 2008 7:12 am |
|
|
|
Guest
|
On Jun 23, 3:56 pm, pnachtwey <pnacht... at (no spam) gmail.com> wrote:
Quote: There seem to be a couple of problems. First, Maxima asks
me a question for which I must type an answer.
Is there a way of have a default answer for the question
since it is the same each time?
Maybe "assume" and "forget" are helpful here.
FWIW
Robert Dodier |
|
|
| Back to top |
|
| pnachtwey... |
Posted: Wed Jun 25, 2008 9:37 am |
|
|
|
Guest
|
On Jun 24, 10:12 am, Robert Dodier <robert.dod... at (no spam) gmail.com> wrote:
Quote: On Jun 23, 3:56 pm, pnachtwey <pnacht... at (no spam) gmail.com> wrote:
There seem to be a couple of problems. First, Maxima asks
me a question for which I must type an answer.
Is there a way of have a default answer for the question
since it is the same each time?
Maybe "assume" and "forget" are helpful here.
FWIW
Robert Dodier
Thanks, that was most helpful
Peter Nachtwey |
|
|
| Back to top |
|
| |
Page 2 of 2 Goto page Previous 1, 2
All times are GMT - 5 Hours
The time now is Fri Dec 05, 2008 9:55 am
|
|