Mathematica Solving a differential system with mathematica 8

AI Thread Summary
The discussion revolves around solving a system of differential equations using Mathematica. The user has defined a set of equations and attempted to solve them with NDSolve, which provides numerical solutions but not the explicit algebraic expressions needed for further use. They express a desire for a closed-form solution and inquire about the possibility of implementing a fourth-order Runge-Kutta method within Mathematica. Respondents clarify that NDSolve is primarily for numerical results and suggest exploring DSolve for algebraic solutions. Additionally, references to Mathematica's documentation on Runge-Kutta methods are provided to assist the user in their implementation. The user expresses gratitude and plans to follow up on the suggestions.
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
 
Physics news 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

:))
 

Similar threads

Replies
2
Views
2K
Replies
3
Views
3K
Replies
2
Views
205
Replies
0
Views
143
Replies
1
Views
3K
Replies
1
Views
4K
Replies
4
Views
1K
Replies
5
Views
3K
Replies
3
Views
1K
Back
Top