Subject: Re: RE: [Maxima] derivatives of matrix functions
From: go_furuya at infoseek
Date: Fri, 05 Dec 2003 03:10:20 +0900
Hello
Rober said about derivatives of matrix
>Aside from #853720, there appears to be one other bug
>manifested here. d(X.w)/dw = A, indeed diff(X.w,w) returns X.
>However, d(w'.X)/dw is X', yet diff(transpose(w).X,w))
>returns X, not transpose(X).
These are reasonable,but is to diff with vector w to diff(some,w))?
norm2(x) is scalar,so usually we must take gradient or "exterior derivative" to obtain a special 1 form .
At this case,we use diff(some) and evaluate del(x),(del(a)is 0).
del() includes transpose imformation,I think.
Also we can calc it by definition,||f(x+h)-f(x)-lambda(h)||/||h||
-->0, lambda(h)is linear map,so alph.h.
Maybe we must write a suitable and easyusable differntial forms
package.
(C3) DISPLAY2D : FALSE
(C4) DOTDISTRIB:TRUE
(C5) dotexpsimp:FALSE
(C6) DOTSCRULES:TRUE
(C7) DOTASSOC:TRUE
(C8) DECLARE([x,y,a,w],NONSCALAR)
(C9) norm2(x):=TRANSPOSE(x) . a . x
(C10) TRANSPOSE(h+x) . a . (h+x)-TRANSPOSE(x) . a . x
(D10) 'TRANSPOSE(x) . a . h+'TRANSPOSE(h) . a . x+'TRANSPOSE(h) . a . h
(C11) DIFF(norm2(x))
(D11) 'DIFF('TRANSPOSE(x),x,1)*DEL(x) . a . x
+'TRANSPOSE(x) . DEL(a) . x+'TRANSPOSE(x) . a . DEL(x)
(C12) SUBST([DEL(a) = 0,DIFF(TRANSPOSE(x),x) = 1],%)
(D12) DEL(x) . a . x+'TRANSPOSE(x) . a . DEL(x)
(C13) a:MATRIX([1,0,1],[3,2,0],[1,2,1])
(C14) x:MATRIX([x1],[x2],[x3])
(C15) h:MATRIX([h1],[h2],[h3])
(C16) TRANSPOSE(h+x) . a . (h+x)-TRANSPOSE(x) . a . x
(D16) (x3+h3)*(x3+2*(x2+h2)+x1+h3+h1)-x3*(x3+2*x2+x1)+(x1+h1)*(x3+x1+h3+h1)
-x1*(x3+x1)+(x2+h2)*(2*(x2+h2)+3*(x1+h1))
-x2*(2*x2+3*x1)
(C17) LOAD("coeflist.lisp")
(C18) LOAD("format.lisp")
(C19) FORMAT(EXPAND(TRANSPOSE(h+x) . a . (h+x)-TRANSPOSE(x) . a . x),
%POLY(h1,h2,h3),%FACTOR)
(D19) h2*(2*x3+4*x2+3*x1)+h1*(2*x3+3*x2+2*x1)+2*h3*(x3+x2+x1)+h3^2+2*h2*h3
+2*h1*h3+2*h2^2+3*h1*h2+h1^2
(C20) TRANSPOSE(a) . x+a . x
(D20) MATRIX([2*x3+3*x2+2*x1],[2*x3+4*x2+3*x1],[2*x3+2*x2+2*x1])
(C21) % . h
(D21) h2*(2*x3+4*x2+3*x1)+h1*(2*x3+3*x2+2*x1)+h3*(2*x3+2*x2+2*x1)
furuya gosei
------------------------------------------------------------------------
$B1?;n$7!!:#$J$iEv$?$k$+!)!!(B5,000$B1_(B by infoseek
http://ap.infoseek.co.jp/mobile7.html