q /: Re[q] = 2
f[x_]=Cosh[x] Exp[- q x^2]
ke=Integrate[f'[x]^2,{x,0,Infinity}]
pe=Integrate[f[x]^2 (-25/Cosh[x]^2),{x,0,Infinity}]
 n=Integrate[f[x]^2 ,{x,0,Infinity}]
e=(ke+pe)/n
FindMinimum[e,{q,2.5}]
{-20.4585, {q -> 2.51243}}
 exact: ? -(sqrt(25.25)-.5)^2=  -20.47506    
Plot[Evaluate[f[x]/Sqrt[n] /. q -> 2.51243],{x,-2,2}]

f[x_]=x Cosh[x] Exp[- q x^2]
ke=Integrate[f'[x]^2,{x,0,Infinity}]
pe=Integrate[f[x]^2 (-25/Cosh[x]^2),{x,0,Infinity}]
 n=Integrate[f[x]^2 ,{x,0,Infinity}]
e=(ke+pe)/n
FindMinimum[e,{q,2.5}]
{-12.3388, {q -> 2.16013}}
exact:? -(sqrt(25.25)-1.5)^2=  -12.42519    
Plot[Evaluate[f[x]/Sqrt[n] /. q -> 2.16013],{x,-2,2}]

f[x_]=1/Cosh[x]^q
ke=Integrate[f'[x]^2,{x,0,Infinity}]
pe=Integrate[f[x]^2 (-25/Cosh[x]^2),{x,0,Infinity}]
 n=Integrate[f[x]^2 ,{x,0,Infinity}]
e=(ke+pe)/n
FindMinimum[e,{q,5}]
 {-20.4751, {q -> 4.52494}}
Plot[Evaluate[f[x]/Sqrt[n] /. q -> 4.52494],{x,-2,2}]
Show[%8,%22]

f[x_]=Sinh[x]/Cosh[x]^q
ke=Integrate[f'[x]^2,{x,0,Infinity}]
pe=Integrate[f[x]^2 (-25/Cosh[x]^2),{x,0,Infinity}]
 n=Integrate[f[x]^2 ,{x,0,Infinity}]
e=(ke+pe)/n
FindMinimum[e,{q,5}]
{-12.4252, {q -> 4.52494}}
Plot[Evaluate[f[x]/Sqrt[n] /. q -> 4.52494],{x,-2,2}]
Show[%15,%30]
Show[GraphicsArray[{%23,%31}]]
PSPrint[%]

----
7.1: |x|
psi[x_]= Exp[-b x^2]
Integrate[psi[x]^2,{x,0,Infinity}]
Integrate[psi[x]^2 x,{x,0,Infinity}]
Integrate[psi'[x]^2,{x,0,Infinity}]
Simplify[(%+%%)/%%%,Re[b] > 0]
Solve[D[%,b]==0,b]
%% /. Last[%]
           3
Out[7]= -------
            1/3
        2 Pi
 N[%]
Out[8]= 1.02418

x^4:
psi[x_]= Exp[-b x^2]
Integrate[psi[x]^2,{x,0,Infinity}]
Integrate[psi[x]^2 x^4,{x,0,Infinity}]
Integrate[psi'[x]^2,{x,0,Infinity}]
Simplify[(%+%%)/%%%,Re[b] > 0]
Solve[D[%,b]==0,b]
%% /. %[[2]]
            1/3
         3 3
Out[15]= ------
           4
 N[%]
Out[16]= 1.08169


