See below.
Just to be clear on notation, let \(F(x)\) be the cdf, \(f(x)\) the pdf and \(S(x)=1-F(x)\) the survival function. Since \(\lambda(x)=\dfrac{f(x)}{S(x)}=-\dfrac{S'(x)}{S(x)}=-\dfrac{d}{dx}\ln S(x)\) Then: \[ \int_{-\infty }^{x}\lambda(u)\,du=\int_{-\infty}^{x}-\frac{d}{du}\ln S(u) \, du=-\ln S(x)\\ ~ \\ S(x) = \exp\left\{ -\int_{-\infty}^x \lambda(u)\, du \right\}\\ F(x)= 1- \exp\left\{ -\int_{-\infty}^x \lambda(u)\, du \right\}\] So, let's calculate the integral of the hazard function. Since the function is defined for \(x >0\) we have: \[\int_{0}^x\frac{1}{2}u^{-1/2} \, du=\frac{1}{2}\left[ \frac{u^{1/2}}{1/2}\right]_{0}^x =(x^{1/2}-0^{1/2})=x^{1/2}\\ \implies F(x)=1-\exp\left\{ -(x^{1/2})\right\}=1-e^{-x^{1/2}}\\ \implies f(x) = F'(x)=\frac{d}{dx}\left(1-e^{-x^{1/2}}\right)=\frac{1}{2}e^{-x^{1/2}}x^{-1/2}\] So, \[ \begin{align}E(X)&=\int_{0}^{\infty} xf(x)\,dx \\&=\int_{0}^{\infty}x\cdot \frac{1}{2}e^{-x^{1/2}}x^{-1/2} \,dx\\ \end{align} \] Let \(u=x^{1/2}\implies x=u^2\) \(2\, du = x^{-1/2} \, dx\) And the bounds stay the same \[ \begin{align} E(X)&=\frac{1}{2} \int_{0}^{\infty}u^2e^{-u}(2) \, du \\ &= \int_{0}^{\infty}u^{3-1}e^{-u} \, du \\ & = \Gamma(3) \\ & =2!\\& = 2\end{align}\]
Join our real-time social learning platform and learn together with your friends!