The Area of a Square

26 Jul 2019

Here's a funny idea. Suppose someone forgot the formula for the area of a square, known since antiquity to be

\begin{align*} \Large{ A_{square} } &= \Large{s \cdot s }\\ &= \Large{s^2.} \end{align*}

It's ok, we forget things all the time. So without knowing this, let's try to figure this out with calculus. First, let's loosely define a square to be a two-dimensional, four-sided shape with all sides of equal length, whose sides meet at 90-degree (right) angles.

Figure 1. Plot of a square of sides \(s\), with solid black representative rectangle of height \(s\) and width \(dx\) inscribed in the square, located in the first quadrant of the Cartesian plane, starting from the origin.

joIntegrateSquareArea.svg

INTEGRATION will be used to find the area under the curve. In this case, a flat (and rather boring) curve serves as the top boundary of the square, denoted by the solid black line, \(s\). Next, the area must be explicitly defined to include only the region contained inside the square, so the following boundary conditions are imposed:

\begin{align*} \Large{ 0 \le x \le s },\\ \Large{ 0 \le y \le s }. \end{align*}

We've restricted the area to be the closed (inclusive of endpoints) interval of \(0\) to \(s\) on both the \(x\) and \(y\)-axes, written compactly as \([0,s]\). The dotted line marks the right-most boundary of the square, closing off the area we want. Now, what's the black strip contained within the square? Let's imagine it to be a plank of Australian buloke wood flooring inside the square. It has a height \(s\), since it fits perfectly inside the square from top to bottom, and a width \(dx\). All we can say for now is that the plank has an infinitely small width of \(dx\) that can't be given an exact numerical value such as \(0.1\), \(0.01\), or even \(0.0000000001\). Also, the location of the plank highlighted inside Figure 1 is unimportant—it can be placed anywhere inside the bounded area of the square. So while \(dx\) can't be used immediately, it will be a critical component during the problem's construction.

Figure 2. Similar to Figure 1, but with representative rectangle removed, and replaced with many narrow bands inscribing and filling the square. The bands represent an infinite number of very small areas that are added together to find the whole area of the square. Don't bother counting or measuring the bands. That's not the point!

joIntegrateSquareAreaStrips.svg

The big idea with integration is that by dividing the area of the curve into infinitely many planks, calculating the area of each plank, and adding them together, you've then computed the total area under the curve. Think of each plank as a "piece of square." Combine and add all the pieces of the square together like a jigsaw puzzle, and you've got the whole square. Likewise, just as a pizza is divided into eight slices with each of your friends getting one slice, they can all be said to have a piece of the pizza. Now if everyone were to combine all the slices together (though highly unlikely), it would again form the whole pizza.

\begin{align*} \Large{A_{square}} &= \Large{ \int_0^s s\, dx } && \text{(1)}\\ &= \Large{ s\int_0^s dx } && \text{(2)}\\ &= \Large{ s \cdot [x]_{x=0}^{x=s} } && \text{(3)}\\ &= \Large{ s \cdot ([s] - [0]) } && \text{(4)}\\ &= \Large{ s \cdot s } && \text{(5)}\\ &= \Large{ s^2. } && \text{(6)} \end{align*}

Alright, time to construct the math. Line 1 sets up the integral that says starting from zero and ending with \(s\) along the \(x\)-axis, calculate each infinitely small plank of the area that has a height \(s\) and width \(dx\).

Line 2 is interesting. While \(s\) is a variable, it represents a number, any number you want that's \(\ge 0\). To be constant also means that it remains the same throughout the problem, and does not depend on the \(x\)-axis. Since \(s\) is independent of \(x\), it can be pulled outside of the integral and be used after the integral has been evaluated.

For line 3, recall what was said about the piece of square or piece of pizza. If you combined all the pieces of the square or pizza together, you get the whole square and whole pizza, respectively. In the same way, adding up all the pieces of \(dx\) becomes \(\Large{x}\).

In line 4, observe that in line 3, \(x\) is assigned a value of \(s\) on the top and \(0\) at the bottom. These are the limits of integration, or the upper and lower bounds of the interval, which is also placed at the ends of the fancy s-shaped integral sign (\(\int\)). Simply plug-in the top value into \(x\), and subtract from it the bottom value after it's been plugged-in for \(x\) as well, leaving a simple subtraction problem with \(s-0=s\).

