Summation on HP 42S
|
09-24-2018, 12:56 AM
Post: #11
|
|||
|
|||
RE: Summation on HP 42S
(09-23-2018 09:25 PM)lrdheat Wrote: For something a little more complex such as summation 1 through 100 of x^2 - 3*x, Let us rewrite this expression as: \(\begin{align*} x^2 - 3x &= x^2 - x - 2x \\ &= x(x-1) - 2x \\ &= 2\frac{x(x-1)}{2} -2\frac{x}{1} \\ &= 2\binom{x}{2} - 2\binom{x}{1} \end{align*}\) The summation leads to: \(\sum_{x=1}^{n} 2\binom{x}{2} - 2\binom{x}{1} = 2\binom{n+1}{3} - 2\binom{n+1}{2} = 2\left ( \binom{n+1}{3}-\binom{n+1}{2} \right )\) This program can be used to calculate the sum: Code: 00 { 18-Byte Prgm } Quote:Produces 323,200 in ~25 seconds I haven't tested but I assume it's a bit faster than that. Cheers Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)