# Use the characterization function to find the mean of the uniform distribution on (0,1)

I am trying to use the characteristic function of the uniform distribution defined on (0,1) to compute the mean. I have calculated the characteristic function (correctly) and used Euler's identity to convert it to the following form:

$$\phi_Y(t)=\frac{\sin(t)}{t} + i \frac{1-\cos(t)}{t}$$

I should be able to compute the mean (which should be 1/2) by taking the first derivative, multiplying by $\frac{1}{i}$, and evaluating at $t=0$. I've computed the first derivative as:

$$\frac{\partial}{\partial t}\phi_Y(t)=\frac{t\cos(t)-\sin(t)}{t^2} + i\frac{t \sin(t) + \cos(t) -1}{t^2}$$

And dividing by $i$, this expression simplifies to: $$E[X]=\Big(\frac{i\sin(t)-it\cos(t)+t(\sin(t)+\cos(t)-1}{t^2}\Big)\bigg\rvert_{t=0}$$

This expression is undefined, because of division by 0. Am I missing something here?

• You cannot just "plug in $t=0$" indeed; but the limit as $t\to 0$ does exist. we have $\lim_{t\to 0}\frac{\sin t}{t} = 1$, $\lim_{t\to 0}\frac{\cos t-1}{t^2} = -1/2$, etc. (You can do a Taylor expansion of the numerator at $t=0$, if you are familair with Taylor expansions; this will be immediate) – Clement C. Sep 11 '18 at 5:19
• Oh, I see. Thank you very much! – Austin D. Sep 11 '18 at 16:18

Use Maclaurin series: $$i\sin t-it\cos t+t\sin t+\cos t-1 =it-it+t^1+1-t^2/2-1)+O(t^3)=\frac{t^2}2+O(t^3)$$ and so $$\lim_{t\to0}\frac{i\sin t-it\cos t+t\sin t+\cos t-1 }{t^2}=\frac12.$$
You have to use limiting values. Even in your formula for $\phi_Y (t)$ there is $t$ in the denominator. It doesn't mean $\phi_Y (0)$ is not defined. The value is $1$ which is also $\lim_{t \to 0} \phi_Y (t)$. Similarly, you can find $EY$ by computing $\lim _{t \to 0} \frac {\partial} {\partial t} \phi_Y (t)$. By expanding $\sin$ and $cos$ in their Taylor series you get the value of the limit as $\frac 1 2$.