Trying to figure out an expression for adding exponents

In summary, the conversation discusses trying to find a formula for the sum of the squares of the first n consecutive integers. The topic of "The Calculus of Finite Differences" is mentioned as a general method for solving such problems. The formula for the sum of squares is given as \sum_{i=1}^n i^2 = \frac{1}{3} n^3 + \frac{1}{2} n^2 + \frac{1}{6} n, and the method for finding the sum of integers to the power p is explained. The conversation also explores different methods and patterns, but ultimately the desired formula has not been found yet.
  • #1
mesa
Gold Member
695
38
Basically I am trying to find an expression that can add exponents. Here is an example, let's say we start with n=5, I need something that will calculate 5^2+4^2+3^2+2^2+1^1 by putting in whatever value for n that I choose.

So far I have
n^3+n^2(n-1)+n(n-1)

The end, n(n-1) isn't working quite right. I need to get it to be the same as (n-1) as in the example using n=5 above, or in other words
n(n-1) = 4^2+3^2+2^2+1^2
which it doesn't lol

Looking at it, I am basically running into the same issue again and may need to just start from scratch lol, what do you think?
 
Mathematics news on Phys.org
  • #2
mesa said:
Basically I am trying to find an expression that can add exponents.

That isn't a good title for what you're doing. You're trying to figure out a closed form formula for the sum of the squares of the first n consecutive integers. I'll assume you're interested in the general method for solving such problems because you could have looked this formula up easily (and someone will probably post the answer). The general topic you should look up is "The Calculus of Finite Differences".
 
  • #3
The sum of a series of squares will be some cubic function. In this case:

[tex]\sum_{i=1}^n i^2 = \frac{1}{3} n^3 + \frac{1}{2} n^2 + \frac{1}{6} n[/tex]

Link to articles with various methods to solve this:

http://en.wikipedia.org/wiki/Square_pyramidal_number

sum_of_squares.html

For the sum of cubes:

http://en.wikipedia.org/wiki/Cubic_number

One general method for finding the sum of integers to the power p:

[tex]\sum_{i=1}^n i^p = c_{p+1} \ n^{p+1} + c_{p} \ n^{p} + c_{p-1} \ n^{p-1} + ... c_{1} \ n[/tex]
Generate p+1 equations using the numbers 1 to p+1, then use linear algebra to solve for the p+1 coefficients.
 
Last edited:
  • #4
Stephen Tashi said:
I'll assume you're interested in the general method for solving such problems because you could have looked this formula up easily

That is correct; it's more fun to try to derive it, anyone can use Google lol.

The first part I did is pretty useless really [n^3-n^2(n-1)] because what is left out of the formula will have to start out with the next integer down, basically it's an overly complicated way of stating [n^3-n^2(n-1)] = n^2 but it may still be helpful for the remainder.

Stephen Tashi said:
That isn't a good title for what you're doing. You're trying to figure out a closed form formula for the sum of the squares of the first n consecutive integers.

Hah, yeah your title is better than mine lol.
 
  • #5
rcgldr said:
The sum of a series of squares will be some cubic function. In this case:

[tex]\sum_{i=1}^n i^2 = \frac{1}{3} n^3 + \frac{1}{2} n^2 + \frac{1}{6} n[/tex]

Link to articles with various methods to solve this:

http://en.wikipedia.org/wiki/Square_pyramidal_number

sum_of_squares.html

Very good information, although I'm more interested in trying to derive it.

Here is the formula as it sat, n^3-n^2(n-1)+[n(n^2+1)]/2
The first part really can be simplified giving n^2+[n(n^2+1)]/2 with the nuts and bolts of it being [n(n^2+1)]/2; so I'm tossing out the beginning but now it's way off.

There is a pattern in the outcomes when plugging in values for n, for example at:

n=1 it works (no surprise)
n=2 it works
n=3 answer off by 1
n=4 " 4
n=5 " 10
n=6 " 20
n=7 " 35
n=8 " 56
n=9 " 84
n=10 " 120

So maybe we just need a formula that will give these values for each integer and tack it on then simplify? This is assuming the first part of the formula will let us do that lol
 
  • #6
rcgldr said:
One general method for finding the sum of integers to the power p:
[tex]\sum_{i=1}^n i^p = c_{p+1} \ n^{p+1} + c_{p} \ n^{p} + c_{p-1} \ n^{p-1} + ... c_{1} \ n[/tex]
Generate p+1 equations using the numbers 1 to p+1, then use linear algebra to solve for the p+1 coefficients.

mesa said:
Very good information, although I'm more interested in trying to derive it. ... pattern ... formula that will give these values
The general method I mentioned before is how these type of series are usually converted into polynomials. It's essentially using a pattern of values, usually 1 through p+1 to generate the p+1 equations I mentioned before.
 
  • #7
