Use a proof by cases to show that $\lfloor n/2 \rfloor$ * $\lceil n/2 \rceil$ = $\lfloor \frac{n^2}{4} \rfloor$ for all integers $n$. Question
Use a proof by cases to show that $\lfloor n/2 \rfloor$ * $\lceil n/2 \rceil$ = $\lfloor \frac{n^2}{4} \rfloor$ for all integers $n$.
My Attempt:
I can only think of two cases, 


*

*$n/2 \in \mathbb{Z}$

*$n/2 \notin \mathbb{Z}$


First case is straightforward:
$\lfloor n/2 \rfloor = \lceil n/2 \rceil = n/2$,
$\frac{n}{2}*\frac{n}{2} = \frac{n^2}{4}$
Second case troubled me,
$\lceil n/2 \rceil = \lfloor n/2 \rfloor + 1\\
\lceil n/2 \rceil = \lfloor n/2 + 1\rfloor$
$n/2 - 1 \leq \lfloor n/2 \rfloor < n/2\\
n/2 \leq \lfloor n/2 + 1 \rfloor < n/2 + 1$
I multiply both inequalities,
$\frac {n^2 - 2n}{4} \leq \lfloor n/2 \rfloor * \lfloor n/2 + 1 \rfloor < \frac{n^2 + 2n}{4}$
I need to prove that $\lfloor n/2 \rfloor * \lfloor n/2 + 1 \rfloor$ should be at least $n^2 /4$ and less than $n^2 /4 + 1$, this ensures that if I floor that, it will be $n^2/4$, but I'm lost.
My second attempt, (I didn't think the top have anywhere to go). This time I used some epsilon $\epsilon \in (0, 1)$,
$\lfloor n/2 \rfloor = n/2 - \epsilon\\
\lceil n/2 \rceil = n/2 + 1 - \epsilon$
$\lfloor n/2 \rfloor * \lfloor n/2 + 1 \rfloor = (n/2 - \epsilon)*(n/2 + 1 - \epsilon)\\
= n^2/4 + n/2 - n*\epsilon/2 - n*\epsilon/2 - \epsilon + \epsilon ^ 2\\
= n^2/4 + n/2 - 2n\epsilon/2 + 2\epsilon^2/2\\
= n^2/4 + \frac{n-2n\epsilon - 2\epsilon + 2\epsilon^2}{2}$
The problem now is I need to prove that $\frac{n-2n\epsilon - 2\epsilon + 2\epsilon^2}{2}$ is between 0 and 1. I don't really think this one is the solution is either so I gave up.

So you've got the case when $n$ is even. When $n$ is odd, then $\lfloor n/2 \rfloor * \lceil n/2 \rceil = \frac{n - 1}{2} * \frac{n + 1}{2} = \frac{n^2 -1}{4}$.
We want to show that this equals the right hand side. Since $n^2/4 = (n/2)^2$, we can rewrite $n^2/4$ as $(m + 1/2)^2$ where $m$ is an integer, and $m = \frac{n-1}{2}$. Furthermore, $(m + 1/2)^2 = m^2 + m + 1/4$.
Observe that $\lfloor m^2 + m + 1/4 \rfloor = m^2 + m$ since $m$ is an integer. Let's go write $m^2 + m$ in terms of $n$:
$m^2 + m = \frac{(n-1)^2}{2^2} + \frac{n-1}{2} = \frac{n^2 - 2n + 1}{4} + \frac{2n - 2}{4} = \frac{n^2 -1}{4}$.
I hope that's not too roundabout. The important thing was to show that flooring $n^2/4$ is the same as subtracting $1/4$.