While a trivial exercise, it still provides a fundamental understanding of what integration aims to achieve. Break up what you're trying to solve into very small pieces, get an answer for every small piece, then add all the pieces up to get an answer. The remaining lines reveal the area of the square to simply be the product of its sides, \(s^{2}\). Thankfully, no surprises there!

Proof by Induction for the Sum of Squares Formula

11 Jul 2019

Problem

Use induction to prove that Sidenotes here and inside the proof will provide commentary, in addition to numbering each step of the proof-building process for easy reference. They are not part of the proof itself, and must be omitted when written.

$$\sum_{k=0}^{n} k^{2} = \dfrac{n(n+1)(2n+1)}{6}$$

for all \(n \ge 0\).


NOTE: \(k\) is a placeholder variable representing each number in a series starting from \(0\), and up to and including \(n\). Shove the current value of \(n\) into \(k\), evaluate, and do the same for the next value of \(n\), etc. The "E"-shaped figure is an uppercase Sigma from the Greek alphabet. Because Sigma's spelled with an "s", it's used to represent a summation, or sum. The left-hand side (LHS) reads, "the sum from k equals zero to n of k squared."


1. Basis step Since the formula claims to work for all numbers greater than or equal to (\(\ge\)) \(0\), \(0\) must be tested on both sides. The series on the LHS states to start at \(0\), square \(0\), and stop. The RHS is simply plug and chug.

For \(n=0\), the left-hand side (LHS) yields:

$$\sum_{k=0}^{0} k^{2} = 0^{2} = 0.$$

And the right-hand side (RHS) yields:

$$\dfrac{0(0+1)(2 \cdot 0 + 1)}{6}=0.$$

So the equation holds on both sides for \(n=0\).

2. Assume the result for \(n\). With the Basis step verified in Step 1, we assume the result to be true for \(n\), and restate the original problem.

$$\sum_{k=0}^{n} k^{2} = \dfrac{n(n+1)(2n+1)}{6}.$$

3. Prove the result for \((n+1)\). "If you can show that the next thing exists in the current thing, then you've proved that the current thing works for all subsequent things."

\begin{align*} \sum_{k=0}^{n} k^{2} + (n+1)^{2} &= \dfrac{(n+1)((n+1)+1)(2(n+1)+1)}{6}\\ &= \dfrac{(n+1)(n+2)(2n+2+1)}{6}\\ &= \dfrac{(n+1)(n+2)(2n+3)}{6}. \end{align*}

NOTE: Recall that the sum of squares formula on the LHS starts at \(0\), ends after the n-th value is squared and added, and is supposedly equivalent to the algebra on the RHS. For the LHS and RHS to stay equal to each other, any changes made to one side must also be made to the other side. Adding, subtracting, multiplying, or dividing a number on the LHS, must also be done to the opposite side to preserve equality. Observe the last number in the sum of squares formula is \(n\), the "current thing." Since \(n\) can be any number we want that's \(\ge 0\), what would be the NEXT number after \(n\)?

