Solving a differential system with mathematica 8

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 5K views
Nesrine
Messages
8
Reaction score
0
I need to solve a differential system with mathematica that is presented like this :


eqns = {
X1'[t] ==
A[[1]][[1]] X1[t] + A[[1]][[2]] X2[t] + A[[1]][[3]] X3[t] +
A[[1]][[4]] X4[t] + A[[1]][[5]] X5[t] + A[[1]][[6]] X6[t],
X2'[t] ==
A[[2]][[1]] X1[t] + A[[2]][[2]] X2[t] + A[[2]][[3]] X3[t] +
A[[2]][[4]] X4[t] + A[[2]][[5]] X5[t] + A[[2]][[6]] X6[t],
X3'[t] ==
A[[3]][[1]] X1[t] + A[[3]][[2]] X2[t] + A[[3]][[3]] X3[t] +
A[[3]][[4]] X4[t] + A[[3]][[5]] X5[t] + A[[3]][[6]] X6[t],
X4'[t] ==
A[[4]][[1]] X1[t] + A[[4]][[2]] X2[t] + A[[4]][[3]] X3[t] +
A[[4]][[4]] X4[t] + A[[4]][[5]] X5[t] + A[[4]][[6]] X6[t],
X5'[t] ==
A[[5]][[1]] X1[t] + A[[5]][[2]] X2[t] + A[[5]][[3]] X3[t] +
A[[5]][[4]] X4[t] + A[[5]][[5]] X5[t] + A[[5]][[6]] X6[t],
X6'[t] ==
A[[6]][[1]] X1[t] + A[[6]][[2]] X2[t] + A[[6]][[3]] X3[t] +
A[[6]][[4]] X4[t] + A[[6]][[5]] X5[t] + A[[6]][[6]] X6[t]};


The elements of my matrix A have been already calculated
I used the function NDSolve as follow :

sol = NDSolve[{eqns,
X1[0] == X2[0] == X3[0] == X4[0] == X5[0] ==
X6[0] == {1, 1, 1, 1, 1, 1}}, {X1, X2, X3, X4, X5, X6}, {t, 0,
T}, MaxSteps -> \[Infinity]]

but it only gives me an interpolatingfunction value , or me I need the expression in function of time t of my 6 solutions so that I can use them later for my program.

Can you help me please ??

Thanks a lot
 
on Phys.org
NDSolve is the *Numerical* differential equation solver and is going to give you a *numerical* result. If you need a closed form algebraic solution you are going to need to find a way to coax DSolve into to solve your problem.
 
Thanks for your answer I used NDSolve actually and I'm trying to simulate my program with it but I know that I can use Runge Kutta to resolve such problem the thing is that I don't know if there is in mathematica a function that allow me to do a 4th order runge kutta integration
 
Thank you very much Bill I'll try with the reference you gave it to me

I'll keep you posted

:))