Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6607

Re: solving 8-dimensional ODE-System - error

From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: solving 8-dimensional ODE-System - error
Date 2011-11-22 10:38 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jafu3a$rn2$1@smc.vnet.net> (permalink)
References <201111210925.EAA14641@smc.vnet.net>

Show all headers | View raw


The error message says the function e appears with no arguments.

And that's true... in your definition of f, fk, cdot, ldot, edot, ndot,  
and B. So fix it.

You have functions that DO have arguments but don't depend on them, too.  
For instance,

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])))

-n (\[Rho] + (
    n (-1 - \[Eta] \[Phi] \[Psi] + \[Omega] + (
       e^Subscript[\[Alpha], 3] k^Subscript[\[Alpha], 1] (h l)^
        Subscript[\[Alpha],
        2] (1 - Subscript[\[Alpha],
          1] - \[Phi] \[Psi] Subscript[\[Alpha], 2] -
          Subscript[\[Alpha], 3]))/c))/v)

doesn't depend on Nu, S, k, l, or e. It does depend on n and c, but you've  
made it difficult to tell.

Because of this, your mention of ndot in "diffequ":

ndot[Nu[t], S[t], k[t], h[t], c[t], l[t], e[t], n[t]]

makes no sense. It looks as if t matters in several positions where it  
actually doesn't.

Bobby

On Mon, 21 Nov 2011 03:25:07 -0600, Xage <p.wirthumer@gmx.at> wrote:

> 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
>


-- 
DrMajorBob@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: solving 8-dimensional ODE-System  - error DrMajorBob <btreat1@austin.rr.com> - 2011-11-22 10:38 +0000

csiph-web