Re: solving 8-dimensional ODE-System - error

• To: mathgroup at smc.vnet.net
• Subject: [mg123059] Re: solving 8-dimensional ODE-System - error
• From: DrMajorBob <btreat1 at austin.rr.com>
• Date: Tue, 22 Nov 2011 05:34:17 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201111210925.EAA14641@smc.vnet.net>

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

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 at gmx.at> wrote:

>
> 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
>
> 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 at yahoo.com

```

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