Hi James,
I think you have the setting simplify_sum:true. After I tried setting
it to true (it was false by default on my machine), then I got it
working as well.
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 James Cloos <cloos at jhcloos.com>:
>>>>>> "GA" == Grze? Andruszkiewicz <gandrusz at gmail.com> writes:
>
> GA> 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);
> GA> diff(%, a);
>
> I get:
>
> :; rmaxima
> Maxima 5.26.0 http://maxima.sourceforge.net
> using Lisp SBCL 1.0.54
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) display2d:false;
>
> (%o1) false
> (%i2) 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);
>
> (%o2) ('sum(((c*X[i]+d)^2*t/2-(a*X[i]+b)*t+R[i])^2/(c*X[i]+d)^2,i,1,N))/t
> (%i3) diff(%, a);
>
> (%o3) -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,N)
> (%i4)
>
> -JimC
> --
> James Cloos <cloos at jhcloos.com> ? ? ? ? OpenPGP: 1024D/ED7DAEA6