In his book Calculus, Vol. 1, Tom Apostol writes the following proof for proving the following predicate by induction:
$$A(n): 1^2 + 2^2 + \cdots + (n - 1)^2 \lt \frac{n^3}{3}.$$
I have omitted the Base Case due to lack of specific relevance. An excerpt from the book's page:
Assume the assertion has been proved for a specific value of $n$, say $n = k$. That is, assume we have proved
$$A(k): 1^2 + 2^2 + \cdots + (k - 1)^2 \lt \frac{k^3}{3}$$
for a fixed $k \ge 1$. Now using this, we shall deduce the corresponding result for $k + 1:$
$$A(k + 1): 1^2 + 2^2 + \cdots + k^2 \lt \frac{(k + 1)^3}{3}.$$
Start with $A(k)$ and add $k^2$ to both sides. This gives the inequality
$$1^2 + 2^2 + \cdots + k^2 \lt \frac{k^3}{3} + k^2.$$
To obtain $A(k + 1)$ as a consequence of this, it suffices to show that
$$\frac{k^3}{3} + k^2 \lt \frac{(k + 1)^3}{3}.$$
But this follows at once from the equation
$$\frac{(k + 1)^3}{3} = \frac{k^2 + 3k^2 + 3k + 1}{3} = \frac{k^3}{3} + k^2 + k + \frac13.$$
Therefore, we have shown that $A(k + 1)$ directly follows from $A(k)$.
I can not understand the last two steps. Why do the expressions seem to flip on the inequality in step 4 such that $\frac{k^3}{3} + k^2$ is now on the other side of the less than symbol, and how does the final equation prove the assertion?
Thank you.
$A(k)$ states $$1^2 + \cdots + (k-1)^2 < \frac{k^3}{3}.$$ Adding $k^2$ to both sides yields $$1^2 + \cdots + k^2 < \frac{k^3}{3} + k^2.$$ If we prove $\frac{k^3}{3} + k^2 < \frac{(k+1)^3}{3}$ then we can tack this onto the end of the above inequality to get $$1^2 + \cdots + k^2 < \frac{k^3}{3} + k^2 < \frac{(k+1)^3}{3}$$ which is the desired inequality $A(k+1)$.
It remains to verify the unjustified claim $\frac{k^3}{3} + k^2 < \frac{(k+1)^3}{3}$. The final equation $\frac{(k+1)^3}{3} = \frac{k^3}{3} + k^2 + k + \frac{1}{3}$ in your post is just obtained by expanding $(k+1)^3$. The right-hand side is greater than $\frac{k^3}{3} + k^2$ since $k+1$ is positive.