Sponsored links: Algebra eBooks
 

Related

color-globalsolve-linsolve

/* [wxMaxima batch fi...

s1 : [1,0,0,0];

s2 : [0,1,-1,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,-1,0,0,0];

s2 : [0,1,0,0,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,0,0,0];

s2 : [0,1,-1,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,-1,0,0,0];

s2 : [0,1,0,0,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,-1,0,0,0];

s2 : [0,1,0,0,0];

Calculate

color-globalsolve-linsolve

/* [wxMaxima: input ...

s1 : [1,0,0,0];

s2 : [0,1,-1,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,-1,0,0,0];

s2 : [0,1,0,0,0];

Calculate

color

Run Example
(%i1)refl(v,a) := v - 2*a*(v.a)/(a.a);
                                           2 a (v . a)
(%o1)                    refl(v, a) := v - -----------
                                              a . a
(%i2) s1 : [1,0,0,0];
(%o2)                            [1, 0, 0, 0]
(%i3) s2 : [0,1,-1,0];
(%o3)                           [0, 1, - 1, 0]
(%i4) s3 : [0,0,1,-1];
(%o4)                           [0, 0, 1, - 1]
(%i5) d1 : d11 * s1 + d12 * s2 + d13 * s3;
(%o5)                    [d11, d12, d13 - d12, - d13]
(%i6) e11 : d1.s1 = 1;
(%o6)                               d11 = 1
(%i7) e12 : d1.s2 = -1;
(%o7)                          2 d12 - d13 = - 1
(%i8) e13 : d1.s3 = 1;
(%o8)                           2 d13 - d12 = 1
(%i9) [globalsolve:true];
(%o9)                               [true]
(%i10) linsolve ([e11,e12,e13], [d11,d12,d13]);
                                           1        1
(%o10)                   [d11 : 1, d12 : - -, d13 : -]
                                           3        3
(%i11) d2 : d21 * s1 + d22 * s2 + d23 * s3;
(%o11)                   [d21, d22, d23 - d22, - d23]
(%i12) e21 : d2.s1 = 1;
(%o12)                              d21 = 1
(%i13) e22 : d2.s2 = 1;
(%o13)                          2 d22 - d23 = 1
(%i14) e23 : d2.s3 = -1;
(%o14)                         2 d23 - d22 = - 1
(%i15) [globalsolve:true];
(%o15)                              [true]
(%i16) linsolve ([e21,e22,e23], [d21,d22,d23]);
                                         1          1
(%o16)                   [d21 : 1, d22 : -, d23 : - -]
                                         3          3
(%i17) d3 : d31 * s1 + d32 * s2 + d33 * s3;
(%o17)                   [d31, d32, d33 - d32, - d33]
(%i18) e31 : d3.s1 = -1;
(%o18)                             d31 = - 1
(%i19) e32 : d3.s2 = 1;
(%o19)                          2 d32 - d33 = 1
(%i20) e33 : d3.s3 = 0;
(%o20)                          2 d33 - d32 = 0
(%i21) [globalsolve:true];
(%o21)                              [true]
(%i22) linsolve ([e31,e32,e33], [d31,d32,d33]);
                                           2        1
(%o22)                   [d31 : - 1, d32 : -, d33 : -]
                                           3        3
(%i23) d4 : d41 * s1 + d42 * s2 + d43 * s3;
(%o23)                   [d41, d42, d43 - d42, - d43]
(%i24) e41 : d4.s1 = -1;
(%o24)                             d41 = - 1
(%i25) e42 : d4.s2 = 0;
(%o25)                          2 d42 - d43 = 0
(%i26) e43 : d4.s3 = 1;
(%o26)                          2 d43 - d42 = 1
(%i27) [globalsolve:true];
(%o27)                              [true]
(%i28) linsolve ([e41,e42,e43], [d41,d42,d43]);
                                           1        2
(%o28)                   [d41 : - 1, d42 : -, d43 : -]
                                           3        3
(%i29) color : ''d3;
                                    2    1    1
(%o29)                        [- 1, -, - -, - -]
                                    3    3    3
(%i30) vect : refl(color,s1);
                                   2    1    1
(%o30)                         [1, -, - -, - -]
                                   3    3    3
(%i31) eq1 : a1*(''d1)[1] + a2*(''d2)[1] + a3*(''d3)[1] + a4*(''d4)[1] = vect[1];
(%o31)                      - a4 - a3 + a2 + a1 = 1
(%i32) eq2 : a1*(''d1)[2] + a2*(''d2)[2] + a3*(''d3)[2] + a4*(''d4)[2] = vect[2];
                            a4   2 a3   a2   a1   2
(%o32)                      -- + ---- + -- - -- = -
                            3     3     3    3    3
(%i33) eq3 : a1*(''d1)[3] + a2*(''d2)[3] + a3*(''d3)[3] + a4*(''d4)[3] = vect[3];
                          a4   a3   2 a2   2 a1     1
(%o33)                    -- - -- - ---- + ---- = - -
                          3    3     3      3       3
(%i34) eq4 : a1*(''d1)[4] + a2*(''d2)[4] + a3*(''d3)[4] + a4*(''d4)[4] = vect[4];
                            2 a4   a3   a2   a1     1
(%o34)                    - ---- - -- + -- - -- = - -
                             3     3    3    3      3
(%i35) linsolve([eq1,eq2,eq3,eq4],[a1,a2,a3,a4]);

solve: dependent equations eliminated: (4)
                    %r1 - 2       %r1 + 2
(%o35)      [a1 : - -------, a2 : -------, a3 : 1 - %r1, a4 : %r1]
                       2             2
(%i36) vect : refl(color,s2);
                                      1  2    1
(%o36)                        [- 1, - -, -, - -]
                                      3  3    3
(%i37) eq1 : b1*(''d1)[1] + b2*(''d2)[1] + b3*(''d3)[1] + b4*(''d4)[1] = vect[1];
(%o37)                     - b4 - b3 + b2 + b1 = - 1
(%i38) eq2 : b1*(''d1)[2] + b2*(''d2)[2] + b3*(''d3)[2] + b4*(''d4)[2] = vect[2];
                           b4   2 b3   b2   b1     1
(%o38)                     -- + ---- + -- - -- = - -
                           3     3     3    3      3
(%i39) eq3 : b1*(''d1)[3] + b2*(''d2)[3] + b3*(''d3)[3] + b4*(''d4)[3] = vect[3];
                           b4   b3   2 b2   2 b1   2
(%o39)                     -- - -- - ---- + ---- = -
                           3    3     3      3     3
(%i40) eq4 : b1