# Probability of finding a particle in a region in a state given for a wave function plus a constant

This is the problem:

A particle is restrained to move in 1D between two rigid walls localized in x=0 and x=a. For t=0, it’s described by:

$$\psi(x,0) = \left[\cos^{2}\left(\frac{\pi}{a}x\right)-\cos\left(\frac{\pi}{a}x\right)\right]\sin\left(\frac{\pi}{a}x\right)+B$$

For $$t>0$$, determine the probability of finding the particle between 0 and $$\frac{a}{4}$$.

So, using some trigonometry and the orthonormal base $$\phi_{n}(x)=\sqrt{\frac{2}{a}}\sin(\frac{n\pi}{a}x)$$, I can write the wave function as:

$$\psi(x,0)=\sqrt{\frac{a}{32}}\phi_{1}(x)+\sqrt{\frac{a}{8}}\phi_{2}(x)+\sqrt{\frac{a}{32}}\phi_{3}(x)+B$$

I still can’t use the evolution operator. I must find an expression to $$B$$, so I can put it in terms of the base.

I use: $$B=\sum_{n} C_{n}\phi_{n}(x)$$ where, after finding the value of $$C_{n}$$, and noticing that only odd values of n contributes to the wave function:

$$B\rightarrow -\frac{B}{\pi}\sqrt{8a}\sum_{0}^{\infty}\frac{1}{2n+1}\phi_{2n+1}(x)$$

So now, how could I add a constant to the wave function so it’s normalized? It’s just finding the value $$B$$ using $$\langle\psi|\psi\rangle$$? Or there is other way? Because using $$\langle\psi|\psi\rangle$$ I get a quadratic, and I’m not sure that is the way.

In a $1D$ box your wave function must vanish at $x=0,a$. In particular
$$\psi\left(x=0,t=0\right)=B=0$$