dyn said:
but then you state that for the symmetric potential well the basis vectors in momentum space are
cos(kx) and sin (kx)
I said that they are "basis vectors", yes. I did not say they are "
the basis vectors".
There is no unique set of basis vectors on a Hilbert space, any more than there are in ordinary Euclidean space. You can always do the equivalent of rotating the coordinates to make a new set of vectors the basis vectors. One way of doing that in the case under discussion would be to "rotate" from momentum space to position space. But another way is to "rotate" between different "orientations of axes" in momentum space. We can do that because, as I said, cosines and sines can be expressed as linear combinations of complex exponentials, and vice versa.
The basis in which the parity matrix ##P## is what you wrote in post #48 is the basis of complex exponentials in momentum space. In that basis, the column vector
$$
\begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}
$$
with the values of ##k## we chose, denotes the function ##e^{2ix}##, i.e., the complex exponential with ##k = 2##. The column vectors I wrote in post #50 are how you would write ##\cos x## and ##i \sin x##, i.e., the cosine and sine for ##k = 1##, in that same basis.
But you could rotate to a different basis, a basis in which ##\cos x## and ##i \sin x## were in the set of basis vectors. In that basis, the column vector
$$
\begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}
$$
would denote whichever one of the cosine or sine functions appeared first in the list of basis vectors. And in that basis, the matrix ##P## would have a different form. In fact, as I said in a previous post, it would be diagonal, with some of the diagonal entries being ##1## and some being ##-1##. The exercise I suggested previously is to figure out, first, what cosine and sine functions are in the list of basis vectors in this basis, and second, what is the exact form of the parity matrix ##P## in this basis.