Kk[Kscal_,lam_] = Kscal*(0.1+0.9*lam)
Ok[Oscal_,lam_] = Oscal*lam

H[Kscal_,Oscal_,lam_,x_] = (1/2)*Kk[Kscal,lam]*(x-Ok[Oscal,lam])^2

D[H[Ks,Os,lam,x],lam]

Integrate[Exp[-H[Ks,Os,lam,x]],{x,-Infinity,Infinity},Assumptions->{Ks>0,Os>0,lam>0}]

dfdl[Ks_,Os_,lam_] =Integrate[D[H[Ks,Os,lam,x],lam]*Exp[-H[Ks,Os,lam,x]],{x,-Infinity,Infinity},Assumptions->{Ks>0,Os>0,lam>=0}]/Integrate[Exp[-H[Ks,Os,lam,x]],{x,-Infinity,Infinity},Assumptions->{Ks>0,Os>0,lam>=0}]

dfdl[4,1,0]
dfdl[4,1,0.5]
dfdl[4,1,1]

Plot[dfdl[1,2,l],{l,0,1}]

dfdl[10,3,0.0]

dfdl[10,3,0.4]

dfdl[10,3,0.1]

Kk[10,0]
Ok[2,1]

NIntegrate[dfdl[3,2,l],{l,0,1}]

f[K_]=-(1/2)*Log[(2 *Pi)/(K)]

f[10.0]-f[1.0]

Integrate[Exp[-H[10,2,0,x]],{x,-Infinity,Infinity}]

Integrate[Exp[-H[10,2,1,x]],{x,-Infinity,Infinity}]-Integrate[Exp[-H[10,2,0,x]],{x,-Infinity,Infinity}]

(Integrate[H[10,5,1,x]*Exp[-H[10,5,1,x]],{x,-Infinity,Infinity}]/Integrate[Exp[-H[10,5,1,x]],{x,-Infinity,Infinity}]) -
(Integrate[H[10,5,0,x]*Exp[-H[10,5,0,x]],{x,-Infinity,Infinity}]/Integrate[Exp[-H[10,5,0,x]],{x,-Infinity,Infinity}])

Kk[10,0.0]
Ok[5,0.0]