rcgldr said:
The general method I mentioned before is how these type of series are usually converted into polynomials. It's essentially using a pattern of values, usually 1 through p+1 to generate the p+1 equations I mentioned before.

Oh okay, I'm not familiar with that. What is c? How does p work?

I tried a different method and thought I was doing pretty well and got:

[n^3-3n^2+16n-20]/2

until I realized it only calculated for values 3≤n≤5 lol
Then a familiar pattern re-emerged
n=6 answer was off by 1
n=7 " " " " 5
n=8 " " " " 14
n=9 " " " " 30
n=10 " " " " 55
etc etc etc

In other words this formula is just a complicated way of pushing the same problem I am trying to solve except now it starts at n=6 with the value being n^2+(n-5)^2; pretty funny!

It seems the direction I am going will only continue to push the formula further down for a given n value so it doesn't seem like a good idea to continue in this direction.

I was thinking about doing some hard calculations for n values and look for patterns in percentage differences next and try to derive a formula from that.

Any thoughts?
 
Last edited:
  • #8
rcgldr said:
The general method I mentioned before is how these type of series are usually converted into polynomials. It's essentially using a pattern of values, usually 1 through p+1 to generate the p+1 equations I mentioned before.

mesa said:
Oh okay, I'm not familiar with that. What is c? How does p work?
c is just a set of coefficients to a polynomial. p is the power of i used in the summation series. There are p+1 terms, so you need to generate p+1 equations, then use linear algebra (or matrices) to solve for the coefficients c.

Using the original post as an example, 12 + 22 + 32 + ... + n2, p = 2, and you need p+1 = 3 equations to determine the coefficients for
c3 n3 + c2 n2 + c1 n, using the values 1 through 3 for n:

c3 13 + c2 12 + c1 1 = 12 = 1
c3 23 + c2 22 + c1 2 = 12 + 22 = 5
c3 33 + c2 32 + c1 3 = 12 + 22 + 32 = 14

01 c3 + 01 c2 + 01 c1 1 = 01
08 c3 + 04 c2 + 02 c1 2 = 05
27 c3 + 09 c2 + 03 c1 3 = 14

then solving for the c's: c3 = 1/3, c2 = 1/2, c1 = 1/6, resuting in (1/3) n3 + (1/2) n2 + (1/6) n.
 
Last edited:
  • #9
rcgldr said:
c3 13 + c2 12 + c1 1 = 12 = 1
c3 23 + c2 22 + c1 2 = 12 + 22 = 5
c3 33 + c2 32 + c1 3 = 12 + 22 + 32 = 14

01 c3 + 01 c2 + 01 c1 1 = 01
08 c3 + 04 c2 + 02 c1 2 = 05
27 c3 + 09 c2 + 03 c1 3 = 14

then solving for the c's: c3 = 1/3, c2 = 1/2, c1 = 1/6, resuting in (1/3) n3 + (1/2) n2 + (1/6) n.

WOW! This works remarkably well and makes a great deal of sense! My hat goes off to you rcgldr :) I'm also glad to see I was on the right track with n^3!

I see I was getting close using a different approach, although it's similar to this method. I think I will follow it through and see how well it works by comparison when i am done; that is if I can get there lol!
 

1. What is an exponent?

An exponent is a number that indicates how many times a base number should be multiplied by itself. It is written as a superscript to the right of the base number.

2. How do I add exponents with the same base?

To add exponents with the same base, you simply keep the base the same and add the exponents together. For example, 23 + 25 = 28.

3. What if the bases are different?

If the bases are different, you cannot add the exponents directly. Instead, you will need to rewrite the exponents as powers of the same base before adding them. For example, 32 + 42 = (32)2 + (42)2 = 92 + 162 = 81 + 256 = 337.

4. Can I add exponents with negative numbers?

Yes, you can add exponents with negative numbers. When adding exponents with negative numbers, you can either rewrite the exponents as fractions or use the power rule to simplify the expression. For example, (-2)3 + (-2)4 can be rewritten as (-2)3 + (-2)2 x (-2)2 = (-2)3 + 4 x (-2)2 = (-8) + 16 = 8. Alternatively, you can use the power rule to rewrite the expression as (-2)3+4 = (-2)7 = -128.

5. Can I add exponents with variables?

Yes, you can add exponents with variables. When adding exponents with variables, you can use the same rules as adding exponents with numbers. Just make sure that the variables have the same base and are raised to the same power before adding them together. For example, x2 + x3 = x2+3 = x5.

Similar threads

  • General Math
Replies
4
Views
2K
Replies
5
Views
2K
Replies
7
Views
1K
Replies
6
Views
1K
  • General Math
Replies
1
Views
1K
Replies
5
Views
844
  • General Math
Replies
2
Views
1K
  • General Math
Replies
5
Views
1K
Replies
1
Views
761
Replies
55
Views
3K
Back
Top