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

MathGroup Archive 2008

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

Search the Archive

NDSolve and vector functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87843] NDSolve and vector functions
  • From: dh <dh at metrohm.ch>
  • Date: Fri, 18 Apr 2008 07:10:05 -0400 (EDT)


Hello all,

does anybody know a way to compute a vector valued function using 

NDSolve without explicitely specifying all vector components. Here is a 

simple example: Although NDSolve[{p'[t]==p[t],p[0]=={1,0}},p,{t,0,1}] works,

NDSolve[{p'[t]==p[t]+{1,1},p[0]=={1,0}},p,{t,0,1}]

does not work because p[t] in "p[t]+{1,1}"  is treated as a scalar and 

the expression is evaluated to {1+p[t],1+p[t]} what is clearly not 

intended. Even in "IdentityMatrix[2].p[t]+{1,1}" 

"IdentityMatrix[2].p[t]" is treated like a scalar and added to the 

components of {1,1}.

do I miss something???

Daniel




  • Prev by Date: Re: Why isn't Expand[] grouping terms by order?
  • Next by Date: Re: Why isn't Expand[] grouping terms by order?
  • Previous by thread: Re: Defining derivatives
  • Next by thread: Re: NDSolve and vector functions