ApproximationIn Probability, lnn!=ln∏k=1nk=∑k−1nlnk≈∫x=1nlnx dx\ln n! = \ln \prod\limits_{k=1}^n k = \sum\limits_{k-1}^n \ln k \approx \int_{x=1}^n \ln x ~dxlnn!=lnk=1∏nk=k−1∑nlnk≈∫x=1nlnx dx Using integration by parts ∫u dv=uv−∫v du\int u ~dv = uv - \int v~du∫u dv=uv−∫v du d(uv)=v du+u dvd(uv) = v~du + u~dvd(uv)=v du+u dv u=lnx, dv=1, du=1x, v=xu = \ln x,~ dv = 1,~ du = {1 \over x},~v=xu=lnx, dv=1, du=x1, v=x ∫x=1nlnx dx=[xlnx−∫x1x dx]x=1n\int_{x=1}^n \ln x~dx = [{x \ln x - \int x {1 \over x} ~dx}]^n_{x=1}∫x=1nlnx dx=[xlnx−∫xx1 dx]x=1n =[xlnx−x]x=1n=nlnn−n+1= [x \ln x - x ]^n_{x=1} = n \ln n - n + 1=[xlnx−x]x=1n=nlnn−n+1