[Maxima-bugs] [ maxima-Bugs-1192935 ] term-substitution in function sum is too late From: SourceForge.net - 2005-04-30 11:10:09 ```Bugs item #1192935, was opened at 2005-04-30 04:10 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1192935&group_id=4933 Category: Xmaxima Group: Fix for 5.9.2 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: term-substitution in function sum is too late Initial Comment: (%i1) "Lower Riemann-Sum, Intervall [0,1], 10 parts"\$ (%i2) /*Function*/ f(x):=x^2\$ (%i3) /*area width*/ b: 1/10\$ (%i4) /*area depending on k=0,...,9*/ Ak: b*f(k*b)\$ (%i5) Ak; 2 k (%o5) ---- 1000 (%i6) /* wrong */ sum(Ak,k,0,9); 2 k (%o6) --- 100 obviously, we first have the summation and then the symbol-substitution (%i7) sum(''Ak,k,0,9); 57 (%o7) --- 200 finally, this is ok, but the usage of the double-quote is hard to explain to beginners. it gets even worse, if you use a function A(k):=k*f(k*b)\$ for a sum with n partitions: (%i8) "Lower Riemann-Sum, Intervall [0,1], n parts"\$ (%i9) /*area width*/ b:1/n\$ (%i10) /*area depending on k=0,...,n-1*/ A(k):=k*f(k*b)\$ (%i11) A(k); 3 k (%o11) -- 2 n (%i12) sum(A(k),k,0,n-1); n - 1 ==== (%o12) > A(k) / ==== k = 0 in that case you need ''(A(k)), a bracket and the double-quote. is it possible to patch the sum-function in that way, that we first have the term- or symbol-substitution and second the summation? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1192935&group_id=4933 ```