MathGroup Archive 2001

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

Search the Archive

Re: matrix diffential equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27517] Re: matrix diffential equations
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 3 Mar 2001 03:39:59 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <97l4gb$jjt@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

> Simple way to crash Mathematica is by writing
> y := Array[y, {3, 3}]
> Even Quit Kernel doesn't stop Mathematica, and I have experience application
> error and crashes (both in Mathematica dll and Mathematica.exe for simple
> programs) and in so cases Mathematica has to be closed from the Task Manager
> (Windows 2000). Regarding Mathematica exception coding, I'm not impressed,
> just IMHO.

If you code a recursion you have to live with the result.
My personal opinion is that Mathemtica should format
the hard drive in such a case and overheat the CPU.
This will teach clever users to *think* before they
use a computer algebra. 
A vector is typical not identical with it's components.

> 
> Just have to buss it out :-(
> 
> My question is the following: Is there a simple way to define matrix
> diffential equation in Mathematica, I have tried something like:
> A[t_]:= {{1,1,1},{1,1,1},{1,1,1}}*t
> y := Array[ytmp, {3, 3}]
> eqns = {y'[u] == A[u]. y[u], y[s] == A[s]}
> NDSolve[eqns, y, {u, s, t}]
> 
> But this is not the way.

Perhaps ?

yvec = Map[#[u] & , Array[y, {3, 3}], {2}]

eqns = Flatten [
    Thread /@ Flatten[
        Thread[#, List] & /@ 
         {D[yvec, u] == A[u].yvec, 
          (yvec /. u -> s) ==  A[s]}]]

NDSolve[eqns /. s -> 0, Flatten[yvec], {u, 0, 2}]


BTW is the SetDealyed[] in 

y := Array[ytmp, {3, 3}]

a habit or has it deeper reasons.

Regards
  Jens


  • Prev by Date: Re: Troubles saving as *.m
  • Next by Date: Re: matrix diffential equations
  • Previous by thread: matrix diffential equations
  • Next by thread: Re: matrix diffential equations