# Dirac notation, integral and change of basis

Suppose, I have some operator $$\hat{A}$$, such that in the $$x$$-basis, it is written as $$f(x).$$ I'm trying to calculate the expectation value of this operator in integral form. That is given by the following expression :

$$\langle\hat{A}\rangle = \int\psi^*(x)f(x)\psi(x)dx$$

We have assumed that the wave function is normalized here.

In this case, we have done the entire integral in the $$x$$-basis. I suppose, we can actually write the above integral as : $$\langle\hat{A}\rangle = \int\langle \psi|x\rangle\langle x|\hat{A}|x\rangle\langle x|\psi\rangle dx$$

However, suppose my wave function evolves and becomes $$\psi(u)$$, where $$u=g(x)$$. We can try to find the expectation value of this new wave function. We know : $$\langle\hat{A}\rangle = \frac{\int\psi^*(u)f(x)\psi(u)dx}{\int\psi^*(u)\psi(u)dx}$$

However, we need to change the variable of integration to $$u$$, and so we do the following:

$$\langle\hat{A}\rangle = \frac{\int\psi^*(u)f\space o\space g^{-1}(u)\psi(u)\frac{du}{g' \space o \space g^{-1}(u)}}{\int\psi^*(u)\psi(u)\frac{du}{g' \space o \space g^{-1}(u)}}$$

Now we can evaluate the integral, as everything is in the $$u$$ basis.

However, what we did here is first write the integral in the $$x$$ basis, and then use suitable transformations to make $$u$$ the variable of integration. However, how can I write the integral directly in the $$u$$ basis.

For example, we know: $$\langle\hat{A}\rangle=\frac{\langle\psi|\hat{A}|\psi\rangle}{\langle\psi|\psi\rangle}$$

I suppose we can insert any basis here in the following way:

$$\langle\hat{A}\rangle=\frac{\langle\psi|x\rangle\langle x|\hat{A}|x\rangle\langle x|\psi\rangle}{\langle\psi|x\rangle\langle x|\psi\rangle}=\frac{\langle\psi|u\rangle\langle u|\hat{A}|u\rangle\langle u|\psi\rangle}{\langle\psi|u\rangle\langle u|\psi\rangle}$$

Moreover, $$\frac{\langle\psi|x\rangle\langle x|\hat{A}|x\rangle\langle x|\psi\rangle}{\langle\psi|x\rangle\langle x|\psi\rangle}=\int\psi^*(x)f(x)\psi(x)dx$$

Hence, we must have :

$$\frac{\langle\psi|u\rangle\langle u|\hat{A}|u\rangle\langle u|\psi\rangle}{\langle\psi|u\rangle\langle u|\psi\rangle}=\frac{\int\psi^*(u)f\space o\space g^{-1}(u)\psi(u)\frac{du}{g' \space o \space g^{-1}(u)}}{\int\psi^*(u)\psi(u)\frac{du}{g' \space o \space g^{-1}(u)}}$$

Now I can see that $$f(x)$$ is replaced by $$f\space o\space g^{-1}(u)$$, as this is the representation of the operator in the $$u$$ basis. However there is also a $$g'\space o \space g^{-1}(u)$$ term below the differential $$du$$.

My question is, where is this factor coming from ? How do we formulate the entire thing using dirac notation ? I know the initial equation in terms of the $$x$$ basis, and so I use the transformations to convert the integral into the $$u$$ basis. This can be shown as :

$$\langle \hat{A}\rangle=\frac{\int\psi^*(g(x))f(x)\psi(g(x))dx}{\int\psi^*(g(x))\psi(g(x))dx}=\frac{\int\psi^*(u)f\space o\space g^{-1}(u)\psi(u)\frac{du}{g' \space o \space g^{-1}(u)}}{\int\psi^*(u)\psi(u)\frac{du}{g' \space o \space g^{-1}(u)}}$$

Using Bra-Ket notation, I can write the integral in $$x$$ basis, and then transform it into the $$u$$ basis. However, I don't see how to write the integral directly in the $$u$$ basis, using Bra-ket notation. It is clear to me, how the expression of the operator changes in the Bra-ket notation, in the new basis. However, it is unclear to me where the factor under the differential comes from, if we try to write the integral directly using Bra-Ket notation.

I hope I've been able to explain my confusion. Any help would be highly appreciated.

EDIT:

My initial intuition is that the term under the differential $$du$$ is the weight factor of the integral. However, I have no idea how it is represented in Dirac notation. For example, in the $$x$$ basis, the weight factor is clearly $$1$$ as there is nothing under the differential $$dx$$. Where does this come from in Dirac notation to integral notation conversion?

