You will have to excuse my ignorance I am very new to Physics Forum and relatively so to QM. Please accept my apologies.
So inside the box V=0,
Thus ψ = Ae^ikx +B-ikx = Ccoskx + Dsinkx
Outside the box V = ∞ therefore ψ = 0
if ψ is continuous it must be zero at the edges of the box
→ ψ(0) = 0 and ψ(L) = 0
For ψ(0) = 0 then C = 0 therefore ψ(x) = Dsin(kx)
These boundary conditions lead to eigen functions in the form ψ(x) = Dsin(kx) and quantised values of k=n∏/L leading to quantised values of E given by:
E = hbar^2n^2/8mL^2
However if the eigenfunctions must be completely specified we normalize them:
→∫ψ*ψ dx = D^2sin^2(kx)dx=1 where D=√(2/L)= An and L=W
→ψn(z) = Ansin(n∏z/w)
Thanks for your help.