MathGroup Archive 2001

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

Search the Archive

Re: desperate, please help.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27366] Re: desperate, please help.
  • From: Bernd Brandt <bernd at bio.vu.nl>
  • Date: Thu, 22 Feb 2001 02:25:10 -0500 (EST)
  • Organization: VU Biology, Amsterdam, The Netherlands
  • References: <97003k$tq@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

You have several functions defined in the NDSolve body.
Mathematica does not know T is a function of x unless you tell this.
I have defined all the functions outside the body, introduced functions.
For instance Exp (x) is written Exp[x]. I thinkthis is what you meant to do:


T[x_] := 330 + 43.3*x
F = .9*163; c = 9.3;
k[x_] := 31.1Exp[(7906*(T[x] - 360)/(T[x]*360))]
r[x_] := -k[x]*c*(1 - (1 + 1/K[x])*x)
K[x_] := 3.03*Exp[(-830.3*((T[x] - 333)/(T[x]*333)))]
NDSolve[{v'[x] == -F÷r[x], v[0] == 0}, {v}, {x, 0, .7}]

{{v -> InterpolatingFunction[{{0., 0.7}}, "<>"]}}


Regards,
Bernd

Thjqase wrote:

> I need help numerically solving a differential equation coupled with several
> algebraic equations. New to Mathematica. Here's code:
>
> NDSolve[{v'[x] == -F÷r, T[x] == 330 + 43.3*x, F = .9*163, C == 9.3,
>     k[x] == 31.1Exp(7906*(T - 360)/(T*360))
>     , K[x] == 3.03*Exp(-830.3*((T - 333)/(T*333))),
>     r[x] == -k*C*(1 - (1 + 1/K)*x),
>     v[0] == 0}, {v}
>   , {x, 0, .7}]
>
> Error code is:
>
> NDSolve::"deql": "The first argument must have both an equation and an \
> initial condition."
>
> Any suggestions? What am I doing wrong? My head is sore from banging it against
> the wall.
>
> TIA.



  • Prev by Date: Re: PALETTE
  • Next by Date: Re: desperate, please help.
  • Previous by thread: Re: desperate, please help.
  • Next by thread: Re: desperate, please help.