I'm solving a problem and, in order to run test case, I need a function $ b(x,y) $ that satisfies:
$$ \int_0^L \int_0^H b(x,y) \, dx \, dy = 0 $$
and
$$ \int_0^L \int_0^H b(x,y) \cos \left(\frac{n \, \pi \, x}{L} \right) \cos \left(\frac{m \, \pi \, y}{H} \right) \, dx \, dy \ne 0 \quad \text{for} \quad n=1,2,3,... \quad \text{and} \quad m=1,2,3,... $$
I tried many functions and I couldn't find a function that the second integral is not zero.
And if you use $$ b(x,y)=\sum_{k,l}c_{kl}\cos (\frac{k\pi x}{L})\cos (\frac{l\pi x}{H}). $$ The term with $c_{nm}$, $n\neq 0$, $m\neq 0$ certainly does not vanish. If you want a closed form (not a series) I can hardly believe that such a function does not exist.