Sponsored links: Algebra eBooks
 

Related

dim-load

load(ctensor);

dim;

Calculate

dim-matrix-nullspace

m:matrix([1,1,0],[1,-...

dim(nullspace(m));

Calculate

dim-do-float-log-solve

udo:3^(x+2) - 5^(x);

dim:(x+2)*log(3)=x*lo...

uci:solve(dim,x);

Calculate

dim-matrix

A:matrix([a,b],[-b,c]);

dim(A);

Calculate

dim-matrix-nullspace

m:matrix([1,1,0],[1,-...

dim(nullspace(m));

Calculate

dim-matrix

A: matrix ([1, 1, -1]...

dim(A);

Calculate

dim-matrix-nullspace

m:matrix([1,1,0],[1,-...

dim(nullspace(m));

Calculate

dim-matrix

A:matrix([a,b],[-b,c]);

dim(A);

Calculate

dim

Run Example
(%i1)dim : 2;
(%o1)                                  2
(%i2) n : apply('matrix, makelist (makelist (a[i,j], j,1,dim), i, 1, dim));
                               [ a      a     ]
                               [  1, 1   1, 2 ]
(%o2)                          [              ]
                               [ a      a     ]
                               [  2, 1   2, 2 ]
(%i3) p_n : determinant (x*ident(dim) - n), expand;
               2
(%o3)         x  - a     x - a     x + a     a     - a     a
                    2, 2      1, 1      1, 1  2, 2    1, 2  2, 1
(%i4) sum (coeff (p_n, x, i) * n^^i, i, 0, dim), expand;
                                   [ 0  0 ]
(%o4)                              [      ]
                                   [ 0  0 ]
(%i5) dim : 3;
(%o5)                                  3
(%i6) n : apply('matrix, makelist (makelist (a[i,j], j,1,dim), i, 1, dim));
                            [ a      a      a     ]
                            [  1, 1   1, 2   1, 3 ]
                            [                     ]
(%o6)                       [ a      a      a     ]
                            [  2, 1   2, 2   2, 3 ]
                            [                     ]
                            [ a      a      a     ]
                            [  3, 1   3, 2   3, 3 ]
(%i7) p_n : determinant (x*ident(dim) - n), expand;
       3          2          2          2
(%o7) x  - a     x  - a     x  - a     x  + a     a     x + a     a     x
            3, 3       2, 2       1, 1       2, 2  3, 3      1, 1  3, 3
 - a     a     x - a     a     x + a     a     x - a     a     x
    2, 3  3, 2      1, 3  3, 1      1, 1  2, 2      1, 2  2, 1
 - a     a     a     + a     a     a     + a     a     a
    1, 1  2, 2  3, 3    1, 2  2, 1  3, 3    1, 1  2, 3  3, 2
 - a     a     a     - a     a     a     + a     a     a
    1, 3  2, 1  3, 2    1, 2  2, 3  3, 1    1, 3  2, 2  3, 1
(%i8) sum (coeff (p_n, x, i) * n^^i, i, 0, dim), expand;
                                  [ 0  0  0 ]
                                  [         ]
(%o8)                             [ 0  0  0 ]
                                  [         ]
                                  [ 0  0  0 ]
(%i9) dim : 4;
(%o9)                                  4
(%i10) n : apply('matrix, makelist (makelist (a[i,j], j,1,dim), i, 1, dim));
                        [ a      a      a      a     ]
                        [  1, 1   1, 2   1, 3   1, 4 ]
                        [                            ]
                        [ a      a      a      a     ]
                        [  2, 1   2, 2   2, 3   2, 4 ]
(%o10)                  [                            ]
                        [ a      a      a      a     ]
                        [  3, 1   3, 2   3, 3   3, 4 ]
                        [                            ]
                        [ a      a      a      a     ]
                        [  4, 1   4, 2   4, 3   4, 4 ]
(%i11) p_n : determinant (x*ident(dim) - n), expand;
        4          3          3          3          3                2
(%o11) x  - a     x  - a     x  - a     x  - a     x  + a     a     x
             4, 4       3, 3       2, 2       1, 1       3, 3  4, 4
                2                2                2                2
 + a     a     x  + a     a     x  - a     a     x  - a     a     x
    2, 2  4, 4       1, 1  4, 4       3, 4  4, 3       2, 4  4, 2
                2                2                2                2
 - a     a     x  + a     a     x  + a     a     x  - a     a     x
    1, 4  4, 1       2, 2  3, 3       1, 1  3, 3       2, 3  3, 2
                2                2                2
 - a     a     x  + a     a     x  - a     a     x  - a     a     a     x
    1, 3  3, 1       1, 1  2, 2       1, 2  2, 1       2, 2  3, 3  4, 4
 - a     a     a     x + a     a     a     x + a     a     a     x
    1, 1  3, 3  4, 4      2, 3  3, 2  4, 4      1, 3  3, 1  4, 4
 - a     a     a     x + a     a     a     x + a     a     a     x
    1, 1  2, 2  4, 4      1, 2  2, 1  4, 4      2, 2  3, 4  4, 3
 + a     a     a     x - a     a     a     x - a     a     a     x
    1, 1  3, 4  4, 3      2, 4  3, 2  4, 3      1, 4  3, 1  4, 3
 - a     a     a     x + a     a     a     x + a     a     a     x
    2, 3  3, 4  4, 2      2, 4  3, 3  4, 2      1, 1  2, 4  4, 2
 - a     a     a     x - a     a     a     x + a     a     a     x
    1, 4  2, 1  4, 2      1, 3  3, 4  4, 1      1, 4  3, 3  4, 1
 - a     a     a     x + a     a     a     x - a     a     a     x
    1, 2  2, 4  4, 1      1, 4  2, 2  4, 1      1, 1  2, 2  3, 3
 + a     a     a     x + a     a     a     x - a     a     a     x
    1, 2  2, 1  3, 3      1, 1  2, 3  3, 2      1, 3  2, 1  3, 2
 - a     a     a     x + a     a     a     x + a     a     a     a
    1, 2  2, 3  3, 1      1, 3  2, 2  3, 1      1, 1  2, 2  3, 3  4, 4
 - a     a     a     a     - a     a     a     a     + a     a     a     a
    1, 2  2, 1  3, 3  4, 4    1, 1  2, 3  3, 2  4, 4    1, 3  2, 1  3, 2  4, 4
 + a     a     a     a     - a     a     a     a     - a     a     a     a
    1, 2  2, 3  3, 1  4, 4    1, 3  2, 2  3, 1  4, 4    1, 1  2, 2  3, 4  4, 3
 + a     a     a     a     + a     a     a     a     - a     a     a     a
    1, 2  2, 1  3, 4  4, 3    1, 1  2, 4  3, 2  4, 3    1, 4  2, 1  3, 2  4, 3
 - a     a     a     a     + a     a     a     a     + a     a     a     a
    1, 2  2, 4  3, 1  4, 3    1, 4  2, 2  3, 1  4, 3    1, 1  2, 3  3, 4  4, 2
 - a     a     a     a     - a     a     a     a     + a     a     a     a
    1, 3  2, 1  3, 4  4, 2    1, 1  2, 4  3, 3  4, 2    1, 4  2, 1  3, 3  4, 2
 + a     a     a     a     - a     a     a     a     - a     a     a     a
    1, 3  2, 4  3, 1  4, 2    1, 4  2, 3  3, 1  4, 2    1, 2  2, 3  3, 4  4, 1
 + a     a     a     a     + a     a     a     a     - a     a     a     a
    1, 3  2, 2  3, 4  4, 1    1, 2  2, 4  3, 3  4, 1    1, 4  2, 2  3, 3  4, 1
 - a     a     a     a     + a     a     a     a
    1, 3  2, 4  3, 2  4, 1    1, 4  2, 3  3, 2  4, 1
(%i12) sum (coeff (p_n, x, i) * n^^i, i, 0, dim), expand;
                                [ 0  0  0  0 ]
                                [            ]
                                [ 0  0  0  0 ]
(%o12)                          [            ]
                                [ 0  0  0  0 ]
                                [            ]
                                [ 0  0  0  0 ]
(%i13) dim : 5;
(%o13)                                 5
(%i14) n : apply('matrix, makelist (makelist (a[i,j], j,1,dim), i, 1, dim));
                     [ a      a      a      a      a     ]
                     [  1, 1   1, 2   1, 3   1, 4   1, 5 ]
                     [                                   ]
                     [ a      a      a      a      a     ]
                     [  2, 1   2, 2   2, 3   2, 4   2, 5 ]
                     [                                   ]
(%o14)               [ a      a      a      a      a     ]
                     [  3, 1   3, 2   3, 3   3, 4   3, 5 ]
                     [                                   ]
                     [ a      a      a      a      a     ]
                     [  4, 1   4, 2   4, 3   4, 4   4, 5 ]
                     [                                   ]
                     [ a      a      a      a      a     ]
                     [  5, 1   5, 2   5, 3   5, 4   5, 5 ]
(%i15) p_n : determinant (x*ident(dim) - n), expand;
        5          4          4          4          4          4
(%o15) x  - a     x  - a     x  - a     x  - a     x  - a     x
             5, 5       4, 4       3, 3       2, 2       1, 1
                3                3                3                3
 + a     a     x  + a     a     x  + a     a     x  + a     a     x
    4, 4  5, 5       3, 3  5, 5       2, 2  5, 5       1, 1  5, 5
                3                3                3                3
 - a     a     x  - a     a     x  - a     a     x  - a     a     x
    4, 5  5, 4       3, 5  5, 3       2, 5  5, 2       1, 5  5, 1
                3                3                3                3
 + a     a     x  + a     a     x  + a     a     x  - a     a     x
    3, 3  4, 4       2, 2  4, 4       1, 1  4, 4       3, 4  4, 3
                3                3                3                3
 - a     a     x  - a     a     x  + a     a     x  + a     a     x
    2, 4  4, 2       1, 4  4, 1       2, 2  3, 3       1, 1  3, 3
                3                3                3                3
 - a     a     x  - a     a     x  + a     a     x  - a     a     x
    2, 3  3, 2       1, 3  3, 1       1, 1  2, 2       1, 2  2, 1
                      2                      2                      2
 - a     a     a     x  - a     a     a     x  - a     a     a     x
    3, 3  4, 4  5, 5       2, 2  4, 4  5, 5       1, 1  4, 4  5, 5
                      2                      2                      2
 + a     a     a     x  + a     a     a     x  + a     a     a     x
    3, 4  4, 3  5, 5       2, 4  4, 2  5, 5       1, 4  4, 1  5, 5
                      2                      2                      2
 - a     a     a     x  - a     a     a     x  + a     a     a     x
    2, 2  3, 3  5, 5       1, 1  3, 3  5, 5       2, 3  3, 2  5, 5
                      2                      2                      2
 + a     a     a     x  - a     a     a     x  + a     a     a     x
    1, 3  3, 1  5, 5       1, 1  2, 2  5, 5       1, 2  2, 1  5, 5
                      2                      2                      2
 + a     a     a     x  + a     a     a     x  + a     a     a     x
    3, 3  4, 5  5, 4       2, 2  4, 5  5, 4       1, 1  4, 5  5, 4
                      2                      2                      2
 - a     a     a     x  - a     a     a     x  - a     a     a     x
    3, 5  4, 3  5, 4       2, 5  4, 2  5, 4       1, 5  4, 1  5, 4
                      2                      2                      2
 - a     a     a     x  + a     a     a     x  + a     a     a     x
    3, 4  4, 5  5, 3       3, 5  4, 4  5, 3       2, 2  3, 5  5, 3
                      2                      2                      2
 + a     a     a     x  - a     a     a     x  - a     a     a     x
    1, 1  3, 5  5, 3       2, 5  3, 2  5, 3       1, 5  3, 1  5, 3
                      2                      2                      2
 - a     a     a     x  + a     a     a     x  - a     a     a     x
    2, 4  4, 5  5, 2       2, 5  4, 4  5, 2       2, 3  3, 5  5, 2
                      2                      2                      2
 + a     a     a     x  + a     a     a     x  - a     a     a     x
    2, 5  3, 3  5, 2       1, 1  2, 5  5, 2       1, 5  2, 1  5, 2
                      2                      2                      2
 - a     a     a     x  + a     a     a     x  - a     a     a     x
    1, 4  4, 5  5, 1       1, 5  4, 4  5, 1       1, 3  3, 5  5, 1
                      2                      2                      2
 + a     a     a     x  - a     a     a     x  + a     a     a     x
    1, 5  3, 3  5, 1       1, 2  2, 5  5, 1       1, 5  2, 2  5, 1
                      2                      2                      2
 - a     a     a     x  - a     a     a     x  + a     a     a     x
    2, 2  3, 3  4, 4       1, 1  3, 3  4, 4       2, 3  3, 2  4, 4
                      2                      2                      2
 + a     a     a     x  - a     a     a     x  + a     a     a     x
    1, 3  3, 1  4, 4       1, 1  2, 2  4, 4       1, 2  2, 1  4, 4
                      2                      2                      2
 + a     a     a     x  + a     a     a     x  - a     a     a     x
    2, 2  3, 4  4, 3       1, 1  3, 4  4, 3       2, 4  3, 2  4, 3
                      2                      2                      2
 - a     a     a     x  - a     a     a     x  + a     a     a     x
    1, 4  3, 1  4, 3       2, 3  3, 4  4, 2       2, 4  3, 3  4, 2
                      2                      2                      2
 + a     a     a     x  - a     a     a     x  - a     a     a     x
    1, 1  2, 4  4, 2       1, 4  2, 1  4, 2       1, 3  3, 4  4, 1
                      2                      2                      2
 + a     a     a     x  - a     a     a     x  + a     a     a     x
    1, 4  3, 3  4, 1       1, 2  2, 4  4, 1       1, 4  2, 2  4, 1
                      2                      2                      2
 - a     a     a     x  + a     a     a     x  + a     a     a     x
    1, 1  2, 2  3, 3       1, 2  2, 1  3, 3       1, 1  2, 3  3, 2
                      2                      2                      2
 - a     a     a     x  - a     a     a     x  + a     a     a     x
    1, 3  2, 1  3, 2       1, 2  2, 3  3, 1       1, 3  2, 2  3, 1
 + a     a     a     a     x + a     a     a     a     x
    2, 2  3, 3  4, 4  5, 5      1, 1  3, 3  4, 4  5, 5
 - a     a     a     a     x - a     a     a     a     x
    2, 3  3, 2  4, 4  5, 5      1, 3  3, 1  4, 4  5, 5
 + a     a     a     a     x - a     a     a     a     x
    1, 1  2, 2  4, 4  5, 5      1, 2  2, 1  4, 4  5, 5
 - a     a     a     a     x - a     a     a     a     x
    2, 2  3, 4  4, 3  5, 5      1, 1  3, 4  4, 3  5, 5
 + a     a     a     a     x + a     a     a     a     x
    2, 4  3, 2  4, 3  5, 5      1, 4  3, 1  4, 3  5, 5
 + a     a     a     a     x - a     a     a     a     x
    2, 3  3, 4  4, 2  5, 5      2, 4  3, 3  4, 2  5, 5
 - a     a     a     a     x + a     a     a     a     x
    1, 1  2, 4  4, 2  5, 5      1, 4  2, 1  4, 2  5, 5
 + a     a     a     a     x - a     a     a     a     x
    1, 3  3, 4  4, 1  5, 5      1, 4  3, 3  4, 1  5, 5
 + a     a     a     a     x - a     a     a     a     x
    1, 2  2, 4  4, 1  5, 5      1, 4  2, 2  4, 1  5, 5
 + a     a     a     a     x - a     a     a     a     x
    1, 1  2, 2  3, 3  5, 5      1, 2  2, 1  3, 3  5, 5
 - a     a     a     a     x + a     a     a     a     x
    1, 1  2, 3  3, 2  5, 5      1, 3  2, 1  3, 2  5, 5
 + a     a     a     a     x - a     a     a     a     x
    1, 2  2, 3  3, 1  5, 5      1, 3  2, 2  3, 1  5, 5
 - a     a     a     a     x - a     a     a     a     x
    2, 2  3, 3  4, 5  5, 4      1, 1  3, 3  4, 5  5, 4
 + a     a     a     a     x + a     a     a     a     x
    2, 3  3, 2  4, 5  5, 4      1, 3  3, 1  4, 5  5, 4
 - a     a     a     a     x + a     a     a     a     x
    1, 1  2, 2  4, 5  5, 4      1, 2  2, 1  4, 5  5, 4
 + a     a     a     a     x + a     a     a     a     x
    2, 2  3, 5  4, 3  5, 4      1, 1  3, 5  4, 3  5, 4
 - a     a     a     a     x - a     a     a     a     x
    2, 5  3, 2  4, 3  5, 4      1, 5  3, 1  4, 3  5, 4
 - a     a     a     a     x + a     a     a     a     x
    2, 3  3, 5  4, 2  5, 4      2, 5  3, 3  4, 2  5, 4
 + a     a     a     a     x - a     a     a     a     x
    1, 1  2, 5  4, 2  5, 4      1, 5  2, 1  4, 2  5, 4
 - a     a     a     a     x + a     a     a     a     x
    1, 3  3, 5  4, 1  5, 4      1, 5  3, 3  4, 1  5, 4
 - a     a     a     a     x + a     a     a     a     x
    1, 2  2, 5  4, 1  5, 4      1, 5  2, 2  4, 1  5, 4
 + a     a     a     a     x + a     a     a     a     x
    2, 2  3, 4  4, 5  5, 3      1, 1  3, 4  4, 5  5, 3
 - a     a     a     a     x - a     a     a     a     x
    2, 4  3, 2  4, 5  5, 3      1, 4  3, 1  4, 5  5, 3
 - a     a     a     a     x - a     a     a     a     x
    2, 2  3, 5  4, 4  5, 3      1, 1  3, 5  4, 4  5, 3
 + a     a     a     a     x + a     a     a     a     x
    2, 5  3, 2  4, 4  5, 3      1, 5  3, 1  4, 4  5, 3
 + a     a     a     a     x - a     a     a     a     x
    2, 4  3, 5  4, 2  5, 3      2, 5  3, 4  4, 2  5, 3
 + a     a     a     a     x - a     a     a     a     x
    1, 4  3, 5  4, 1  5, 3      1, 5  3, 4  4, 1  5, 3
 - a     a     a     a     x + a     a     a     a     x
    1, 1  2, 2  3, 5  5, 3      1, 2  2, 1  3, 5  5, 3
 + a     a     a     a     x - a     a     a     a     x
    1, 1  2, 5  3, 2  5, 3      1, 5  2, 1  3, 2  5, 3
 - a     a     a     a     x + a     a     a     a     x
    1, 2  2, 5  3, 1  5, 3      1, 5  2, 2  3, 1  5, 3
 - a     a     a     a     x + a     a     a     a     x
    2, 3  3, 4  4, 5  5, 2      2, 4  3, 3  4, 5  5, 2
 + a     a     a     a     x - a     a     a     a     x
    1, 1  2, 4  4, 5  5, 2      1, 4  2, 1  4, 5  5, 2
 + a     a     a     a     x - a     a     a     a     x
    2, 3  3, 5  4, 4  5, 2      2, 5  3, 3  4, 4  5, 2
 - a     a     a     a     x + a     a     a     a     x
    1, 1  2, 5  4, 4  5, 2      1, 5  2, 1  4, 4  5, 2
 - a     a     a     a     x + a     a     a     a     x
    2, 4  3, 5  4, 3  5, 2      2, 5  3, 4  4, 3  5, 2
 + a     a     a     a     x - a     a     a     a     x
    1, 4  2, 5  4, 1  5, 2      1, 5  2, 4  4, 1  5, 2
 + a     a     a     a     x - a     a     a     a     x
    1, 1  2, 3  3, 5  5, 2      1, 3  2, 1  3, 5  5, 2
 - a     a     a     a     x + a     a     a     a     x
    1, 1  2, 5  3, 3  5, 2      1, 5  2, 1  3, 3  5, 2
 + a     a     a     a     x - a     a     a     a     x
    1, 3  2, 5  3, 1  5, 2      1, 5  2, 3  3, 1  5, 2
 - a     a     a     a     x + a     a     a     a     x
    1, 3  3, 4  4, 5  5, 1      1, 4  3, 3  4, 5  5, 1
 - a     a     a     a     x + a     a     a     a     x
    1, 2  2, 4  4, 5  5, 1      1, 4  2, 2  4, 5  5, 1
 + a     a     a     a     x - a     a     a     a     x
    1, 3  3, 5  4, 4  5, 1      1, 5  3, 3  4, 4  5, 1
 + a     a     a     a     x - a     a     a     a     x
    1, 2  2, 5  4, 4  5, 1      1, 5  2, 2  4, 4  5, 1
 - a     a     a     a     x + a     a     a     a     x
    1, 4  3, 5  4, 3  5, 1      1, 5  3, 4  4, 3  5, 1
 - a     a     a     a     x + a     a     a     a     x
    1, 4  2, 5  4, 2  5, 1      1, 5  2, 4  4, 2  5, 1
 - a     a     a     a     x + a     a     a     a     x
    1, 2  2, 3  3, 5  5, 1      1, 3  2, 2  3, 5  5, 1
 + a     a     a     a     x - a     a     a     a     x
    1, 2  2, 5  3, 3  5, 1      1, 5  2, 2  3, 3  5, 1
 - a     a     a     a     x + a     a     a     a     x
    1, 3  2, 5  3, 2  5, 1      1, 5  2, 3  3, 2  5, 1
 + a     a     a     a     x - a     a     a     a     x
    1, 1  2, 2  3, 3  4, 4      1, 2  2, 1  3, 3  4, 4
 - a     a     a     a     x + a     a     a     a     x
    1, 1  2, 3  3, 2  4, 4      1, 3  2, 1  3, 2  4, 4
 + a     a     a     a     x - a     a     a     a     x
    1, 2  2, 3  3, 1  4, 4      1, 3  2, 2  3, 1  4, 4
 - a     a     a     a     x + a     a     a     a     x
    1, 1  2, 2  3, 4  4, 3      1, 2  2, 1  3, 4  4, 3
 + a     a     a     a     x - a     a     a     a     x
    1, 1  2, 4  3, 2  4, 3      1, 4  2, 1  3, 2  4, 3
 - a     a     a     a     x + a     a     a     a     x
    1, 2  2, 4  3, 1  4, 3      1, 4  2, 2  3, 1  4, 3
 + a     a     a     a     x - a     a     a     a     x
    1, 1  2, 3  3, 4  4, 2      1, 3  2, 1  3, 4  4, 2
 - a     a     a     a     x + a     a     a     a     x
    1, 1  2, 4  3, 3  4, 2      1, 4  2, 1  3, 3  4, 2
 + a     a     a     a     x - a     a     a     a     x
    1, 3  2, 4  3, 1  4, 2      1, 4  2, 3  3, 1  4, 2
 - a     a     a     a     x + a     a     a     a     x
    1, 2  2, 3  3, 4  4, 1      1, 3  2, 2  3, 4  4, 1
 + a     a     a     a     x - a     a     a     a     x
    1, 2  2, 4  3, 3  4, 1      1, 4  2, 2  3, 3  4, 1
 - a     a     a     a     x + a     a     a     a     x
    1, 3  2, 4  3, 2  4, 1      1, 4  2, 3  3, 2  4, 1
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 2  3, 3  4, 4  5, 5    1, 2  2, 1  3, 3  4, 4  5, 5
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 3  3, 2  4, 4  5, 5    1, 3  2, 1  3, 2  4, 4  5, 5
 - a     a     a     a     a     + a     a     a     a     a
    1, 2  2, 3  3, 1  4, 4  5, 5    1, 3  2, 2  3, 1  4, 4  5, 5
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 2  3, 4  4, 3  5, 5    1, 2  2, 1  3, 4  4, 3  5, 5
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 4  3, 2  4, 3  5, 5    1, 4  2, 1  3, 2  4, 3  5, 5
 + a     a     a     a     a     - a     a     a     a     a
    1, 2  2, 4  3, 1  4, 3  5, 5    1, 4  2, 2  3, 1  4, 3  5, 5
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 3  3, 4  4, 2  5, 5    1, 3  2, 1  3, 4  4, 2  5, 5
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 4  3, 3  4, 2  5, 5    1, 4  2, 1  3, 3  4, 2  5, 5
 - a     a     a     a     a     + a     a     a     a     a
    1, 3  2, 4  3, 1  4, 2  5, 5    1, 4  2, 3  3, 1  4, 2  5, 5
 + a     a     a     a     a     - a     a     a     a     a
    1, 2  2, 3  3, 4  4, 1  5, 5    1, 3  2, 2  3, 4  4, 1  5, 5
 - a     a     a     a     a     + a     a     a     a     a
    1, 2  2, 4  3, 3  4, 1  5, 5    1, 4  2, 2  3, 3  4, 1  5, 5
 + a     a     a     a     a     - a     a     a     a     a
    1, 3  2, 4  3, 2  4, 1  5, 5    1, 4  2, 3  3, 2  4, 1  5, 5
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 2  3, 3  4, 5  5, 4    1, 2  2, 1  3, 3  4, 5  5, 4
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 3  3, 2  4, 5  5, 4    1, 3  2, 1  3, 2  4, 5  5, 4
 + a     a     a     a     a     - a     a     a     a     a
    1, 2  2, 3  3, 1  4, 5  5, 4    1, 3  2, 2  3, 1  4, 5  5, 4
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 2  3, 5  4, 3  5, 4    1, 2  2, 1  3, 5  4, 3  5, 4
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 5  3, 2  4, 3  5, 4    1, 5  2, 1  3, 2  4, 3  5, 4
 - a     a     a     a     a     + a     a     a     a     a
    1, 2  2, 5  3, 1  4, 3  5, 4    1, 5  2, 2  3, 1  4, 3  5, 4
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 3  3, 5  4, 2  5, 4    1, 3  2, 1  3, 5  4, 2  5, 4
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 5  3, 3  4, 2  5, 4    1, 5  2, 1  3, 3  4, 2  5, 4
 + a     a     a     a     a     - a     a     a     a     a
    1, 3  2, 5  3, 1  4, 2  5, 4    1, 5  2, 3  3, 1  4, 2  5, 4
 - a     a     a     a     a     + a     a     a     a     a
    1, 2  2, 3  3, 5  4, 1  5, 4    1, 3  2, 2  3, 5  4, 1  5, 4
 + a     a     a     a     a     - a     a     a     a     a
    1, 2  2, 5  3, 3  4, 1  5, 4    1, 5  2, 2  3, 3  4, 1  5, 4
 - a     a     a     a     a     + a     a     a     a     a
    1, 3  2, 5  3, 2  4, 1  5, 4    1, 5  2, 3  3, 2  4, 1  5, 4
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 2  3, 4  4, 5  5, 3    1, 2  2, 1  3, 4  4, 5  5, 3
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 4  3, 2  4, 5  5, 3    1, 4  2, 1  3, 2  4, 5  5, 3
 - a     a     a     a     a     + a     a     a     a     a
    1, 2  2, 4  3, 1  4, 5  5, 3    1, 4  2, 2  3, 1  4, 5  5, 3
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 2  3, 5  4, 4  5, 3    1, 2  2, 1  3, 5  4, 4  5, 3
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 5  3, 2  4, 4  5, 3    1, 5  2, 1  3, 2  4, 4  5, 3
 + a     a     a     a     a     - a     a     a     a     a
    1, 2  2, 5  3, 1  4, 4  5, 3    1, 5  2, 2  3, 1  4, 4  5, 3
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 4  3, 5  4, 2  5, 3    1, 4  2, 1  3, 5  4, 2  5, 3
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 5  3, 4  4, 2  5, 3    1, 5  2, 1  3, 4  4, 2  5, 3
 - a     a     a     a     a     + a     a     a     a     a
    1, 4  2, 5  3, 1  4, 2  5, 3    1, 5  2, 4  3, 1  4, 2  5, 3
 + a     a     a     a     a     - a     a     a     a     a
    1, 2  2, 4  3, 5  4, 1  5, 3    1, 4  2, 2  3, 5  4, 1  5, 3
 - a     a     a     a     a     + a     a     a     a     a
    1, 2  2, 5  3, 4  4, 1  5, 3    1, 5  2, 2  3, 4  4, 1  5, 3
 + a     a     a     a     a     - a     a     a     a     a
    1, 4  2, 5  3, 2  4, 1  5, 3    1, 5  2, 4  3, 2  4, 1  5, 3
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 3  3, 4  4, 5  5, 2    1, 3  2, 1  3, 4  4, 5  5, 2
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 4  3, 3  4, 5  5, 2    1, 4  2, 1  3, 3  4, 5  5, 2
 + a     a     a     a     a     - a     a     a     a     a
    1, 3  2, 4  3, 1  4, 5  5, 2    1, 4  2, 3  3, 1  4, 5  5, 2
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 3  3, 5  4, 4  5, 2    1, 3  2, 1  3, 5  4, 4  5, 2
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 5  3, 3  4, 4  5, 2    1, 5  2, 1  3, 3  4, 4  5, 2
 - a     a     a     a     a     + a     a     a     a     a
    1, 3  2, 5  3, 1  4, 4  5, 2    1, 5  2, 3  3, 1  4, 4  5, 2
 + a     a     a     a     a     - a     a     a     a     a
    1, 1  2, 4  3, 5  4, 3  5, 2    1, 4  2, 1  3, 5  4, 3  5, 2
 - a     a     a     a     a     + a     a     a     a     a
    1, 1  2, 5  3, 4  4, 3  5, 2    1, 5  2, 1  3, 4  4, 3  5, 2
 + a     a     a     a     a     - a     a     a     a     a
    1, 4  2, 5  3, 1  4, 3  5, 2    1, 5  2, 4  3, 1  4, 3  5, 2
 - a     a     a     a     a     + a     a     a     a     a
    1, 3  2, 4  3, 5  4, 1  5, 2    1, 4  2, 3  3, 5  4, 1  5, 2
 + a     a     a     a     a     - a     a     a     a     a
    1, 3  2, 5  3, 4  4, 1  5, 2    1, 5  2, 3  3, 4  4, 1  5, 2
 - a     a     a     a     a     + a     a     a     a     a
    1, 4  2, 5  3, 3  4, 1  5, 2    1, 5  2, 4  3, 3  4, 1  5, 2
 - a     a     a     a     a     + a     a     a     a     a
    1, 2  2, 3  3, 4  4, 5  5, 1    1, 3  2, 2  3, 4  4, 5  5, 1
 + a     a     a     a     a     - a     a     a     a     a
    1, 2  2, 4  3, 3  4, 5  5, 1    1, 4  2, 2  3, 3  4, 5  5, 1
 - a     a     a     a     a     + a     a     a     a     a
    1, 3  2, 4  3, 2  4, 5  5, 1    1, 4  2, 3  3, 2  4, 5  5, 1
 + a     a     a     a     a     - a     a     a     a     a
    1, 2  2, 3  3, 5  4, 4  5, 1    1, 3  2, 2  3, 5  4, 4  5, 1
 - a     a     a     a     a     + a     a     a     a     a
    1, 2  2, 5  3, 3  4, 4  5, 1    1, 5  2, 2  3, 3  4, 4  5, 1
 + a     a     a     a     a     - a     a     a     a     a
    1, 3  2, 5  3, 2  4, 4  5, 1    1, 5  2, 3  3, 2  4, 4  5, 1
 - a     a     a     a     a     + a     a     a     a     a
    1, 2  2, 4  3, 5  4, 3  5, 1    1, 4  2, 2  3, 5  4, 3  5, 1
 + a     a     a     a     a     - a     a     a     a     a
    1, 2  2, 5  3, 4  4, 3  5, 1    1, 5  2, 2  3, 4  4, 3  5, 1
 - a     a     a     a     a     + a     a     a     a     a
    1, 4  2, 5  3, 2  4, 3  5, 1    1, 5  2, 4  3, 2  4, 3  5, 1
 + a     a     a     a     a     - a     a     a     a     a
    1, 3  2, 4  3, 5  4, 2  5, 1    1, 4  2, 3  3, 5  4, 2  5, 1
 - a     a     a     a     a     + a     a     a     a     a
    1, 3  2, 5  3, 4  4, 2  5, 1    1, 5  2, 3  3, 4  4, 2  5, 1
 + a     a     a     a     a     - a     a     a     a     a
    1, 4  2, 5  3, 3  4, 2  5, 1    1, 5  2, 4  3, 3  4, 2  5, 1
(%i16) sum (coeff (p_n, x, i) * n^^i, i, 0, dim), expand;
                               [ 0  0  0  0  0 ]
                               [               ]
                               [ 0  0  0  0  0 ]
                               [               ]
(%o16)                         [ 0  0  0  0  0 ]
                               [               ]
                               [ 0  0  0  0  0 ]
                               [               ]
                               [ 0  0  0  0  0 ]
(%i17) 
Run Example
load(ctensor);
(%o1)          /usr/share/maxima/5.21.1/share/tensor/ctensor.mac
(%i2) dim;
(%o2)                                  4
(%i3) 
Run Example
dd(fun, vec, [point]):=block([dim:length(vec)],   if(get(vect, 'version)=false) then load(vect),   declare(express, evfun),   if(dim=3) then scalefactors([x, y, z])             else if(dim=2) then scalefactors([x, y])             else if(dim=1) then scalefactors([x]),   directional_derivative:ev((grad(fun) . vec)/sqrt(vec . vec), diff, express),   if(not(emptyp(point))) then return(at(directional_derivative,                                               [x=point[1], y=point[2]]))   else return(directional_derivative));
(%o1) dd(fun, vec, [point]) := block([dim : length(vec)], 
if get(vect, 'version) = false then load(vect), declare(express, evfun), 
if dim = 3 then scalefactors([x, y, z])
 else (if dim = 2 then scalefactors([x, y])
 else (if dim = 1 then scalefactors([x]))), 
                            grad(fun) . vec
directional_derivative : ev(---------------, diff, express), 
                            sqrt(vec . vec)
if not emptyp(point) then return(at(directional_derivative, 
[x = point , y = point ])) else return(directional_derivative))
          1           2
(%i2) f(x, y):=x^2*y+x*y^2;
                                        2        2
(%o2)                       f(x, y) := x  y + x y
(%i3) v:[3, 4];
(%o3)                               [3, 4]
(%i4)  P:[-1, 2];
(%o4)                              [- 1, 2]
(%i5) dd(f(x,y), v);
                            2                        2
                        3 (y  + 2 x y) + 4 (2 x y + x )
(%o5)                   -------------------------------
                                       5
(%i6) dd(f(x,y), v, -1, 2);
                                       12
(%o6)                                - --
                                       5
(%i7) grad(f(-1,2)), diff,express;
(%o7)                               [0, 0]
(%i8) 

Related Help

Help for Dim