In position space, ⌠ ∞ ❬φₙ❙Ψ❭ ≐ ⎮ dx φₙ⃰(x) Ψ(x). ⌡-∞ But for just 3L/4 to L, ⌠L ⎮ dx φₙ⃰(x) Ψ(x). ⌡3L/4 Since this is a particle in an infinite square well, φₙ(x) = √⎛2͟⎞ sin⎛n͟π͟x͟⎞ and Ψ(x) = ∑ cₙ φₙ(x). ⎝L⎠ ⎝ L ⎠ ⁿ So the probability to calculate is ⌠L ⎮ dx √⎛2͟⎞ sin⎛n͟π͟x͟⎞ ∑ cₙ φₙ(x). ⌡3L/4 ⎝L⎠ ⎝ L ⎠ ⁿ The evaluation of the last piece of this expression is elucidated by the identity sin(u)sin(v) = 1/2 (cos(u-v) - cos(u+v)), i.e. sin(2nπ) sin(³/₂nπ) = ¹/₂(cos(1/2nπ) - cos(7/2nπ)). So when n is odd, this product disappears, and when n is even one of the sin² terms disappears. The other sin² will always return 0, since regardless of the integer n, its argument is an integer multiple of π.