4

In Maxima 12.04.0 I have a sum

mysum : sum(u[i]^2, i, 1, N);

now I differentiate it

diff(mysum, u[i]);

now I specify a defined index i=A to differentiate it at

at(%, i=A);

Unfortunately maxima won't replace the u[i] in the sum that way.

How can I bring maxima to a result like

2*u[A]
Benvorth
  • 7,416
  • 8
  • 49
  • 70

1 Answers1

0

After you differentiate, push the 2 into the sum, pick out the i-th term, and then substitute i=A:

(%i1) mysum : sum(u[i]^2, i, 1, N);
      diff(mysum, u[i]);
      intosum(%);
      part(%, 1);
      %, i=A;
Fred Senese
  • 660
  • 5
  • 9