title: Maxima CAS : summation with symbolic upper limit n not simplifying when the upper limit is specified later with ev()
body: <p>The following two pieces of maxima code should be equivalent:</p>
  
  <pre><code>sum(x[i], i, 1, 2);
  ev(%, x[1] = 5, x[2] = 3);
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>sum(x[i], i, 1, n);
  ev(%, n = 2, x[1] = 5, x[2] = 3);
  </code></pre>
  
  <p>In the first case, maxima knows to evaluate the expression to 8. In the second case, it doesn't simplify and leaves me with a symbolic summation of x[i] for i = 1 to 2.</p>
  
  <p>Why is it that maxima is unable to recognize the second expression as being the same as the first?</p>
  
  <p>Short of hardcoding the answer (as in the first piece of code), how do I get maxima to fully evaluate a summation with indexed variables when evaluating a summation where the upper limit is specified later? </p>