When $x\in(0,+\infty)$, f(x) is a continuous function and $ \int_0^x f(t)dt =\frac{xf(x)}{2}$. Show that $f(x)=cx$.(c is a constant) It is clear that if I can show $\frac{f(x)}{x}-\frac{f(y)}{y}=0$, all is done.$(\forall x,y\in(0,+\infty))$. However, when I substitute $f(x)$ and $f(y)$ with the equation, I don't know what I should do in next step.
Actually, I don't think my idea is wise.
Thank you.
 A: If you differentiate both sides of the equality$$\int_0^x f(t)\,\mathrm dt=\frac12xf(x),$$what you get is that$$f(x)=\frac12\bigl(xf'(x)+f(x)\bigr),$$which is equivalent to $f(x)=xf'(x)$. Now, let $g(x)=\frac{f(x)}x$. Then$$g'(x)=\frac{xf'(x)-f(x)}{x^2}=0$$and therefore $g(x)=c$, for some number $c$. But then $f(x)=cx$.
A: The problem is not really well posed. The function $f$ is assumed to be continuous over $(0,\infty)$, and nothing makes the integral
$$
\int_0^x f(t)\,dt
$$
to be meaningful. However, if we assume these integral exist, we can say
$$
F(x)=\int_0^x f(t)\,dt=K+\int_1^x f(t)\,dt
$$
where $K$ is the integral from $0$ to $1$.
Then $f(x)=F'(x)$ and your relation reads
$$
2F(x)=xF'(x)
$$
If you multiply by $x$, you get
$$
x^2F'(x)-2xF(x)=0
$$
This implies
$$
D\left(\frac{F(x)}{x^2}\right)=0
$$
(quotient rule) so
$$
F(x)=cx^2
$$
Therefore
$$
f(x)=F'(x)=2cx
$$

If you assume $f$ is continuous over $\mathbb{R}$, you can easily conclude with the same method that there are two constants, $c^{\mathstrut}_+$ and $c^{\mathstrut}_{\mathstrut-}$ such that
$$
f(x)=\begin{cases}
c^{\mathstrut}_+x & x>0 \\[4px]
0 & x=0 \\[4px]
c^{\mathstrut}_{\mathstrut-}x & x<0
\end{cases}
$$