• Oct 24, 2021 at 22:49
• @CosmasZachos yeah, but this is a different question somewhat. Here, I'm asking about how to represent the entire thing in Dirac notation, as in, where do the individual integral terms originate from in Bra-ket notation. For example, $\langle u|\hat{A}|u \rangle = f\space o\space g^{-1}(u)$ and $\langle u|\psi\rangle = \psi(u)$. However, where does the term under the differential $du$ come from in Dirac notation ? Oct 24, 2021 at 22:53
• You might need some integrals in the "Moreover" expression... Furthermore, you might denote the states the expectation values are for, since they are distinctly different. Oct 24, 2021 at 23:15
• It looks like you read too quickly. 1. Inserting a complete set of states means inserting $\int dx \left | x \right > \left < x \right |$, not just $\left | x \right > \left < x \right |$. 2. Eigenstates of the position operator in Cartesian co-ordinates are also eigenstates of the position operator in any other system of co-ordinates. 3. You never have to change what basis or co-ordinate system you use because the wavefunction has evolved. Oct 25, 2021 at 5:18
• Hmm, this sounds like an XY problem. Writing a time evolved wavefunction in terms of the old one in the form $\psi(g(x))$ is just a very strange thing to do -- why are you considering that in the first place? Oct 25, 2021 at 20:35

As you suggest, $$u=g(x)$$, taken invertible, and $$[\hat u, \hat x]=[\hat A, \hat x]=[\hat u, \hat A]=0,\\ \hat u \equiv g(\hat x), ~~~\leadsto |u\rangle \propto |x\rangle ~~~\leadsto \hat u |x\rangle = g(\hat x)|x\rangle = g(x)|x\rangle .$$ Likewise, $$\hat A |x\rangle= f(x) |x\rangle= f(g^{-1}(\hat u)) |x\rangle \leadsto \\ \hat A |u\rangle= f(g^{-1}( u)) |u\rangle .$$

In your sibling question you seem to appreciate that $$\psi(x)$$ does not "evolve" unitarily to $$\psi (u)=\psi(g(x))\equiv \tilde \psi(x)$$, since $$|\psi\rangle$$ and $$|\tilde \psi\rangle$$ have different normalizations--see example below.

Let's illustrate some of this with the trivial scaling case g(x)=ax suggested in the sibling question, so g'=a, so du=a dx. $${\mathbb I}=\int \!\!dx~~ |x\rangle \langle x|= \int \!\!du~~ \frac{1}{a}|x\rangle \langle x| \\ =\int \!\!du~~ |u\rangle \langle u| ,$$ That is, $$|u\rangle=\frac{1}{\sqrt{a}}|x\rangle$$.

You then have, $$\psi(u)=\langle u|\psi\rangle =\frac{1}{\sqrt{a}}\langle x|\psi\rangle= \psi (x)/\sqrt{a} =\langle x|\tilde \psi\rangle=\tilde \psi(x)=\psi(ax),\\ |\tilde \psi\rangle= |\psi\rangle / \sqrt{a} ~~~\implies ~~~ \langle \tilde \psi | \tilde \psi \rangle = \langle \psi | \psi \rangle/a,$$ as remarked at the beginning. For this trivial case (only), the two expectation values you are computing turn out to be equal, but this is not a general feature, of course!

You may take it from here, $$|\tilde \psi\rangle= \frac{1}{\sqrt{g'(\hat x)}}|\psi\rangle, ~~ |u\rangle= {1\over \sqrt{g'}}|x\rangle\leadsto \\ \frac{\langle\psi|\hat{A}|\psi\rangle}{\langle\psi|\psi\rangle} = \int\!\! du |\psi(u)|^2 f(g^{-1}(u)) , ~~\mathbf{ but}\\ \frac{\langle\tilde\psi|\hat{A}|\tilde\psi\rangle}{\langle\tilde \psi|\tilde \psi\rangle} = {\int\!\! {du\over g'(g^{-1}(u))} |\psi(u)|^2 f(g^{-1}(u)) \over \int\!\! {du\over g'(g^{-1}(u))} |\psi(u)|^2 }~~,$$ as stressed! Check their identity for simple scaling, as per above remark.

• Thanks for this, but I was trying to do something slightly different. The new basis $|u\rangle$ is not normalized to start with, so the resolution of identity in this new basis should be of the form $\int du\space h(u)|u\rangle\langle u|=\hat{1}$. Then we can set $|u\rangle \rightarrow \sqrt{h(u)}|u\rangle$ to normalize $|u\rangle$. Oct 26, 2021 at 14:26
• I'm sorry, but I don't get your method of normalizing the basis vector. My idea was to keep it in that non-normalized form $\int du\space h(u)|u\rangle\langle u| = \hat{1}$, while introducing the identity operator. The equation $|u\rangle = \frac{|x\rangle}{\sqrt{g'(x)}}$ is something I'm not being able to understand intuitively. Should I not rather say that $\int du\space h(u)|u\rangle\langle u| = \hat{1}$, and then normalize $|u\rangle$, by taking the root of the function in front of it, and then absorbing it into the ket ? Oct 26, 2021 at 14:34
• No, how did you get your original expression in the first place? Unless you orthonormalize your basis, all expressions such as $\langle u|\psi \rangle= \psi (u)$ etc are invalid. I illustrated the resolution of the identity for the simple scaling, so you get it... Oct 26, 2021 at 14:38
• If you would kindly move this to chat, perhaps I could share my working and the specific part that I am not being able to understand. Thank you so much for taking the time. Oct 26, 2021 at 14:40
• I'm not sure I know how to do this. $|u\rangle \propto |x\rangle$ does not fix the former's normalization. One adjusts it versus a normalized basis, the latter, so now the former is also normalized. Oct 26, 2021 at 14:45