How to make it work?



is'nt it what you would like to do?
calM[r](v):=q[r](v)*Phi[r](v)+p[r]*RQ[r](v)*q[r](v)*pi[n]$
SU[l]:=ev(sum(calM[r](v),r,1,l))
(C3) display2d:false;
(D3) FALSE
(C4) SU[2];
(D4) 
p[2]*PI[n]*q[2](v)*RQ[2](v)+PHI[2](v)*q[2](v)+p[1]*PI[n]*q[1](v)*RQ[1](v)
                                +PHI[1](v)*q[1](v)
rgds,
V

On Thursday 27 March 2003 17:07, Andrei Zorine wrote:
> Hello,
> please, I need advice. I get stuck every single step I make!
> (C1) display2d:false$
> I have a set of equations
> (C2)
> eq1:calM(v,r)=q[r](v)*Phi(v,r)+p[r]*R[r](v)*q[r](v)*pi[n]$
> where r=1,2,..,m. I want to sum up the equations:
> (C3) sum(eq1,r,1,m);
> (D3) 'SUM(calM(v,r) =
> q[r](v)*PHI(v,r)+PI[n]*p[r]*q[r](v)*R[r](v),r,1,m) It's
> nonsense! OK, I'll use two single quotes...
> (C4) sum(''lhs(eq1),r,1,m)=sum(''rhs(eq1),r,1,m);
> (D4) 'SUM(LHS(calM(v,r) =
> q[r](v)*PHI(v,r)+PI[n]*p[r]*q[r](v)*R[r](v)),r,1,m)
>         = 'SUM(RHS(calM(v,r) =
> q[r](v)*PHI(v,r)+PI[n]*p[r]*q[r](v)*R[r](v)),r,
> 	      1,m)
> What! But the manual says " - (two single quotes) causes an
> extra evaluation to occur." OK, let's do it manually...
> (C5) rhs1:rhs(eq1)$
> (C6) lhs1:lhs(eq1)$
> Now, I want to find the relationships between derivatives of
> calM and Phi. I plan to setup atvalue() for diff(q[r](v),v[s])
> etc... (C7) depends([calM,q,phi,R],v[s]);
> (D7) [calM(v[s]),q(v[s]),PHI(v[s]),R(v[s])]
> (C8) diff(sum(lhs1,r,1,m),v[s])=diff(sum(rhs1,r,1,m),v[s]);
> (D8) 'DIFF('SUM(calM(v,r),r,1,m),v[s],1)
>         = 'DIFF('SUM(q[r](v)*PHI(v,r)
> 		     +PI[n]*p[r]*q[r](v)*R[r](v),r,1,m),
> 	       v[s],1)
> Hmmm.... do i have to do *all of the work* manually??
> (C9) sum(diff(lhs1,v[s]),r,1,m)=sum(diff(rhs1,v[s]),r,1,m);
> (D9) 'SUM(DIFF(calM(v,r),v[s]),r,1,m)
>         = 'SUM(DIFF(q[r](v)*PHI(v,r)
> 		    +PI[n]*p[r]*q[r](v)*R[r](v),v[s]),r,1,
> 	      m)
>
>   :(((
>
> What variables should I turn to true/false to have sum and
> diff distribute over '=' sign, and then differentiate products
> inside sums? And hwe can I split sums later? I mean,
> sum(A+B,...) => sum(A,...)+sum(B,...)
>
> Thanks in advance
> --
> Andrei Zorine
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima