Hello,
I am working with the least squares method, I would like to differentiate a
sum as follows and I am having problems.
What I want to achieve:
-define a sum
-differentiate it with respect to "a" and "b" respectively.
-solve the resulting system.
*exp:sum((y_i-a*x_i-b)^2,i,1,n);
one:diff(exp,a,1)=0;
two:diff(exp,b,1)=0;
linsolve([one, two], [a,b]);
*
Can anyone please help?
Thanks in advance,
Julien.