Formula for the alternating sum of the first n numbers.

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
3 replies · 11K views
Why?
Messages
6
Reaction score
0

Homework Statement


The alternating sum of the first five numbers is 1-2+3-4+5=3. Find a formula for the alternating sum of the first n numbers. How about the alternating sum of the squares of the first n numbers?


Homework Equations



Sum of the first n numbers. [itex]\frac{n(n+1)}{2}[/itex]

Sum of the first n even numbers. n(n+1)

Sum of the first n odd numbers. n2

The Attempt at a Solution



Sum of the first n alternating numbers if n is odd. [itex]{(\frac{n+1}{2}})^{2}-(\frac{n-1}{2})({\frac{n-1}{2}+1})[/itex]

Sum of the first n alternating numbers if n is even. [itex]{(\frac{n}{2}})^{2}-(\frac{n}{2})({\frac{n}{2}+1})[/itex]

I cannot figure out how to combine these two equations into one that will work for both odd and even n. I have not even begun the second part of the problem.
 
Physics news on Phys.org
Maybe you should consider the first few partial sums of the alternating series and find a formula from that.
 
Why? said:

Homework Statement


The alternating sum of the first five numbers is 1-2+3-4+5=3. Find a formula for the alternating sum of the first n numbers. How about the alternating sum of the squares of the first n numbers?


Homework Equations



Sum of the first n numbers. [itex]\frac{n(n+1)}{2}[/itex]

Sum of the first n even numbers. n(n+1)

Sum of the first n odd numbers. n2

The Attempt at a Solution



Sum of the first n alternating numbers if n is odd. [itex]{(\frac{n+1}{2}})^{2}-(\frac{n-1}{2})({\frac{n-1}{2}+1})[/itex]

Sum of the first n alternating numbers if n is even. [itex]{(\frac{n}{2}})^{2}-(\frac{n}{2})({\frac{n}{2}+1})[/itex]

I cannot figure out how to combine these two equations into one that will work for both odd and even n. I have not even begun the second part of the problem.

Do you know the formula for Sn(x) = sum{x^k,j=1..n}? Have you looked at the summation for Tn(x) = x*dSn(x)/dx? Can you see how to continue from there?

RGV