...right? I think so, because d/dx(constant) = 0. For a wavefunction that doesn't change, you have a particle that ain't moving, right? I think this is a simple question, but I'm having a dropped-brain moment...

Oh yes: if <p> and <p^2> = 0, then: momentum is exactly known to be 0, so why isn't position-uncertainty infinite?

<p>=0, because of symmetry. It is equally likely to go left as right.
However, that doesn't mean the average *speed* is zero.
Just because there is no wind in a room doesn't mean the air is frozen.
By the way, the first of your equations was cut off, at least on my browser.
I would guess integrate by parts?

You need to consider the endpoints. What happens at x=a and x=-a? The problem is that your wavefunction isn't a valid one. Wavefunctions and their first derivatives should be continuous. One exception to this is when you have an infinite potential. In that case, the first derivative may be discontinuous at boundaries, but the wavefunction is still continuous everywhere.

You need to consider the endpoints. What happens at x=a and x=-a? The problem is that your wavefunction isn't a valid one. Wavefunctions and their first derivatives should be continuous.

Oh! I had forgotten about the continuity of the wavefunction at the boundaries. Now that I think about it: the state I described: a constant-valued wavefunction in some finite interval and zero everywhere else is contrived, rather than a physical-consequence. In fact: when a particle is placed in a finite interval with infinite-confining-power, why, you get standing waves (infinite-potential well), so you're right: the wavefunction isn't valid after all. It's just contrived.

One exception to this is when you have an infinite potential. In that case, the first derivative may be discontinuous at boundaries, but the wavefunction is still continuous everywhere.

Hey, wait: it seems we needn't apologize for the infinite potential well as a possible exception to the first-derivative rule. The derivative of the cosine function (the standing waves) is the sine-function: ain't that zero at the boundaries of the infinite potential well?

I know we're getting off-track, but it's helping me to discuss these things. I'm beefing up for the Physics GRE.

It is true that the potential of an infinite square well is contrived. But this problem doesn't seem to even mention what the potential is. It merely talks about the wave function itself.

And it does not state that the wave function is one of the energy eigenstates. The wave function could very well be (and in general, since no other qualifiers were given, can be assumed that it is) a superposition of energy eigenstates.

If the Hilbert space for this system is complete, it's quite possible that the valid wave function shapes are pretty nearly anything you can imagine (as long as the shape is square integrable, etc), via superposition of energy eigenstates. This is similar to how you can create pretty much any mathematical waveform that you can easily imagine using sines and cosines using the Fourier series and Fourier transforms.

Speaking of Fourier transforms, I think one possible method you could use to solve this problem is to recognize that

and then solve for <p> and <p2> using Φ(p) using standard means. But I don't recommend doing that for this problem. Your original approach (shown in your relevant equation), is probably a lot simpler.

I suggest instead, start with the wave function as represented by [itex] \psi (x) [/itex]. Plot it on a piece of paper. Then plot [itex] \partial / \partial x [/itex] of that. Note that the derivative of a step function is a Dirac delta function. Do the same thing one more time. Note the derivative of a Dirac delta function is two Dirac delta functions, one going up, and other going down, both very close together.

Use your plots in part to find <p> and <p2> which involves a little multiplying, and summing the sections of area that are not zero (which is actually pretty easy in this case -- you just need to eyeball the figures).

[Edit: Just so we're on the same page, the relevant equation you should be using for <p> is