-1

I am a 10th grader in high school and my math teacher asked me to add from 1 to 100 and I came up with the formula $$f(x)=\frac{x}{2}\times x+\frac{x}{2}$$ and it gives me the exact answer to any number added up to that number. $F(100) = 5050$. What I want to know is this equivalent to $n(n+1)/2$ and if I indeed found another formula?

2 Answers2

3

Yes, this is equivalent to the standard formula.

$$ \frac{n(n+1)}{2} = \frac{n^2 + n}{2} = \frac{n^2}{2} + \frac{n}{2} = \frac{n}{2}\cdot n + \frac{n}{2} $$

MJD
  • 67,568
  • 43
  • 308
  • 617
2

Great job on your discovery! Yes, the formula you've found is indeed equivalent to $n(n+1)/2$. Here is a proof:

$$\begin{align*} f(x) &= ((x/2)\cdot x) + x/2 \\ &= \frac{x}{2}\cdot x + \frac{x}{2}\\ &= \frac{x^2}{2} + \frac{x}{2}\\ &= \frac{x^2 + x}{2}\\ &= \frac{x(x+1)}{2} \end{align*}$$

Then of course you would swap the variable $x$ for $n$, but there is no difference between computing $1 + 2 + \cdots +x$ versus $1+2+\cdots+n$.

Rob
  • 7,520