diff(x.A.y,A) should be transpose(x).transpose(y)



On 7/21/10, Niitsuma Hirotaka <hirotaka.niitsuma at gmail.com> wrote:

> diff(x.A.y,A) should be transpose(x).transpose(y)
> But
> diff(x.A.y,A)
> => x.y

Well, that's a bug. Can you make a bug report at:
http://sourceforge.net/projects/maxima/bugs
(I think that's the right URL.)

Anyway how about this:

matchdeclare ([xx, yy, aa], nonscalarp);
'diff (xx . aa  . yy, aa);
tellsimp (''%, transpose (xx) . transpose (yy));

Here's an example.

declare ([u, v, M], nonscalar);
'diff (u . M . v, M);
 => (derivative expression)
''%;
 => transpose(u) . transpose(v)

Another one.

'diff (transpose (u) . M . u, M);
''%;
 => u . transpose(u)

Hope this helps

Robert Dodier