Moved to a computer instead of trying to answer on my phone.
Actually, I think the x = 0 case is not too bad. The key advantage is that each cos(3^n x) term is 1 at x =0. So for x=/=0, if we're arguing that f(x) is
close to f(0), we can always replace terms with 1, and know we're not making it worse. So take
xk=π/3k; split the sum into
∑0k−13−n/2cos(3nx)+∑k∞3−n/2cos(3nx), then for the first part just replace cos(3^n x) by 1, and explicltly sum the 2nd part and it should be easy to show (f(x_k)-f(0))/x_k is unbounded.
Edit: it would be nastier for the x=/=0 case because you could possibly have the difference caused by the "2nd part" of the sum cancelling with the diffference caused by the 1st part. But when x = 0 you know all the differences have to be in the same direction (i.e. whatever h is, cos(3^n h) is always <=1).