Finding a positive continuous function Currently I'm studying inverse problems and I have this question. I just don't realize how this is related to inverse problems and I also have no clue for the second part. I appreciate any help.

Is there a positive continuous function $f$ such that
$$\int_0^1f(x)dx=1$$
$$\int_0^1xf(x)dx=\alpha,\text{and} \int_0^1x^2f(x)=\alpha^2,$$
Where is $\alpha$ a positive number?

Using the integration by parts, I get $\alpha=0$, so there is no such function.
In the next part I'm asked to find the answer if the function is being replaced by a measure, which I have no clue about it.
 A: You have
$$
\int_0^1 (x-\alpha)^2f(x)\,dx = \int_0^1 (x^2-2\alpha x+\alpha^2)f(x)\,dx=\alpha^2-2\alpha\cdot\alpha+\alpha^2 =0.
$$
As the function $(x-\alpha)^2f(x)$ is non-negative and continuous, the vanishing of its integral forces $(x-\alpha)^2f(x)=0$ for all $x\in[0,1]$. This implies that $f(x)=0$ for all $x\in[0,1]\setminus\{\alpha\}$, and then (by continuity of $f$) that $f(x)=0$ for all $x\in[0,1]$. This contradicts the hypothesis $\int_0^1 f(x)\,dx =1$, so there is no such $f$.
A: Edit: This is a revised answer to the second question, based the idea in John Dawkins' excellent answer to the first question.
Suppose $f dx$ is replaced by a measure $\mu$ on the set $[0,1]$. (I'll assume that the $\sigma$-algebra is still the Lebesgue $\sigma$-algebra.)
We are told that
$$\int_0^1 1 d\mu = 1, \ \ \  \int_0^1 x d\mu = \alpha, \ \ \ \int_0^1 x^2 d\mu = \alpha^2.$$
Using the same calculation as in John Dawkins' answer, we find that
$$ \int_0^1 (x- \alpha)^2 d\mu = 0. $$
It follows that $x = \alpha$ almost everywhere with respect to the measure $\mu$, i.e. the set $[0,1] \ \backslash \ \{ \alpha \}$ is a null set. Hence the measure $\mu$ must be of the form
$$ \mu(E) = \begin{cases} k & \alpha \in E \\ 0 & \alpha \notin E\end{cases}$$
for some constant $k \geq 0$.
Since $\int_0^1 1 d\mu = 1$, we deduce that $k = 1$ and $\alpha \in [0,1]$, i.e. $\mu$ is the Dirac measure concentrated at $\alpha$. This $\mu$ does indeed reproduce the correct integrals for $x$ and $x^2$.
