# normalizing a wavefunction

I have a homework problem that I can't get started on, below is the first bit. I feel like I should just be able to integrate to find $C$ but I get a divergent integral. Can someone give me a hint as to where to go here?

A particle of mass m is in a one-dimensional inﬁnite square well, with $U = 0$ for $0 < x < a$ and $U = ∞$ otherwise. Its energy eigenstates have energies $E_n = (\hbar πn)^ 2/2ma^2$ for positive integer $n.$ Consider a normalized wavefunction of the particle at time $t = 0$ $$ψ(x,0) = Cx(a − x).$$ Determine the real constant $C$.

-
You're integrating over a compact interval, namely $[0,a]$ - how can your integral diverge? –  Vibert Apr 6 '13 at 14:09
Ah, so we only need $\psi$ to integrate to $1$ over that interval, rather than the whole line... that makes sense. –  user27182 Apr 6 '13 at 14:12
You may be getting misled by the use of the word "infinite" in "infinite square well". The infinite is referring to the potential energy outside the well, not the width. Think of the well as being infinitely "deep". –  Ataraxia Apr 6 '13 at 15:26

The well is not infinitely wide, just infinitely "deep", meaning that the region outside the well has infinite potential energy. The particle cannot exist in a region of infinite potential energy, so it can only exist within the boundaries of the well, which clamps the integral to $0\le x < a$:
$$1=\int_0^a|Cx(a-x)|^2dx$$