# A particle in a box.

## Homework Statement

A particle is in a box of width L. Calculate the probability to find the particle in the region [L/4, 3L/4] when the particle is a) in the ground state b) in the first excited state.

## Homework Equations

(2/L)sin(n*π*x/L)^2 dx is the probability in [x, x+dx]

## The Attempt at a Solution

Integrating that gives me 2/L[x/2-[L/(4π)]sin(2n*π*x/L)], boundaries being L/4 and 3L/4. For a) n=1 and b) n=2, right? After I plug in the values, I get value greater than 1. Where have I gone wrong?

Hopefully this is readable, no LaTeX. Related Introductory Physics Homework Help News on Phys.org
dx
Homework Helper
Gold Member
The probability density is (2/L)sin²(nπx/L) for even n and (2/L)cos²(nπx/L) for odd n.

EDIT: Sorry, this is only if you take the boundaries of the box to be -L/2 and L/2.

Last edited:
No, it's the same formula for all n!
After integration i got 2/L[x/2-[L/(4π n)]sin(2n*π*x/L)]
For n = 1 -> (2+π)/(2π)
for n = 2 -> 1/2

dx
Homework Helper
Gold Member
Yes sorry, I took the boundaries to be -L/2 and L/2.

Thanks for the replies, guys! I forgot the one n in my first post. I found out my error was in the easy stuff after the integration, I'd done a mistake in adding fractions. 