SummationSteps - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Student[Basics]

 SummationSteps
 generate steps for evaluating summations

 Calling Sequence SummationSteps( expr ) SummationSteps( expr, implicitmultiply = true )

Parameters

 expr - string or expression implicitmultiply - (optional) truefalse output = ... - (optional) option to control the return value displaystyle = ... - (optional) option to control the layout of the steps

Description

 • The SummationSteps command accepts an expression that is expected to contain summations and displays the steps required to evaluate each summation given.
 • If expr is a string, then it is parsed into an expression using InertForm:-Parse so that no automatic simplifications are applied, and thus no steps are missed.
 • The implicitmultiply option is only relevant when expr is a string.  This option is passed directly on to the InertForm:-Parse command and will cause things like 2x to be interpreted as 2*x, but also, xyz to be interpreted as x*y*z.
 • The output and displaystyle options are described in Student:-Basics:-OutputStepsRecord. The return value is controlled by the output option.
 • This function is part of the Student:-Basics package.

Examples

 > $\mathrm{with}\left(\mathrm{Student}:-\mathrm{Basics}\right):$
 > $\mathrm{SummationSteps}\left(\mathrm{Sum}\left(i,i=1..n\right)\right)$
 $\begin{array}{lll}{}& {}& {\sum }_{{i}{=}{1}}^{{n}}{}{i}\\ \text{•}& {}& \text{Evaluate sum}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\sum _{i=1}^{n}{}i\\ {}& {}& \frac{{\left({n}{+}{1}\right)}^{{2}}}{{2}}{-}\frac{{n}}{{2}}{-}\frac{{1}}{{2}}\\ \text{•}& {}& \text{Simplify}\\ {}& {}& \frac{{1}}{{2}}{}{{n}}^{{2}}{+}\frac{{1}}{{2}}{}{n}\end{array}$ (1)
 > $\mathrm{SummationSteps}\left(1+2x+3\left(\mathrm{Sum}\left(2i,i=1..n\right)\right)\right)$
 $\begin{array}{lll}{}& {}& {1}{+}{2}{\cdot }{x}{+}{3}{\cdot }\left({\sum }_{{i}{=}{1}}^{{n}}{}{2}{\cdot }{i}\right)\\ \text{•}& {}& \text{Examine Sum}\\ {}& {}& {\sum }_{{i}{=}{1}}^{{n}}{}{2}{\cdot }{i}\\ \text{•}& {}& \text{Bring}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}2\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{outside of the sum}\\ {}& {}& {2}{}\left({\sum }_{{i}{=}{1}}^{{n}}{}{i}\right)\\ \text{•}& {}& \text{Evaluate sum}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\sum _{i=1}^{n}{}i\\ {}& {}& {2}{\cdot }\left(\frac{{\left({n}{+}{1}\right)}^{{2}}}{{2}}{-}\frac{{n}}{{2}}{-}\frac{{1}}{{2}}\right)\\ \text{•}& {}& \text{Multiply}\\ {}& {}& {\left({n}{+}{1}\right)}^{{2}}{-}{n}{-}{1}\\ \text{•}& {}& \text{Simplify}\\ {}& {}& {{n}}^{{2}}{+}{n}\\ \text{•}& {}& \text{This gives:}\\ {}& {}& {1}{+}{2}{\cdot }{x}{+}{3}{\cdot }\left({{n}}^{{2}}{+}{n}\right)\\ \text{•}& {}& \text{Simplify}\\ {}& {}& {3}{}{{n}}^{{2}}{+}{3}{}{n}{+}{2}{}{x}{+}{1}\end{array}$ (2)
 > $\mathrm{SummationSteps}\left(\left(\mathrm{Sum}\left(i,i=1..n\right)\right)+\mathrm{Sum}\left(j+2,j=4..18\right)+\left(\mathrm{Sum}\left(4\left(k+1\right),k=10..n\right)\right)\right)$
 $\begin{array}{lll}{}& {}& \left({\sum }_{{i}{=}{1}}^{{n}}{}{i}\right){+}{\sum }_{{j}{=}{4}}^{{18}}{}\left({j}{+}{2}\right){+}{\sum }_{{k}{=}{10}}^{{n}}{}\left({4}{\cdot }{k}{+}{4}\right)\\ \text{•}& {}& \text{Examine Sum}\\ {}& {}& {\sum }_{{i}{=}{1}}^{{n}}{}{i}\\ \text{•}& {}& \text{Evaluate sum}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\sum _{i=1}^{n}{}i\\ {}& {}& \frac{{\left({n}{+}{1}\right)}^{{2}}}{{2}}{-}\frac{{n}}{{2}}{-}\frac{{1}}{{2}}\\ \text{•}& {}& \text{Simplify}\\ {}& {}& \frac{{1}}{{2}}{}{{n}}^{{2}}{+}\frac{{1}}{{2}}{}{n}\\ \text{•}& {}& \text{This gives:}\\ {}& {}& \frac{{1}}{{2}}{}{{n}}^{{2}}{+}\frac{{1}}{{2}}{}{n}{+}{\sum }_{{j}{=}{4}}^{{18}}{}\left({j}{+}{2}\right){+}{\sum }_{{k}{=}{10}}^{{n}}{}\left({4}{\cdot }{k}{+}{4}\right)\\ \text{•}& {}& \text{Examine Sum}\\ {}& {}& {\sum }_{{j}{=}{4}}^{{18}}{}\left({j}{+}{2}\right)\\ \text{•}& {}& \text{Reindex the summation so it starts at 1}\\ {}& {}& {\sum }_{{j}{=}{1}}^{{15}}{}\left({j}{+}{3}{+}{2}\right)\\ \text{•}& {}& \text{Simplify and expand expression}\\ {}& {}& {\sum }_{{j}{=}{1}}^{{15}}{}\left({j}{+}{5}\right)\\ \text{•}& {}& \text{Apply the sum rule:}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\sum _{k=m}^{n}{}\left(\mathrm{a__k}+\mathrm{b__k}\right)=\left(\sum _{k=m}^{n}{}\mathrm{a__k}\right)+\left(\sum _{k=m}^{n}{}\mathrm{b__k}\right)\\ {}& {}& \left({\sum }_{{j}{=}{1}}^{{15}}{}{j}\right){+}\left({\sum }_{{j}{=}{1}}^{{15}}{}{5}\right)\\ \text{•}& {}& \text{Evaluate the}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{1st}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{sum}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\sum _{j=1}^{15}{}j\\ {}& {}& {120}\\ \text{•}& {}& \text{Evaluate the}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{2nd}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{sum}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\sum _{j=1}^{15}{}5\\ {}& {}& {75}\\ \text{•}& {}& \text{Substitute evaluated sums into the expression}\\ {}& {}& {120}{+}{75}\\ \text{•}& {}& \text{Simplify}\\ {}& {}& {195}\\ \text{•}& {}& \text{This gives:}\\ {}& {}& \frac{{1}}{{2}}{}{{n}}^{{2}}{+}\frac{{1}}{{2}}{}{n}{+}{195}{+}{\sum }_{{k}{=}{10}}^{{n}}{}\left({4}{\cdot }{k}{+}{4}\right)\\ \text{•}& {}& \text{Examine Sum}\\ {}& {}& {\sum }_{{k}{=}{10}}^{{n}}{}\left({4}{\cdot }{k}{+}{4}\right)\\ \text{•}& {}& \text{Reindex the summation so it starts at 1}\\ {}& {}& {\sum }_{{k}{=}{1}}^{{n}{-}{9}}{}\left({4}{\cdot }\left({k}{+}{9}\right){+}{4}\right)\\ \text{•}& {}& \text{Simplify and expand expression}\\ {}& {}& {\sum }_{{k}{=}{1}}^{{n}{-}{9}}{}\left({4}{}{k}{+}{40}\right)\\ \text{•}& {}& \text{Apply the sum rule:}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\sum _{k=m}^{n}{}\left(\mathrm{a__k}+\mathrm{b__k}\right)=\left(\sum _{k=m}^{n}{}\mathrm{a__k}\right)+\left(\sum _{k=m}^{n}{}\mathrm{b__k}\right)\\ {}& {}& \left({\sum }_{{k}{=}{1}}^{{n}{-}{9}}{}{4}{}{k}\right){+}\left({\sum }_{{k}{=}{1}}^{{n}{-}{9}}{}{40}\right)\\ \text{•}& {}& \text{Bring}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}4\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{outside of the}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{1st}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{sum}\\ {}& {}& {4}{}\left({\sum }_{{k}{=}{1}}^{{n}{-}{9}}{}{k}\right)\\ \text{•}& {}& \text{Evaluate the}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{1st}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{sum}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\sum _{k=1}^{n-9}{}k\\ {}& {}& {4}{\cdot }\left(\frac{{\left({-}{8}{+}{n}\right)}^{{2}}}{{2}}{+}{4}{-}\frac{{n}}{{2}}\right)\\ \text{•}& {}& \text{Multiply}\\ {}& {}& {2}{}{\left({-}{8}{+}{n}\right)}^{{2}}{+}{16}{-}{2}{}{n}\\ \text{•}& {}& \text{Evaluate the}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{2nd}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{sum}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\sum _{k=1}^{n-9}{}40\\ {}& {}& {40}{}{n}{-}{360}\\ \text{•}& {}& \text{Substitute evaluated sums into the expression}\\ {}& {}& {2}{}{\left({-}{8}{+}{n}\right)}^{{2}}{+}{16}{-}{2}{}{n}{+}\left({40}{}{n}{-}{360}\right)\\ \text{•}& {}& \text{Simplify}\\ {}& {}& {2}{}{{n}}^{{2}}{+}{6}{}{n}{-}{216}\\ \text{•}& {}& \text{This gives:}\\ {}& {}& \frac{{1}}{{2}}{}{{n}}^{{2}}{+}\frac{{1}}{{2}}{}{n}{+}{195}{+}\left({2}{}{{n}}^{{2}}{+}{6}{}{n}{-}{216}\right)\\ \text{•}& {}& \text{Simplify}\\ {}& {}& \frac{{5}}{{2}}{}{{n}}^{{2}}{+}\frac{{13}}{{2}}{}{n}{-}{21}\end{array}$ (3)
 > $\mathrm{SummationSteps}\left(\mathrm{Sum}\left(\frac{1}{n!},n=1..\mathrm{\infty }\right)\right)$
 $\begin{array}{lll}{}& {}& {\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{1}}{{n}{!}}\\ \text{•}& {}& \text{Apply the ratio test, which determines if the series diverges using}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\underset{n\to \mathrm{\infty }}{lim}{}\left|\frac{{a}_{n+1}}{{a}_{n}}\right|=L\\ {}& {}& \left(\begin{array}{c}{\text{If 0 ≤ L < 1 then}}{\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}{{a}}_{{n}}{\text{converges absolutely}}\\ {\text{If L > 1 then}}{\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}{{a}}_{{n}}{\text{diverges}}\\ {\text{If L = 1 then no conclusion is possible}}\end{array}\right)\\ \text{•}& {}& \text{So we get}\\ {}& {}& \underset{{n}{\to }{\mathrm{\infty }}}{{lim}}{}\left|\frac{\frac{{1}}{\left({n}{+}{1}\right){!}}}{\frac{{1}}{{n}{!}}}\right|\\ \text{•}& {}& \text{Simplify inside expression}\\ {}& {}& \underset{{n}{\to }{\mathrm{\infty }}}{{lim}}{}\left|\frac{{1}}{{n}{+}{1}}\right|\\ \text{•}& {}& \text{Take the limit}\\ {}& {}& {0}\\ \text{•}& {}& \text{Since the}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}0\le L\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{and}\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}L<1\phantom{\rule[-0.0ex]{1.0thickmathspace}{0.0ex}}\text{the infinte sum converges absolutely}\\ {}& {}& \left(\begin{array}{c}{\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{1}}{{n}{!}}{\text{converges}}\end{array}\right)\end{array}$ (4)

Compatibility

 • The Student:-Basics:-SummationSteps command was introduced in Maple 2024.
 • For more information on Maple 2024 changes, see Updates in Maple 2024.