Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

solving 8-dimensional ODE-System - error

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123021] solving 8-dimensional ODE-System - error
  • From: Xage <p.wirthumer at gmx.at>
  • Date: Mon, 21 Nov 2011 04:25:07 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Dear readers,

I'm trying to analyse a big system in mathematica but when trying to use "NDSolve", i always get various errors. I tried many ways but no solution. Please help me on that.

Here's my code:


(*Definition der DE*)
Q = Exp[-S]
Q' = D[Q, S]

Ndot[Nu_, S_, k_, h_, c_, l_, e_, n_] = (n - d)*Nu;
Sdot[Nu_, S_, k_, h_, c_, l_, e_, n_] = Nu*e - \[Delta]*S;
hdot[Nu_, S_, k_, h_, c_, l_, e_, n_] = \[Psi]*(1 - l - \[Phi]*n)*h;
kdot [Nu_, S_, k_, h_, c_, l_, e_, n_] = f - c - (n - d)*k;
f = k^Subscript[\[Alpha], 1] (l*h)^Subscript[\[Alpha], 2] e^
   Subscript[\[Alpha], 3] ;
fk = D[f, k];

cdot[Nu_, S_, k_, h_, c_, l_, e_, n_] = c*(fk - \[Rho] - (n - d))
ldot[Nu_, S_, k_, h_, c_, l_, e_, n_] = 
  l*(-(1 - Subscript[\[Alpha], 3])*A - Subscript[\[Alpha], 3]*B + 
      Subscript[\[Alpha], 1] kdot[Nu, S, k, h, c, l, e, n]/k + 
      Subscript[\[Alpha], 2] hdot[Nu, S, k, h, c, l, e, n]/h - 
      cdot[Nu, S, k, h, c, l, e, n]/c)/(1 - Subscript[\[Alpha], 2] - 
      Subscript[\[Alpha], 3]);
edot[Nu_, S_, k_, h_, c_, l_, e_, n_] = 
  e*(-Subscript[\[Alpha], 2]*A - (1 - Subscript[\[Alpha], 2])*B + 
      Subscript[\[Alpha], 1] kdot[Nu, S, k, h, c, l, e, n]/k + 
      Subscript[\[Alpha], 2] hdot[Nu, S, k, h, c, l, e, n]/h - 
      cdot[Nu, S, k, h, c, l, e, n]/c)/(1 - Subscript[\[Alpha], 2] - 
      Subscript[\[Alpha], 3]) ;
ndot[Nu_, S_, k_, h_, c_, l_, e_, 
   n_] = - n*(\[Rho] + 
     n/v (\[Omega] - \[Phi]*\[Psi]*\[Eta] - 1 + 
        f/c (1 - Subscript[\[Alpha], 
           1] - \[Phi]*\[Psi]*Subscript[\[Alpha], 2] - 
           Subscript[\[Alpha], 3])));
A = \[Rho] - \[Psi]*l - \[Psi]*\[Eta]*c*l/(Subscript[\[Alpha], 2]*f);
B = \[Rho] + \[Delta] + (n - d) + \[Sigma]*Nu*e*Q'*
    c/(Subscript[\[Alpha], 3]*Q*f);
(*Solve it!*)
param = {\[Rho] -> 0.1, \[Delta] -> 0.1, d -> 0.04, 
  Subscript[\[Alpha], 1] -> 0.3, Subscript[\[Alpha], 2] -> 0.3, 
  Subscript[\[Alpha], 3] -> 0.05, \[Nu] -> 0.1, \[Omega] -> 
   0.1, \[Sigma] -> 0.1}

diffequ[Nu0_, S0_, k0_, h0_, c0_, l0_, e0_, n0_]  =
  {Nu'[t] == Ndot[Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]],
     S'[t] == Sdot[Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]],
     h'[t] == hdot[Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]],
     k'[t] == kdot[Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]],
     c'[t] == cdot[Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]],
     l'[t] == ldot[Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]],
     e'[t] == edot[Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]],
     n'[t] == ndot[Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]],
     Nu[0] == Nu0, S[0] == S0, k[0] == k0, h[0] == h0, c[0] == c0, 
     l[0] == l0, e[0] == e0, n[0] == n0
     } /. param // Together;
var = {Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]};

NDSolve[diffequ[.5, .5, .5, .5, .5, .5, .5, .5] /. param, var, {t, 0, 
  1}]


I'm looking forward to a solution!

Kind regards
Peter



  • Prev by Date: Re: special character size
  • Next by Date: Re: What is the point of having Initializations in DynamicModule and Manipulate?
  • Previous by thread: minimization a matrix
  • Next by thread: Re: solving 8-dimensional ODE-System - error