How do I do the derivative of characteristic function. I have a uniform random variable $X$ in $[-b, b]$, and I got its characteristic function: $$\Phi_X(\omega)=E[e^{j\omega X}]= \int_{-b}^{b}e^{j\omega x}\cdot f_X(x)dx=\int_{-b}^{b}e^{j\omega x}\cdot \frac{1}{2b}dx=\frac{e^{j\omega b}-e^{-j\omega b}}{2j\omega b}$$
where $j=\sqrt{-1}=i$ (I don't know why the textbook uses $j$ here.)
But then when I tried to find its expect value $E[X]$ by the moment theorem:$$\left.\frac{d^n\Phi_X(\omega)}{d\omega^n}\right\rvert_{\omega=0}=j^nE[X^n]$$
I have $$E[X] = \frac1j\left.\frac{d \Phi_X(\omega)}{d\omega}\right\rvert_{\omega=0}$$
Before I plug in $\omega=0$, I do $$\frac{d \Phi_X(\omega)}{d\omega}$$ by applying $$\frac d{dx}\frac{u}{v}=\frac{v\frac{du}{dx}-u\frac{dv}{dx}}{v^2}$$
I get $$\frac{d \Phi_X(\omega)}{d\omega}=\frac{1}{2jb}\cdot\frac{d}{d\omega}(\frac{e^{j\omega b}-e^{-j\omega b}}{\omega})=\frac{\omega(jbe^{j\omega b}+jbe^{-j\omega b})+(e^{j\omega b}-e^{-j\omega b})\cdot1}{2jb\omega^2}$$
Then I got confused because I would get $\frac{0}{0}$ if I plug in $0$. I don't think it makes sense. And I try to look up the solution, which gives me $$E[X] = \frac1j\left.\frac{d \Phi_X(\omega)}{d\omega}\right\rvert_{\omega=0}=-\frac{1}{2b}[-\frac{1}{2}b^2+\frac{1}{2}b^2]=0$$
And also for the second moment $$E[X^2]=\frac1{j^2}\left.\frac{d^2\Phi_X(\omega)}{d\omega^2}\right\rvert_{\omega=0}=-\frac{1}{2bj}[-\frac{1}{3}jb^3-\frac{1}{3}jb^3]=\frac{b^2}{3}$$
I have no idea how the derivative was obtained. Am I doing it correct? Or there's an alternative way to do the differentiation? Thanks!

(Update on 5/3/2016)
Yeah, instead of using $$\frac{sin(\omega b)}{\omega b}$$ which I don't quite understand how it was obtained from the original equation (Anyone is welcome to answer this question for me and thank you in advance) $$\Phi_X(\omega)=\frac{e^{j\omega b}-e^{-j\omega b}}{2j\omega b}$$
I began with using a more general form of uniform RV with range $[a, b]$ and I got its characteristic function
$$\Phi_X(\omega)=\frac{e^{j\omega b}-e^{j\omega a}}{j\omega(b-a)}$$
To get the first moment $E[X]$, I take its first derivative and plug in $\omega=0$:
$$
\left.\frac{d\Phi_X(\omega)}{d\omega}\right\rvert_{\omega=0}=\frac{1}{j(b-a)}\cdot\left.\frac{d}{d\omega}\left[\frac{1}{\omega}\cdot(e^{j\omega b}-e^{j\omega a})\right]\right\rvert_{\omega=0}\\=\frac{1}{j(b-a)}\cdot\left.\left[\frac{d}{d\omega}(\frac{1}{\omega})\cdot(e^{j\omega b}-e^{j\omega a})+(\frac{1}{\omega})\frac{d}{d\omega}(e^{j\omega b}-e^{j\omega a})\right]\right\rvert_{\omega=0}\\=\frac{1}{j(b-a)}\cdot\left.\left[(-\frac{1}{\omega^2})\cdot(e^{j\omega b}-e^{j\omega a})+(\frac{1}{\omega})(jbe^{j\omega b}-jae^{j\omega a})\right]\right\rvert_{\omega=0}$$
Then I applied L'Hôpital's rule to the two terms in the bracket:
$$\lim_{\omega\to0}\frac{e^{j\omega b}-e^{j\omega a}}{\omega^2}=\lim_{\omega\to0}\frac{\frac{d^2}{d\omega^2}(e^{j\omega b}-e^{j\omega a})}{\frac{d^2}{d\omega^2}(\omega^2)}=\lim_{\omega\to0}\frac{j^2b^2e^{j\omega b}-j^2a^2e^{j\omega a}}{2}=\frac{-b^2+a^2}{2}$$
$$\lim_{\omega\to0}\frac{jbe^{j\omega b}-jae^{j\omega a}}{\omega}=\lim_{\omega\to0}\frac{\frac{d}{d\omega}(jbe^{j\omega b}-jae^{j\omega a})}{\frac{d}{d\omega}(\omega)}=\lim_{\omega\to0}\frac{j^2b^2e^{j\omega b}-j^2b^2e^{j\omega a}}{1}=-b^2+a^2$$
Substitute back, we got:
$$\left.\frac{d\Phi_X(\omega)}{d\omega}\right\rvert_{\omega=0}=\frac{1}{j(b-a)}\cdot\left[-\left(\frac{-b^2+a^2}{2}\right)+(-b^2+a^2)\right]=\frac{-(a+b)}{2j}$$
The expect value $$E[X]=\frac1j\left.\frac{d \Phi_X(\omega)}{d\omega}\right\rvert_{\omega=0}=\frac{-(a+b)}{2j^2}=\frac{a+b}{2}\\=\frac{-b+b}{2}=0\quad if\,a=-b$$
But I must say, this includes a whole lot of work. Converting it to the form $$\Phi_X(\omega)=\frac{e^{j\omega b}-e^{-j\omega b}}{2j\omega b}=\frac{sin(\omega b)}{\omega b}$$ seems so much simpler. I wish I understand how it was done.
 A: $$\Phi_X(\omega)=E[e^{j\omega X}]= \int_{-b}^{b}e^{j\omega x}\cdot 
f_X(x)dx=\int_{-b}^{b}e^{j\omega x}\cdot \frac{1}{2b}dx=\frac{e^{j\omega b}-e^{-j\omega b}}{2j\omega b} = \frac{\sin(\omega b)}{\omega b}$$
and
$$E[X] = \frac1j\left.\frac{d \Phi_X(\omega)}{d\omega}\right\rvert_{\omega=0} = \frac1j\left.\frac{d}{d\omega} \frac{\sin(\omega b)}{\omega b}\right\rvert_{\omega=0} = 0$$
which immediately gives $0$ by L'Hôpital's rule.
And you got the right result for the second moment.

Euler's formula gives
$$e^{ix}=\cos x+i\sin x \Rightarrow 
\sin x  =  {e^{ix} - e^{-ix} \over 2i}$$
$$\frac{e^{ix}-e^{-ix}}{2ix} = \frac{\sin(x)}{x}$$
edit:
To expand on this a little more
$$
\begin{align}
\cos x  = \mathrm{Re}\{e^{ix}\} ={e^{ix} + e^{-ix} \over 2} \\
\sin x  = \mathrm{Im}\{e^{ix}\} ={e^{ix} - e^{-ix} \over 2i}
\end{align}
$$
The two equations above can be derived by adding or subtracting Euler's formulas:
$e^{ix}  = \cos x + i \sin x $
$e^{-ix}  = \cos(- x) + i \sin(- x)  = \cos x - i \sin x $
