Hi,
Thanks for a prompt reply. I actually managed to get it working by
setting simplify_sum:true. But now I am trying to solve for first
order conditions:
2*sum((X[i]*(((c*X[i]+d)^2*t)/2-(a*X[i]+b)*t+R[i]))/(c*X[i]+d)^2,i,1,M)=0
solve(%, a)
which gives:
[sum(((c^2*X[i]^3+(2*c*d-2*a)*X[i]^2+(d^2-2*b)*X[i])*t+2*R[i]*X[i])/(2*c^2*X[i]^2+4*c*d*X[i]+2*d^2),i,1,M)=0]
instead of splitting the sum into 2 sums (1 dependent on a and the
other not) and dividing accordingly. Any ideas how to achieve this?
Cheers,
Grzegorz
2012/1/13 Robert Dodier <robert.dodier at gmail.com>:
> On 1/13/12, Grze? Andruszkiewicz <gandrusz at gmail.com> wrote:
>
>> I have the following sum:
>> sum((R[i]-(a*X[i]+b)*t + 1/2*(c*X[i]+d)^2*t)^2/((c*X[i]+d)^2*t), i, 1, N);
>>
>> which I want to differenciate wrt. a:
>>
>> diff(%, a);
>>
>> but Maxima (wxMaxima to be precise) just prints d/da <my sum>. Can I
>> make it actually differentiate the sum (so because N is finite is
>> should differentiate every element in the sum separately)?
>
> Well, there isn't a built-in function to carry out that operation,
> but I think it can be implemented via simplification rules
> (tellsimp, defrule, etc). I think this has come up before -- take
> a look at the mailing list archive.
> See: http://maxima.sourceforge.net/maximalist.html
>
> best
>
> Robert Dodier