Probability Question: Find $a$ and $b$ given expected value and density function The density function of $X$ is given by
\begin{align*}
f(x) =\begin{cases}
a+bx^2, & \text{if}\,\,0\leq x\leq 1\\
0,      & \text{otherwise}
\end{cases}
\end{align*}
Once $\textbf{E}(X) = 4.25$, find $a$ and $b$

Using legitimacy, 
$$\int\limits_{0}^{1} f(x) dx = 1$$
$$\int\limits_{0}^{1} (a + b x^{2}) dx = 1$$
$$ \bigg[ax + \frac{bx^{3}}{3}\bigg]_{0}^{1} = 1$$
$$ a + \frac{b}{3} = 1$$
$$ 3a + b = 3$$
Using expectation,
$$\int\limits_{0}^{1} x f(x) dx = 4.25$$
$$\int\limits_{0}^{1} (ax + b x^{3}) dx = 4.25$$
$$ \bigg[\frac{ax^{2}}{2} + \frac{bx^{4}}{4}\bigg]_{0}^{1} = 4.25$$
$$ \frac{a}{2} + \frac{b}{4} = 4.25$$
$$ 2a + b = 4 \times 4.25$$
$$ 2a + b = 17 $$
Can you take it from here?
EDIT: Turns out that after solving the equations for $a$ and $b$, $f$ takes negative values on $[0, 1]$, which makes it a wrong density function. Pointed out by @Michael Hoppe
