Question: How to solve a set equations in a matrix form?

Hello there, 

When I tried to solve a set of equations, represented in a matrix form, Maple complained. After the matrix form was decomposed to row by row and solve was attempted, Maple became happy. I wonder if I can solve the set of equations in a matrix form. 


 

Goal: solve this set of equations in terms of Xl12/Xl23/Xl13

X1 = 0.5 * ( Xl12 + Xl13 - Xl23 )
X2 = 0.5 * ( Xl12 + Xl23 - Xl13 )
X3 = 0.5 * ( Xl13 + Xl23 - Xl12 )

X:=<X1, X2, X3>;

Vector(3, {(1) = X1, (2) = X2, (3) = X3})

(1)

Xeq:= X = <1/2*(xl12 + xl13-xl23), 1/2*(xl12 + xl23-xl13), 1/2*(xl13 + xl23-xl12)>;

(Vector(3, {(1) = X1, (2) = X2, (3) = X3})) = (Vector(3, {(1) = (1/2)*xl12+(1/2)*xl13-(1/2)*xl23, (2) = (1/2)*xl12+(1/2)*xl23-(1/2)*xl13, (3) = (1/2)*xl13+(1/2)*xl23-(1/2)*xl12}))

(2)

solve(Xeq, {xl12, xl13, xl23});

Error, invalid input: solve expects its 1st argument, eqs, to be of type {`and`, `not`, `or`, algebraic, relation(algebraic), ({list, set})({`and`, `not`, `or`, algebraic, relation(algebraic)})}, but received (Vector(3, {(1) = X1, (2) = X2, (3) = X3})) = (Vector(3, {(1) = (1/2)*xl12+(1/2)*xl13-(1/2)*xl23, (2) = (1/2)*xl12+(1/2)*xl23-(1/2)*xl13, (3) = (1/2)*xl13+(1/2)*xl23-(1/2)*xl12}))

 

Did not work.

solve({X1=1/2*(xl12 + xl13-xl23), X2=1/2*(xl12 + xl23-xl13), X3=1/2*(xl13 + xl23-xl12)}, {xl12, xl13, xl23});

{xl12 = X1+X2, xl13 = X3+X1, xl23 = X2+X3}

(3)

Did work.

 


 

Download Q_20200609.mw

Please Wait...