Update docs to match implementation of $build_and_dump_html_index
[maxima.git] / doc / info / pt_BR / diag.texi
blob16bd53fbb6c35160ea0714e6a1acb547a93cbc4f
1 @c Language: Brazilian Portuguese, Encoding: iso-8859-1
2 @c /diag.texi/1.2/Sat Jun  2 00:13:14 2007//
3 @menu
4 * Funções e Variáveis Definidas para diag::
5 @end menu
7 @node Funções e Variáveis Definidas para diag,  , diag, diag
8 @section Funções e Variáveis Definidas para diag
11 @deffn {Função} diag (@var{lm})
12 Constrói a matriz quadrada com as matrizes de @var{lm} na diagonal. @var{lm} é uma lista de matrizes ou escalares.
14 Exemplo:
15 @example
16 (%i1) load("diag")$
18 (%i2) a1:matrix([1,2,3],[0,4,5],[0,0,6])$
20 (%i3) a2:matrix([1,1],[1,0])$
22 (%i4) diag([a1,x,a2]);
23                    [ 1  2  3  0  0  0 ]
24                    [                  ]
25                    [ 0  4  5  0  0  0 ]
26                    [                  ]
27                    [ 0  0  6  0  0  0 ]
28 (%o4)              [                  ]
29                    [ 0  0  0  x  0  0 ]
30                    [                  ]
31                    [ 0  0  0  0  1  1 ]
32                    [                  ]
33                    [ 0  0  0  0  1  0 ]
34 @end example
36 Para usar essa função escreva primeiramente @code{load("diag")}.
37 @end deffn
40 @deffn {Função} JF (@var{lambda},@var{n})
41 Retorna a célula de Jordan de ordem @var{n} com autovalor @var{lambda}.
43 Exemplo:
44 @example
45 (%i1) load("diag")$
47 (%i2) JF(2,5);
48                     [ 2  1  0  0  0 ]
49                     [               ]
50                     [ 0  2  1  0  0 ]
51                     [               ]
52 (%o2)               [ 0  0  2  1  0 ]
53                     [               ]
54                     [ 0  0  0  2  1 ]
55                     [               ]
56                     [ 0  0  0  0  2 ]
57 (%i3) JF(3,2);
58                          [ 3  1 ]
59 (%o3)                    [      ]
60                          [ 0  3 ]
61 @end example
63 Para usar essa função escreva primeiramente @code{load("diag")}.
64 @end deffn
67 @deffn {Função} jordan (@var{mat})
68 Retorna a forma de Jordan da matriz @var{mat}, mas codificada em uma lista do Maxima.
69 Para pegar a matriz correspondente à codificação, chame a função @code{dispJordan} sando como argumento
70 a saída de @code{JF}.
72 Exemplo:
73 @example
74 (%i1) load("diag")$
76 (%i3) a:matrix([2,0,0,0,0,0,0,0],
77                [1,2,0,0,0,0,0,0],
78                [-4,1,2,0,0,0,0,0],
79                [2,0,0,2,0,0,0,0],
80                [-7,2,0,0,2,0,0,0],
81                [9,0,-2,0,1,2,0,0],
82                [-34,7,1,-2,-1,1,2,0],
83                [145,-17,-16,3,9,-2,0,3])$
85 (%i34) jordan(a);
86 (%o4)             [[2, 3, 3, 1], [3, 1]]
87 (%i5) dispJordan(%);
88                 [ 2  1  0  0  0  0  0  0 ]
89                 [                        ]
90                 [ 0  2  1  0  0  0  0  0 ]
91                 [                        ]
92                 [ 0  0  2  0  0  0  0  0 ]
93                 [                        ]
94                 [ 0  0  0  2  1  0  0  0 ]
95 (%o5)           [                        ]
96                 [ 0  0  0  0  2  1  0  0 ]
97                 [                        ]
98                 [ 0  0  0  0  0  2  0  0 ]
99                 [                        ]
100                 [ 0  0  0  0  0  0  2  0 ]
101                 [                        ]
102                 [ 0  0  0  0  0  0  0  3 ]
103 @end example
105 Para usar essa função escreva primeiramente @code{load("diag")}. Veja também @code{dispJordan} e @code{minimalPoly}.
106 @end deffn
109 @deffn {Função} dispJordan (@var{l})
110 Retorna a matriz de Jordan associada à codificação fornecida pela lista do Maxima @var{l}, que é a saída fornecida pela função @code{jordan}.
112 Exemplo:
113 @example
114 (%i1) load("diag")$
116 (%i2) b1:matrix([0,0,1,1,1],
117                 [0,0,0,1,1],
118                 [0,0,0,0,1],
119                 [0,0,0,0,0],
120                 [0,0,0,0,0])$
122 (%i3) jordan(b1);
123 (%o3)                  [[0, 3, 2]]
124 (%i4) dispJordan(%);
125                     [ 0  1  0  0  0 ]
126                     [               ]
127                     [ 0  0  1  0  0 ]
128                     [               ]
129 (%o4)               [ 0  0  0  0  0 ]
130                     [               ]
131                     [ 0  0  0  0  1 ]
132                     [               ]
133                     [ 0  0  0  0  0 ]
134 @end example
136 Para usar essa função escreva primeiramente @code{load("diag")}. Veja também @code{jordan} e @code{minimalPoly}.
137 @end deffn
140 @deffn {Função} minimalPoly (@var{l})
141 Retorna o menor polinômio associado à codificação fornecida pela lista do Maxima @var{l}, que é a saída fornecida pela função @code{jordan}.
143 Exemplo:
144 @example
145 (%i1) load("diag")$
147 (%i2) a:matrix([2,1,2,0],
148                [-2,2,1,2],
149                [-2,-1,-1,1],
150                [3,1,2,-1])$
152 (%i3) jordan(a);
153 (%o3)               [[- 1, 1], [1, 3]]
154 (%i4) minimalPoly(%);
155                             3
156 (%o4)                (x - 1)  (x + 1)
157 @end example
159 Para usar essa função escreva primeiramente @code{load("diag")}. Veja também @code{jordan} e @code{dispJordan}.
160 @end deffn
162 @deffn {Função} ModeMatrix (@var{A},@var{l})
163 Retorna a matriz @var{M} tal que @math{(M^^-1).A.M=J}, onde @var{J} é a forma de Jordan de @var{A}. A lista do Maxima @var{l} é a codificação da forma de Jordan como retornado pela função @code{jordan}.
165 Exemplo:
166 @example
167 (%i1) load("diag")$
169 (%i2) a:matrix([2,1,2,0],
170           [-2,2,1,2],
171           [-2,-1,-1,1],
172           [3,1,2,-1])$
174 (%i3) jordan(a);
175 (%o3)               [[- 1, 1], [1, 3]]
176 (%i4) M: ModeMatrix(a,%);
177                   [  1    - 1   1   1 ]
178                   [                   ]
179                   [   1               ]
180                   [ - -   - 1   0   0 ]
181                   [   9               ]
182                   [                   ]
183 (%o4)             [   13              ]
184                   [ - --   1   - 1  0 ]
185                   [   9               ]
186                   [                   ]
187                   [  17               ]
188                   [  --   - 1   1   1 ]
189                   [  9                ]
190 (%i5) is(  (M^^-1).a.M = dispJordan(%o3)  );
191 (%o5)                      true
192 @end example
193 Note que @code{dispJordan(%o3)} é a forma de Jordan da matriz @code{a}.
195 Para usa essa função escreva primeiramente @code{load("diag")}. Veja também @code{jordan} e @code{dispJordan}.
196 @end deffn
199 @deffn {Função} mat_function (@var{f},@var{mat})
200 Retorna @math{f(mat)}, onde @var{f} é uma função analítica e @var{mat}
201 uma matriz. Essa computação é baseada na fórmula da integral de Cauchy, que estabelece que
202 se @code{f(x)} for analítica e
204 @example
205 mat=diag([JF(m1,n1),...,JF(mk,nk)]),
206 @end example
208 então
210 @example
211 f(mat)=ModeMatrix*diag([f(JF(m1,n1)),...,f(JF(mk,nk))])*ModeMatrix^^(-1)
212 @end example
214 Note que existem entre 6 ou 8 outros métodos para esse cálculo.
216 Segue-se alguns exemplos.
218 Exemplo 1:
219 @example
220 (%i1) load("diag")$
222 (%i2) b2:matrix([0,1,0], [0,0,1], [-1,-3,-3])$
224 (%i3) mat_function(exp,t*b2);
225                2   - t
226               t  %e          - t     - t
227 (%o3) matrix([-------- + t %e    + %e   ,
228                  2
229         - t     - t                           - t
230  2    %e      %e        - t           - t   %e
231 t  (- ----- - ----- + %e   ) + t (2 %e    - -----)
232         t       2                             t
233                t
234                          - t          - t     - t
235        - t       - t   %e        2  %e      %e
236  + 2 %e   , t (%e    - -----) + t  (----- - -----)
237                          t            2       t
238                2   - t            - t     - t
239      - t      t  %e        2    %e      %e        - t
240  + %e   ], [- --------, - t  (- ----- - ----- + %e   ),
241                  2                t       2
242                                          t
243         - t     - t      2   - t
244    2  %e      %e        t  %e          - t
245 - t  (----- - -----)], [-------- - t %e   ,
246         2       t          2
247         - t     - t                           - t
248  2    %e      %e        - t           - t   %e
249 t  (- ----- - ----- + %e   ) - t (2 %e    - -----),
250         t       2                             t
251                t
252       - t     - t                 - t
253  2  %e      %e            - t   %e
254 t  (----- - -----) - t (%e    - -----)])
255       2       t                   t
256 (%i4) ratsimp(%);
257                [   2              - t ]
258                [ (t  + 2 t + 2) %e    ]
259                [ -------------------- ]
260                [          2           ]
261                [                      ]
262                [         2   - t      ]
263 (%o4)  Col 1 = [        t  %e         ]
264                [      - --------      ]
265                [           2          ]
266                [                      ]
267                [     2          - t   ]
268                [   (t  - 2 t) %e      ]
269                [   ----------------   ]
270                [          2           ]
271          [      2        - t    ]
272          [    (t  + t) %e       ]
273          [                      ]
274  Col 2 = [     2            - t ]
275          [ - (t  - t - 1) %e    ]
276          [                      ]
277          [     2          - t   ]
278          [   (t  - 3 t) %e      ]
279          [        2   - t       ]
280          [       t  %e          ]
281          [       --------       ]
282          [          2           ]
283          [                      ]
284          [      2          - t  ]
285  Col 3 = [    (t  - 2 t) %e     ]
286          [  - ----------------  ]
287          [           2          ]
288          [                      ]
289          [   2              - t ]
290          [ (t  - 4 t + 2) %e    ]
291          [ -------------------- ]
292          [          2           ]
294 @end example
297 Exemplo 2:
298 @example
299 (%i5) b1:matrix([0,0,1,1,1],
300                 [0,0,0,1,1],
301                 [0,0,0,0,1],
302                 [0,0,0,0,0],
303                 [0,0,0,0,0])$
305 (%i6) mat_function(exp,t*b1);
306                   [              2     ]
307                   [             t      ]
308                   [ 1  0  t  t  -- + t ]
309                   [             2      ]
310                   [                    ]
311 (%o6)             [ 0  1  0  t    t    ]
312                   [                    ]
313                   [ 0  0  1  0    t    ]
314                   [                    ]
315                   [ 0  0  0  1    0    ]
316                   [                    ]
317                   [ 0  0  0  0    1    ]
318 (%i7) minimalPoly(jordan(b1));
319                              3
320 (%o7)                       x
321 (%i8) ident(5)+t*b1+1/2*(t^2)*b1^^2;
322                   [              2     ]
323                   [             t      ]
324                   [ 1  0  t  t  -- + t ]
325                   [             2      ]
326                   [                    ]
327 (%o8)             [ 0  1  0  t    t    ]
328                   [                    ]
329                   [ 0  0  1  0    t    ]
330                   [                    ]
331                   [ 0  0  0  1    0    ]
332                   [                    ]
333                   [ 0  0  0  0    1    ]
334 (%i9) mat_function(exp,%i*t*b1);
335              [                           2 ]
336              [                          t  ]
337              [ 1  0  %i t  %i t  %i t - -- ]
338              [                          2  ]
339              [                             ]
340 (%o9)        [ 0  1   0    %i t    %i t    ]
341              [                             ]
342              [ 0  0   1     0      %i t    ]
343              [                             ]
344              [ 0  0   0     1        0     ]
345              [                             ]
346              [ 0  0   0     0        1     ]
347 (%i10) mat_function(cos,t*b1)+%i*mat_function(sin,t*b1);
348               [                           2 ]
349               [                          t  ]
350               [ 1  0  %i t  %i t  %i t - -- ]
351               [                          2  ]
352               [                             ]
353 (%o10)        [ 0  1   0    %i t    %i t    ]
354               [                             ]
355               [ 0  0   1     0      %i t    ]
356               [                             ]
357               [ 0  0   0     1        0     ]
358               [                             ]
359               [ 0  0   0     0        1     ]
360 @end example
362 Exemplo 3:
363 @example
364 (%i11) a1:matrix([2,1,0,0,0,0],
365                  [-1,4,0,0,0,0],
366                  [-1,1,2,1,0,0],
367                  [-1,1,-1,4,0,0],
368                  [-1,1,-1,1,3,0],
369                  [-1,1,-1,1,1,2])$
371 (%i12) fpow(x):=block([k],declare(k,integer),x^k)$
373 (%i13) mat_function(fpow,a1);
374                 [  k      k - 1 ]         [      k - 1    ]
375                 [ 3  - k 3      ]         [   k 3         ]
376                 [               ]         [               ]
377                 [       k - 1   ]         [  k      k - 1 ]
378                 [  - k 3        ]         [ 3  + k 3      ]
379                 [               ]         [               ]
380                 [       k - 1   ]         [      k - 1    ]
381                 [  - k 3        ]         [   k 3         ]
382 (%o13)  Col 1 = [               ] Col 2 = [               ]
383                 [       k - 1   ]         [      k - 1    ]
384                 [  - k 3        ]         [   k 3         ]
385                 [               ]         [               ]
386                 [       k - 1   ]         [      k - 1    ]
387                 [  - k 3        ]         [   k 3         ]
388                 [               ]         [               ]
389                 [       k - 1   ]         [      k - 1    ]
390                 [  - k 3        ]         [   k 3         ]
391          [       0       ]         [       0       ]
392          [               ]         [               ]
393          [       0       ]         [       0       ]
394          [               ]         [               ]
395          [  k      k - 1 ]         [      k - 1    ]
396          [ 3  - k 3      ]         [   k 3         ]
397          [               ]         [               ]
398  Col 3 = [       k - 1   ] Col 4 = [  k      k - 1 ]
399          [  - k 3        ]         [ 3  + k 3      ]
400          [               ]         [               ]
401          [       k - 1   ]         [      k - 1    ]
402          [  - k 3        ]         [   k 3         ]
403          [               ]         [               ]
404          [       k - 1   ]         [      k - 1    ]
405          [  - k 3        ]         [   k 3         ]
406          [    0    ]
407          [         ]         [ 0  ]
408          [    0    ]         [    ]
409          [         ]         [ 0  ]
410          [    0    ]         [    ]
411          [         ]         [ 0  ]
412  Col 5 = [    0    ] Col 6 = [    ]
413          [         ]         [ 0  ]
414          [    k    ]         [    ]
415          [   3     ]         [ 0  ]
416          [         ]         [    ]
417          [  k    k ]         [  k ]
418          [ 3  - 2  ]         [ 2  ]
419 @end example
421 Para usar essa função escreva primeiramente @code{load("diag")}.
422 @end deffn