Maxima linear system of 6 differential equations question
Subject: Maxima linear system of 6 differential equations question
From: wuko at onet.eu
Date: Sat, 03 Nov 2007 11:40:17 +0100
Hello !
I have a question regarding those equations I have previously been asking about. I have to solve linear system of 6 differential equations:
http://www.flickr.com/photos/16897263 at N04/1800786518/
http://www.flickr.com/photos/16897263 at N04/1799946697/
Can anyone tell me if I am doing it right ?
First I define known variables:
h[1] : 15;
h[2] : 310;
r : 2.15;
J[b] : 45;
Q[1] : 208;
Q[2] : 100;
T[m] : 335;
J[m] : 20;
l : 12.9;
g : 9.8665;
d : 3.80;
E : 90;
q : 120;
Then I put separately each of the differential functions:
f1 : -((E*%pi*d^2*r^2*g)/((h[2]+h[1])*4*(Q[1]+q*l)*r^2))*(fi[1]-fi[3])-((Q[1]+q*(h[2]+h[1]-r*fi[1]))*r*g)/((Q[1]+q*l)*r^2);
f2 : -((E*%pi*d^2*r^2*g)/(h[1]*4*(Q[2]+q*l)*r^2))*(fi[2]-fi[3])+((Q[2]+q*(h[1]-r*fi[2]))*r*g)/((Q[2]+q*l)*r^2);
f3 : -((E*%pi*d^2)/((h[2]+h[1])*4*(J[m]+J[b])))*r^2*(fi[3]-fi[1])-((E*%pi*d^2)/(h[1]*4*(J[m]+J[b])))*r^2*(fi[3]-fi[2])+T[m]/(J[m]+J[b]);
f4 : Omega[1];
f5 : Omega[2];
f6 : Omega[3];
Now, I load the dynamics package:
load("dynamics");
And then I can go with Runge Kutta method rk:
lnr: rk([f1,f2,f3,f4,f5,f6],[Omega[1],Omega[2],Omega[3],fi[1],fi[2],fi[3]],[0,0,0,0,0,0],[t,1,2,0.1]);
Is it a proper sequence to solve these kind of equations ? because sometimes I get weird results. Do I have to define the functions, so that the d*Omega[1]/dt is not the part of equation ? As seen on the Maxima's examples ? I mean that original equation no. 1 would look like this in Maxima:
f1 : ((Q[1]+q*l*r^2)/g)*diff(Omega[1],t)+((E*%pi*d^2)/((h[2]+h[1])*4))*(fi[1]-fi[3])*r^2 = -([Q[1]+q*((h[2]+h[1])-r*fi[1])])*r;
But after reading those examples I have changed it to this form:
f1 : -((E*%pi*d^2*r^2*g)/((h[2]+h[1])*4*(Q[1]+q*l)*r^2))*(fi[1]-fi[3])-((Q[1]+q*(h[2]+h[1]-r*fi[1]))*r*g)/((Q[1]+q*l)*r^2);
So d*Omega[1]/dt is on the left side of equation (and it's not written in Maxima) and the rest is on the right. Regarding equations no. 2-6 - I've changed them the same way.
Oh, one more thing:
why I get sometimes results like this:
[1,0,0,0,0,0,0],[2,0.0=0.0=(0.0=0.0)=(0.0=0.0=(0.0=0.0))=-405.2814=0.0... etc. where those = signs come from ?
Best regards,
Damian.