# Why does the infinite square well potential have different solutions if your boundary is $[0,a]$ vs $[-a/2,a/2]$? [closed]

I'm reviewing the infinite square well potential, and realized that if my boundaries are $[0,a]$ the constraint that $f(0) = f(a) = 0$ means that the coefficient for the $\cos$ term must equal zero. However, If your bounds are from $[-a/2,a/2]$ The solution $f = A\cos(kx) + B\sin(kx)$ suggests that either solutions can work, depending on if $n$ is odd or even. If the length of the boundary is the same, why are the answers different?

## closed as off-topic by Jon Custer, Cosmas Zachos, Qmechanic♦Dec 13 '17 at 20:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – Jon Custer, Cosmas Zachos, Qmechanic
If this question can be reworded to fit the rules in the help center, please edit the question.

• Hint: If you graphed the solution and then translated it by $a/2$, would it look different? – Dwagg Dec 11 '17 at 22:31
• Use $\cos(A+B)=\cos(A)\cos(B)-\sin(A)\sin(B)$ and translate boundary. – ZeroTheHero Dec 11 '17 at 22:32

The answers you get are the same, but the representation in math symbols is different due to the change of coordinates. As an example, the following two parabolas are the same, but with different locations: $$y_1 = x^2$$ $$y_2 = x^2 - 6x + 9$$ It's easier to see the similarity if $y_2$ is written as $$y_2 = (x-3)^2$$ which tells you that the parabola $y = x^2$ has been shifted to the right by 3 units. It's the same shape, but it has a different location, so the mathematical representation is different.
Similarly, $\sin(x)$ and $\cos(x)$ are the same function but with a horizontal shift. $$\cos(x) = \sin\left(x + \frac{\pi}{2}\right)$$ The shape of the wave function in the two potential wells is the same, but the representation is different due to the different coordinate systems. The differences are only in what you write down on paper, not in the physics.