# I have a problem with particle in the box [closed]

I have a problem while generating particle in the box from this equation

Plot[Sqrt[2/L] Sin[n Pi x/L], {x, -L/2, L/2}]


because Mathematica might confuse about my parameter, how can I notice that L is a function of x?

I want my graph have two y axis as a boundary of the box.

## closed as unclear what you're asking by m_goldberg, Mr.Wizard♦Jun 16 '16 at 12:47

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Try L = 1; psi[n_, x_] := Sqrt[2/L] Sin[n Pi x/L]; Plot[Evaluate[Table[psi[n, x]^2, {n, 1, 3}]], {x, 0, L}, Frame -> True, PlotLegends -> True] – Sumit Jun 16 '16 at 13:14

L = 100;

f[x_] = Sqrt[2/L] Sin[n Pi x/L];