That number would be \(\mathbf{(n+1)}\), or the "next thing" we'll try to coax out from the "current thing." And since we need to square the next number prior to adding it to the series, we'll have to add \(\mathbf{(n+1)^{2}}\) to both sides of the equation. But instead of tacking on \(\mathbf{(n+1)^{2}}\) to the RHS (we'll do this in the next step, the proof itself) as we did to the LHS, we're going to use the RHS of Step 2, and carefully insert and replace all instances of \(n\) with \(n+1\), and simplify. Since the formula claims to work for all \(n \ge 0\), then it should also work for \(n+1\), the next number after the n-th number.

So the proof in the next step must show that the result is equal to

\begin{align*} \dfrac{(n+1)(n+2)(2n+3)}{6}, \end{align*}

or the proof fails.


4. Proof Each line must be justified, beginning with the Induction Hypothesis, or what we're trying to prove. The rest is algebra and simplification. Notice in the next to last line of the proof, the result must look the same as what was found in Step 3. If pressed for time on a test and can't factor the cubic polynomial quickly, just go back to Step 3, F.O.I.L. and multiply out the terms on scratchpaper to see if the cubic polynomial is the same as what you got in Step 4. If they're equal, then you've got it, and can finish the proof with writing the cubic polynomial in factored form.

\begin{align*} \sum_{k=0}^{n} k^{2} + (n+1)^{2} &= \dfrac{n(n+1)(2n+1)}{6} + (n+1)^{2} && \text{(Induction Hypothesis)}\\ &= \dfrac{n(n+1)(2n+1)+6(n+1)^{2}}{6} && \text{(Algebra)}\\ &= \dfrac{(n^{2} + n)(2n+1)+6(n+1)(n+1)}{6} && \text{(Algebra)}\\ &= \dfrac{2n^{3} + n^{2} + 2n^{2} + n + 6n^{2} + 12n + 6}{6} && \text{(Algebra)}\\ &= \dfrac{2n^{3} + 9n^{2} + 13n + 6}{6} && \text{(Algebra)}\\ &= \dfrac{(n+1)(n+2)(2n+3)}{6}. && \text{(Algebra)} \end{align*}

5. Conclusion

This proves the result for \((n+1)\), so the result is true for all \(n \ge 0\) by induction. \(\Box\) The proof is finished with a concluding statement.


NOTE: Focusing on the algebra, what induction shows is that inserting the "next thing" into the "current thing" of the formula's RHS representation is equivalent to adding the square of the "next thing" to the "current thing." Amazing!

$$\dfrac{(n+1)(n+2)(2n+3)}{6} = \dfrac{n(n+1)(2n+1)}{6} + (n+1)^{2}.$$

Induction

05 Jul 2019

Consider the formula for computing the sum of squares:

$$\sum_{k=0}^{n} k^{2} = \dfrac{n(n+1)(2n+1)}{6}.$$

The formula says there are two ways to find a solution. The conventional way, shown by the left-hand side (LHS) of the equation, says that starting from 0, square 0, then add to it the square of 1, then add to it the square of 2, and continue adding subsequent squares to the series, finally stopping after the n-th number is squared and added. Then just add all the terms in the series together and get an answer.

For example, in calculating the sum of the squares up to and including 10, the LHS method is applied to yield:

$$0^{2} + 1^{2} + 2^{2} + 3^{2} + 4^{2} + 5^{2} + 6^{2} + 7^{2} + 8^{2} + 9^{2} + 10^{2} = 385.$$

Now the right-hand side (RHS) claims to get the same answer as the LHS simply by substituting the highest term (\(10\) in for \(n\)), and evaluating the expression. With skepticism, substituting and evaluating the RHS yields:

$$\dfrac{10(10+1)(2 \cdot 10 + 1)}{6} = \dfrac{10 \cdot 11 \cdot 21}{6} = \dfrac{2310}{6} = 385.$$

So while the formula appears to work for a specific example, does it also work with other numbers? Can we be absolutely sure it would work for the first thousand, million, billion, or even trillion square numbers? A reasonable idea would be to keep a continuously expanding (and large and dusty) book of calculations in the library that we could look up to be sure the formula works for a particular example. Just have a computer continuously calculate the sums of the squares using the LHS and RHS methods, and check to see if both sides equal each other. Surely, performing continuous calculations using larger and larger numbers provides more than ample evidence in proving that the formula is true and universal for other numbers!

In 1910, mathematicians Alfred North Whitehead and Bertrand Russell published Principia Mathematica to build and prove mathematical foundations from first principles. It took nearly 400 pages of symbolic logic to prove that \(1+1=2\).It turns out that in math, specific examples can't be used as proofs. In writing proofs, only variables, symbols, and previously proven ideas such as axioms, corollaries, lemmas, and theorems can be used as building blocks to show the truth or falsity of a statement. So how do we prove this? The good news is we have a powerful tool at our disposal which will rigorously prove and answer this question.

That tool, is INDUCTION. And here's my take on what it means:

"If you can show that the next thing exists in the current thing, then you've proved that the current thing works for all subsequent things."

In the next post, we'll see induction in action, and apply it in proving the sum of squares formula.

Previously