Let $a>1$ be an integer. Give a non-integral expression in terms of $a$ for $F(a)=\displaystyle\int_1^a (-1)^{\lfloor x \rfloor} \lfloor x \rfloor^{-1} dx,$ where $\lfloor x\rfloor$ is the greatest integer less than or equal to $x.$

Sketch the graph $y = \frac{1}{\lfloor{x}\rfloor}$ for $x > 1.$

How does multiplying it by $(-1)^{\lfloor{x}\rfloor}$ change the graph?

An integral of a function is just the area under its graph.

Could you express the total area as a sum?

Plotting the function $y = (-1)^{\lfloor{x}\rfloor}\frac{1}{\lfloor{x}\rfloor}$ yields rectangles of width $1$ and height $-1, \frac{1}{2}, -\frac{1}{3}, \frac{1}{4}, -\frac{1}{5}, \ldots.$ Since an integral of a function is just the area under its graph, $F(a)=\sum_{i=1}^{a-1}\frac{(-1)^i}{i}.$