Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2007-03-14 22:14:36

Dharshi
Member
Registered: 2006-10-31
Posts: 56

Need help

Hi,

Help me to solve this problem.

S = 1^2 – 2^2 + 3^2 – 4^2 + ... -2002^2 + 2003^2

Offline

#2 2007-03-14 23:57:04

George,Y
Member
Registered: 2006-03-12
Posts: 1,379

Re: Need help

S=1+(3²-2²)+(5²-4²)+...+(2003²-2002²)

(a+1)²-a²=2a+1


X'(y-Xβ)=0

Offline

#3 2007-03-15 00:13:23

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Need help

I swear this question's been posted quite recently. Maybe it was just something similar.

Either way, the method that George shows will simplify the problem considerably. After that, you just need to do the summation.


Why did the vector cross the road?
It wanted to be normal.

Offline

#4 2007-03-15 17:54:43

Dharshi
Member
Registered: 2006-10-31
Posts: 56

Re: Need help

hmm.... It's still not clear to me.

Can you show me the steps? Or else is there any general formula to solve such kind of problems?

Offline

#5 2007-03-15 18:34:27

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Need help

A much worse* way to do it is to notice the table:

n | S
------
1 | 1
2 | -3
3 | 6
4 | -10
5 | 15

If you aren't familiar with this series, it is n(n+1)/2.  Very popular.  And it's negative if and only if n is even.  So 2003 is 2003(2003 + 1)/2 = 2007006.  I verified this with mathematicia.

*Worse, meaning what you are doing is making a guess as to what the sequence is without proving it.  Many sequences can be quite deceptive, and guesses aren't always right.  On the other hand, you could prove it by induction, which doesn't look too hard.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#6 2007-03-15 18:44:13

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Need help

Aw screw it, here is the induction proof.

Proof: This proof is by induction on n.

Base case:

Let n = 1.  Then S_1 = 1 = 1(1+1)/2.
Let n = 2.  Then S_2 = 1 - 4 = -3 = -2(2+1) / 2.

Inductive assumption:

Assume that |S_n| = n(n+1)/2 and that S_n is negative if and only if n is even.  Now show that |S_n+1| = (n+1)(n+2)/2 and that S_n+1 is negative if and only if n+1 is even.

First, let n be even.

S_n+1 = 1^2 - 2^2 + ... - n^2 + (n+1)^2 = -n(n+1)/2 + (n+1)^2 = -n(n+1)/2 + n^2 + 2n + 1 = (-n^2 - n + 2n^2 + 4n + 2)/2 = (n^2 + 3n + 2) / 2 = (n+1)(n+2)/2.  Note S_n+1 is positive.

Now let n be odd.

S_n+1 = 1^2 - 2^2 + ... + n^2 - (n+1)^2 = n(n+1)/2 - (n+1)^2 = (n^2 + n - 2n^2 - 4n - 2) / 2 = (-n^2 - 3n - 2) / 2 = -(n^2 + 3n + 2)/2 = -(n+1)(n+2)/2.  Note S_n+1 is negative.

Therefore, by the Principle of Mathematical Induction, |S_n| = n(n+1)/2 and S_n is negative if and only if n is even.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#7 2007-03-15 21:12:53

bluestar9cn
Member
Registered: 2007-03-04
Posts: 4

Re: Need help

S=1+(3²-2²)+(5²-4²)+...+(2003²-2002²)
S=1+5+9+13+17+...+4005
S=1+(1+4)+(1+4+4)+...+(1+4*2002/2)
S=1+(5+4005)*1001/2  (from 5 to 4005 we have 1001 items, 5+4005=9+4001=4010
S=1+2007005                                             , we have 1001/2 4010s.)
S=2007006

Last edited by bluestar9cn (2007-03-15 21:17:34)

Offline

#8 2007-03-16 03:23:36

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: Need help

Here’s another proof. big_smile

Suppose we’re summing to an odd number of terms, n = 2k+1 (k ≥ 0). So k = (n−1)⁄2

Putting a = 2r into George’s formula (and noting that the first term is 1 = 1²−0²) gives
the difference between each pair of successive terms as 4r+1.

For n = 2k (k ≥ 1) even, regroup the terms in S[sub]n[/sub] as −[(2² − 1²) + (4² − 3²) + …]

Putting a = 2r−1 into George’s formula gives 4r−1.

Offline

#9 2007-03-16 14:22:00

George,Y
Member
Registered: 2006-03-12
Posts: 1,379

Re: Need help

bluestar is co-rrect!


X'(y-Xβ)=0

Offline

#10 2007-03-16 15:07:24

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: Need help

Argh! I just realized I could have made my proof much shorter! lol

If n is even, then (n−1) is odd so I could have just used the formula I had calculated for odd sum:

Then S[sub]n[/sub] is just that plus −n[sup]2[/sup] (minus because the eventh term is negative):

I feel so stupid not to have seen that before. swear

Last edited by JaneFairfax (2007-03-16 15:07:58)

Offline

Board footer

Powered by FluxBB