Übung 8.2 (4)
© Jürgen Schnack, 2016/05/30

Bei den Integrationen kann die Winkelintegration weggelassen werden; sie gibt nur eine Konstante, die nirgends eine Rolle spielt.

Funktion, Norm, normierte Funktion

f0[r_,a_,b_]=Exp[-a*r-b*r^2]

Nf0[a_,b_]=Integrate[r^2 f0[r,a,b]^2,{r,0,Infinity},Assumptions->{Re[a]>0,Re[b]>0}]

f[r_,a_,b_]=f0[r,a,b]/(Sqrt[Nf0[a,b]])

E0[a_,b_]=FullSimplify[-Integrate[(r - r^3)*f[r,a,b]^2,{r,0,Infinity},
Assumptions->{Re[a]>0,Re[b]>0}]-
Integrate[r f[r,a,b] D[r f[r,a,b],{r,2}],{r,0,Infinity},
Assumptions->{Re[a]>0,Re[b]>0}]]

Plot3D[E0[a,b],{a,0,0.8},{b,0,0.6},BaseStyle->{FontFamily->"Helvetica",FontSize->18}]

ContourPlot[E0[a,b],{a,0.4,0.8},{b,0.1,0.3},BaseStyle->{FontFamily->"Helvetica",FontSize->18}]

Gradientenverfahren

a0=1.0;b0=1.0;η=0.01;
For[i=0,i<1000,i++,
a1=Max[a0-η*D[E0[a,b],a]/.{a->a0,b->b0},0.000001];
b1=Max[b0-η*D[E0[a,b],b]/.{a->a0,b->b0},0.000001];
Print[a1,"  ",b1,"  ",E0[a1,b1]];
a0=a1;b0=b1]