∫01 dx (ln(x)/√x) .
In the variational method in quantum mechanics one calculates the expectation value E[ψ] of a Hamiltonian H,
E[ψ] ≡ ⟨ψ|H|ψ⟩/⟨ψ|ψ⟩ ,
Consider the Hamiltonian operator for one-dimensional oscillator,
Hos = - (1/2) (d²/dx²) + (1/2) x² ,
ψα(x) = exp(-αx²/2) ,
E(α) ≡ ⟨ψα|Hos|ψα⟩/⟨ψα|ψα⟩ .
Hints:
The norm-integral, ⟨ψα|ψα⟩, has the form (check it)
⟨ψα|ψα⟩ = ∫-∞∞ exp(-αx²) dx .
The Hamiltonian-integral, ⟨ψα|Hos|ψα⟩, has the form (check it)
⟨ψα|Hos|ψα⟩ = ∫-∞∞ (-α²x²/2 + α/2 + x²/2)*exp(-αx²) dx .
Since the integration limits are infinite, you migh want to use
gsl_integration_qagi
function. Or—using the symmetry of the integrand—gsl_integration_qagiu
.