My brother brought me this same question, also on this website.
$$\int_{0}^{x}f(t)dt = x+\int_{x}^{1}tf(t)dt \tag{1}$$
When I try to solve it, I also did same thing. Differentiation leads to
$$f(x) = 1-xf(x)\\ f(x) = \frac{1}{1+x} \\ \int_{0}^{1}f(x) dx = \ln 2 $$
But try putting $x = 1$ in original equation $(1)$,
$$\int_{0}^{1} f(t) dt = 1$$
so what has happened? We get two contradictory results. Is it still true that $f(1) = 1/2$? Where is the mistake?
You are correct. The problem is with the person who made the question.
The functional equation is incorrect.
The correct functional equation for this function must be :
$$\int_{0}^{x}f(t)dt = x+\int_{x}^{1}tf(t)dt + \ln 2 -1$$
There are always issues, if you are differentiating an expression, and there are constants.
Since taking derivative destroys existence of any constant, often there are mistakes in questions, if not formatted correctly.