$Assumptions=$Assumptions && {q>1}
f[x_]=Cosh[x] Exp[- q x^2]
ke=Integrate[f'[x]^2,{x,0,Infinity}]
pe=-25 Integrate[f[x]^2/Cosh[x]^2,{x,0,Infinity}]
n=Integrate[f[x]^2,{x,0,Infinity}]
e=(ke+pe)/n
Plot[e,{q,.1,10}]
FindMinimum[e,{q,2.2}]
Out[8]= {-20.4585, {q -> 2.51243}}
exact[m_]=-(Sqrt[25.25]-(m+.5))^2
exact[0]                                                               

Out[10]= -20.4751
slightly lower as required
fa[x_]=f[x]/Sqrt[2 n] /. Last[%8]

f[x_]=x Cosh[x] Exp[- q x^2]/Sqrt[2 n] 
ke=Integrate[f'[x]^2,{x,0,Infinity}]
pe=-25 Integrate[f[x]^2/Cosh[x]^2,{x,0,Infinity}]
n=Integrate[f[x]^2,{x,0,Infinity}]
e=(ke+pe)/n
Plot[e,{q,.1,10}]
FindMinimum[e,{q,2.2}]
Out[18]= {-12.3388, {q -> 2.16013}}
exact[1]                                                               

Out[20]= -12.4252
fb[x_]=f[x]/Sqrt[2 n] /. Last[%18]



----

f0[x_]=1/Cosh[x]^q

ke=Integrate[f0'[x]^2,{x,0,Infinity}]
pe=-25 Integrate[f0[x]^2/Cosh[x]^2,{x,0,Infinity}]
n=Integrate[f0[x]^2,{x,0,Infinity}]
e=(ke+pe)/n
Plot[e,{q,.1,10}]
FindMinimum[e,{q,4}]
Out[28]= {-20.4751, {q -> 4.52494}}
f0a[x_]=f0[x]/Sqrt[2 n] /. Last[%28]
same as exact[0]! so is eigenfunction


f1[x_]=Sinh[x]/Cosh[x]^q
ke=Integrate[f1'[x]^2,{x,0,Infinity}]
pe=-25 Integrate[f1[x]^2/Cosh[x]^2,{x,0,Infinity}]
n=Integrate[f1[x]^2,{x,0,Infinity}]
e=(ke+pe)/n
Plot[e,{q,.1,10}]
FindMinimum[e,{q,4}]
Out[36]= {-12.4252, {q -> 4.52494}}
f1a[x_]=f1[x]/Sqrt[2 n] /. Last[%36]

same as exact[1]! so is eigenfunction

Plot[{fa[x],f0a[x]},{x,-2,2}]
Plot[{fb[x],f1a[x]},{x,-2,2}]

