You don't need graphs or area at all, of course. All you need is to notice that the frac(x/2) expression is a periodic function that is only integrable piecewise, and is easy to integrate with a change of variables for each piece or a handwave of such.
It's actually gnarly to write out a formal proof as a new student would do (it requires principle of induction to handle all the pieces), but easy for an expert to breeze through as trivial.
The makes it a bit of an unfair problem for a students trying to follow the rules of math. This is very common challenge for students making the transition to higher math, when they are taught rigorous proofs but before they learn that professionals mathematicians are rarely rigorous (except when there is disagreement about the truth of an "obvious" claim).
> All you need is to notice…
All you need is a magical inspiration from out of nowhere!
But if you don't happen to have that magical inspiration, the graph will make the periodicity visually obvious.
x/2 - floor(x/2) is the natural place to start because it's the smallest independent piece of the equation. Take a couple of minutes to plot this on a graph for a small range of values, like 0 <= x <= 6 (deciding what range to check is also part of your problem solving skillset).
With this, you can calculate and sketch out e^(above result) on a graph. Finally, knowing the principle that a definite integral calculates the area under the curve, you should be able to use your sketch to reason out how to calculate the entire original integral.
Hopefully you can see how solving this kind of problem isn't about knowing anything about this particular problem, but simply investigating it without any prior expectations, which is why the author thinks this is an interesting exercise for students.