Ecuacion de Schrodinger Independiente del Tiempo


(*--- Calculo de las funciones de onda en el pozo ---*)

 phi[x_,n_Integer,a_] := If[0<x<a,Sqrt[2/a]*Sin[(n*Pi*x)/a],0];

 Plot[ {phi[x,1,2],phi[x,2,2],phi[x,3,2]},{x,-1/2,5/2}];

(*---Calculo del Producto Escalar---*) 

Ovlap[a_, n1_Integer, 
          n2_Integer] :=  
        NIntegrate[phi[x, n1, a]*phi[x, n2, a],  {x, 0, a}, 
          AccuracyGoal  ->  
            10^-10];

Ovlap[2, 1, 1]
Ovlap[2, 1, 2]

(*---Grafico de Probabilidades---*) 

Plot[{phi[x, 1, 2]^2, phi[x, 2, 2]^2, 
          phi[x, 3, 2]^2}, {x, -1/2, 5/2}, 
        PlotStyle -> {{RGBColor[1, 0, 0]}, {RGBColor[0, 1, 0]}, {RGBColor[0, 
                0, 1]}}, Frame -> True, 
        Ticks -> {{0, 0.5, 1, 1.5, 2}, {None}}];

(*---Grafico de Probabilidades Parciales---*) 

 (*requiere FilledPlot*) 
<< 
      Graphics`FilledPlot`

t[liminf_, limsup_, n_Integer] := 
      FilledPlot[phi[x, n, 1]^2, {x, liminf, limsup}, 
        Fills -> {RGBColor[1,  .5, 
              0.5]}]

q = Plot[phi[x, 1, 1]^2, {x, 0, 1}]
a = Show[{q, t[0, 0.25, 1]} ];

ProbParc[
          liminf_, limsup_, n_, a_] := 
        NIntegrate[
          phi[x, n, a]^2, {x, liminf, 
            limsup}];

ProbParc[0.09, 0.11, 1, 1]

(*---Grafico de Probabilidades Parciales segun niveles de energia---*) 

ListPlot[
        Table[ProbParc[0,  .25, n, 1]*100, {n, 1, 100}], PlotJoined -> True, 
        PlotRange -> All];