Hello sage community, i'm new to sage, i would like to use it to double check some computations i have done, however i have some problems with simplifying expressions involving sums. Let
>> alpha,t,i,j,k = var( 'alpha','t','i','j','k') >> def p1(alpha, t): >> return alpha * sum(exp(-alpha/2*i)*exp(-alpha*(t-1-i)),i,0,t-1) >> show(p1(alpha,t)) this works. the geometric series is worked out correctly ;-) however, let >>def p2(alpha, t): >> return 1/2* alpha * sum(exp(-alpha/3*j)*p1(alpha,t-1-j),j,0,t-1) >>show(p2(alpha,t).factor()) i obtain >>-1/2*alpha^2*sum(-(e^(3/2*alpha*j + 5/2*alpha) - e^(alpha*j + >>1/2*alpha*t + 2*alpha))*e^(-5/6*alpha*j - alpha*t), j, 0, t - >>1)/(e^(1/2*alpha) - e^alpha) where the sum is not computed explicitly. doing some simple algebra by hand, just factoring out terms form sum which do not depend on the summation index, i would obtain a simpler expression, where j disappears (which is what i want to obtain). i only need to factor out terms and apply the formula for geometric series. eventually i would expect something like (algebra should be fine): >>show(1/2*alpha^2*exp(- alpha*t+2*alpha)*(e^(alpha/2) *(e^(2/3*alpha*t) -1 >>>>)/(e^(2/3*alpha) -1 ) - e^(alpha/2*t) * (e^(1/6*alpha*t) -1 >>)/(e^(1/6*alpha) -1 )) >>/(e^(1/2*alpha) - e^alpha)) is there a way to force sage to do such simplifications? thanks for your help, ciao, luigi -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
