Re: Linear Differential Equations with Matrices
- To: mathgroup at smc.vnet.net
- Subject: [mg59461] Re: [mg59413] Linear Differential Equations with Matrices
- From: Selwyn Hollis <sh2.7183 at earthlink.net>
- Date: Wed, 10 Aug 2005 02:56:53 -0400 (EDT)
- References: <200508090730.DAA19044@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On Aug 9, 2005, at 3:30 AM, David Boily wrote: > How can I solve this system with mathematica: > > <<LinearAlgebra`MatrixManipulation` > > A = {{-F1, 0, 0}, {0, -F2, 0}, {1, -1, 0}} > Q = {{0, 0, 0}, {0, 0, 0}, {0, 0, 1}} > Z = ZeroMatrix[3] > > DSolve[{P'[t] + Transpose[A].P[t] + P[t].A + Q == Z, R'[t] + > Transpose[A].R[t] + P[t] == Z, P[T]==Z, R[T]==Z}, {P, R}, t] > > where P and R are 3x3 matrix functions of t. Mathematica tells me: > > Solve::eqf: {{-F1, 0, 1}, <<2>>} . R[t] + <<2>> == {{0, <<2>>}, <<2>>} > is not a well-formed equation. > > shouldn't this be possible without going the long way and defining > > P[t_]:={{p11[t], p12[t], p13[t]}, {p21[t], p22[t], p23[t]}, {p31 > [t],p32[t], p33[t]}} > R[t_]:={{r11[t], r12[t], r13[t]}, {r21[t], r22[t], r23[t]}, {r31 > [t],r32[t], r33[t]}} > > Thanks, > > David Boily > Centre for Intelligent Machines > McGill University > Montreal, Quebec > It would be nice, but unless I'm mistaken the only way to do it is to provide DSolve with a flat list of scalar equations. Anyhow, the following does the trick: << "LinearAlgebra`MatrixManipulation`" A = {{-F1, 0, 0}, {0, -F2, 0}, {1, -1, 0}}; Q = {{0, 0, 0}, {0, 0, 0}, {0, 0, 1}}; Z = ZeroMatrix[3]; P[t_] := {{p11[t], p12[t], p13[t]}, {p21[t], p22[t], p23[t]}, {p31 [t], p32[t], p33[t]}} R[t_] := {{r11[t], r12[t], r13[t]}, {r21[t], r22[t], r23[t]}, {r31 [t], r32[t], r33[t]}} deqns = Flatten[ Thread /@ Flatten[ Thread /@ {P'[t] + Transpose[A].P[t] + P[t].A + Q == Z, R'[t] + Transpose[A].R[t] + P[t] == Z, P[T] == Z, R[T] == Z} ] ]; vars = Flatten[{P[t], R[t]}]; solnrules = DSolve[deqns, vars, t]//First//Simplify MatrixForm[ Psoln = P[t] /. solnrules ] MatrixForm[ Rsoln = R[t] /. solnrules ] ---------------------- Selwyn Hollis http://www.appliedsymbols.com
- Follow-Ups:
- Re: Re: Linear Differential Equations with Matrices
- From: Chris Chiasson <chris.chiasson@gmail.com>
- Re: Re: Linear Differential Equations with Matrices
- References:
- Linear Differential Equations with Matrices
- From: David Boily <dsboily@fastmail.ca>
- Linear Differential Equations with Matrices