Solving a differential system with mathematica 8

In summary, DSolve is a numerical differential equation solver that can give you a numerical result. You will need to find a way to coax it into solving your problem. Thanks for your answer, I used DSolve actually and I'm trying to simulate my program with it.
  • #1
Nesrine
9
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
  • #2
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.
 
  • #3
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
 
  • #4
  • #5
Thank you very much Bill I'll try with the reference you gave it to me

I'll keep you posted

:))
 

Related to Solving a differential system with mathematica 8

1. How do I solve a differential system using Mathematica 8?

To solve a differential system using Mathematica 8, you can use the function DSolve. This function takes in the differential equations, initial conditions, and variables as input and returns the general solution in the form of a list of rules.

2. Can I solve a differential system with boundary conditions using Mathematica 8?

Yes, you can solve a differential system with boundary conditions using Mathematica 8 by using the function NDSolve. This function takes in the differential equations, boundary conditions, and variables as input and returns the numerical solution in the form of interpolating functions.

3. How can I plot the solution of a differential system using Mathematica 8?

To plot the solution of a differential system using Mathematica 8, you can use the function Plot or ParametricPlot. These functions take in the interpolating functions obtained from NDSolve as input and plot the solution over a specified range of values.

4. Is it possible to solve a system of partial differential equations with Mathematica 8?

Yes, it is possible to solve a system of partial differential equations using Mathematica 8 by using the function DSolve or NDSolve. However, the solution may not always be feasible or computationally efficient.

5. Can I use Mathematica 8 to solve a system of differential equations with varying coefficients?

Yes, you can use Mathematica 8 to solve a system of differential equations with varying coefficients by using the function ParametricNDSolve. This function allows you to specify the coefficients as parameters and obtain a family of solutions for different values of the parameters.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • Quantum Physics
Replies
3
Views
295
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
844
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
152
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
88
Back
Top