Cumulant generating function of continuous uniform distribution With $f(x)=\frac{1}{b-a}$, I got the MGF, $M(t) = \frac{e^{bt}-e^{at}}{t(b-a)}$, and the cumulant generating function, $K(t) = \ln (e^{bt}-e^{at}) - \ln [t(b-a)]$. However, when I tried to find the first cumulant $\kappa_1$,
\begin{align*}
\kappa_1 
&= \frac{d}{dt}\big(\ln\left[{\exp\left(bt\right)-\exp\left(at\right)}\right]-\ln[{t(b-a)}]\big)\biggr\rvert_{t = 0}\\
&= \frac{b\exp\left(bt\right)-a\exp\left(at\right)}{\exp\left(bt\right)-\exp\left(at\right)}-\frac{1}{t}\biggr\rvert_{t = 0}\\
\end{align*}
which I am a bit confused with, as it should gives $\kappa_1 = \mu = \frac{a+b}{2}$.
Edit:
Following @Kavi Rama Murthy's suggestion, I have got the following:
\begin{align*}
&= \lim_{t \to 0}\frac{be^{bt}-ae^{at}}{e^{bt}-e^{at}}-\frac{1}{t}\\
&= \lim_{t \to 0}\frac{b(1+bt)-a(1+at)}{(1+bt)-(1+at)}-\frac{1}{t}\\
&= \lim_{t \to 0}\frac{b+b^2t-a-a^2t}{t(b-a)}-\frac{1}{t}\\
&= \lim_{t \to 0}\frac{b-a}{t(b-a)}+\frac{b^2t-a^2t}{t(b-a)}-\frac{1}{t}\\
&= \lim_{t \to 0}\frac{1}{t}+\frac{t(b-a)(b+a)}{t(b-a)}-\frac{1}{t}\\
&= b+a
\end{align*}
but I still cannot get $\frac{b+a}{2}$.
 A: At the end, I have figured out that L'Hôpital's rule would work.
\begin{align*}
\kappa_1
                &= \mu\\
                &= \frac{d}{dt}\Big[\ln\left({e^{bt}-e^{at}}\right)-\ln[{t(b-a)}]\Big]\biggr\rvert_{t = 0}\\
                &= \left[\frac{be^{bt}-ae^{at}}{e^{bt}-e^{at}}-\frac{1}{t}\right]\biggr\rvert_{t = 0}\\
                &= \lim_{t \to 0} \frac{be^{bt}-ae^{at}}{e^{bt}-e^{at}}-\frac{1}{t}\\
                &= \lim_{t \to 0} \frac{t(be^{bt}-ae^{at})-e^{bt}+e^{at}}{t(e^{bt}-e^{at})}\\
                &= \lim_{t \to 0} \frac{\frac{\partial}{\partial t}\left[t(be^{bt}-ae^{at})-e^{bt}+e^{at}\right]}{\frac{\partial}{\partial t}\left[t(e^{bt}-e^{at})\right]}\\
                &= \lim_{t \to 0} \frac{t(b^2e^{bt}-a^2e^{at})}{e^{bt}(bt+1)-e^{at}(at+1)}\\
                &= \lim_{t \to 0} \frac{\frac{\partial}{\partial t}\left[t(b^2e^{bt}-a^2e^{at})\right]}{\frac{\partial}{\partial t}\left[e^{bt}(bt+1)-e^{at}(at+1)\right]}\\
                &= \lim_{t \to 0} \frac{b^2e^{bt}(bt+1)-a^2e^{at}(at+1)}{be^{bt}(bt+2)-ae^{at}(at+2)}\\
                &= \frac{b^2-a^2}{2(b-a)}\\
                &= \frac{{(b-a)}(b+a)}{2{(b-a)}}\\
                &= \frac{a+b}{2}\\
\end{align*}
