I came across a piecewise function which seems pretty basic, but I don't know how to find the moment-generating function. If $X$ has the pdf $f_X(x)=x$ for $0\leq x\leq 1$, $2-x$ for $1\leq x \leq 2$ and $0$ elsewhere, how do we find $M_X(t)$?
basic moment generating function
2
$\begingroup$
probability-distributions