Subject: Solving matrix equations, unkowns in both vectors
From: Andrew Dyer
Date: Wed, 9 Jan 2013 18:14:34 +0000
Gday
I'm trying to use Maxima to solve pretty easy matrix equations while I study FEA.
I typically end up with a matrix equation that needs solving, like this
[square matrix].[column vector]=[column vector]
where both column vectors contain unknowns.
An example would be
K: matrix([1/2,-1/2,0],[-1/2,3/4,-1/4],[0,-1/4,1/4]);
u: matrix([700],[t2],[t3])
U: matrix([q],[-50],[-50])
K.u=U
find q, t2 & t3
The equations are solvable, but I cannot find a convenient way to input the problem into maxima.
The only way I can get it to work is by performing K.u to produce a column vector and then to MANUALLY combine the contents with that contained in column vector U to produce a set of simultaneous equations which solve() or linsolve() can handle. This is very tedious and makes solving large problems impractical.
I cannot use linsolve_by_lu() because the variables are spread across both vectors. (You could always just do something like A.B=C, C=invert(A).B anyway, instead of using linsolve_by_lu() right?)
Is there a way maxima can solve a problem like this directly or at least automatically convert the problem into a format suitable for solve() or linsolve()?
I can't see an easy way to do it with the list operations I know. I'm not sure if I'm just missing something obvious.
Thanks in advance
Andy
University of Wollongong