Maxima: Transforming solutions obtained by linsolve.
Subject: Maxima: Transforming solutions obtained by linsolve.
From: Constantine Frangos
Date: Sat, 17 Nov 2007 11:45:18 +0200
I am using linsolve() for the solution of linear equations. For example:
(%i513) ysol : linsolve([a11*x1+a12*x2+a13*x3],[x1,x2,x3]);
(%o513) [x1 = -(%r1*a13+%r2*a12)/a11,x2 = %r2,x3 = %r1]
(%i514)
I want to transform the obtained solution to the following form:
xsol = A . r
where r = matrix([%r1],[%r2])
and A = matrix([-a13/a11,-a12/a11],[0,1],[1,0])
Its not clear how to construct or extract the matrix A (and the matrix r)
from the list ysol.
I could not extract the %r1 and %r2 as these seem to be different each time
linsolve() is called, eg %r3, %r4, etc
Any assistance would be appreciated.
TIA
C. Frangos.