Question: differentiating with respect to an assigned variable within a sum()

Hi there,

Here's an example maple file with my problem:

f := a*b;
B[1] := a;
B[2] := b;

when I try...

sum((diff(f, B[j]))^2, j = 1 .. 2);

I just get the answer of zero instead of b+a.

Any idea why this is happening and how I might be able to fix it?

Regards,

-Mike Busuttil
University of Windsor
Drake Research Group
www.sharcnet.ca/drake

PS. how do I type in different colours in these formus without going to HTML source mode?

Please Wait...