Clear[ f, l, a, q, r, s, x, y, z, i]
f[x_, y_, z_] = (1/l)Sqrt[ 1/a] Sin[ q Pi x/a] Sin[ r Pi y/l] Sin[ s Pi z /l ] ;
$Assumptions = q  ∈ Integers  && r  ∈ Integers  &&  s∈ Integers  && a > 0 && l > 0   ;
i = Integrate[ f[x, y, z]^2, {x, -a, a}, {y, -l, l}, {z, -l, l}]

Integrate[ Sin[ q Pi (x-a)/ (2a)]^2, {x, -a, a}]

(*Plot[ Evaluate@Table[ Cos[n Pi x/2], {n, 1, 4}], {x, -1, 1}]*)