Find an example of a function $f(x)\neq-2x$ such that $\int_{0}^{1} \left[ -2x-f(x) \right]{\rm d}x = 0$ I'm having some trouble knowing where to start with this problem.
Find an example of a function $f(x)\neq-2x$ such that 
$$\int_{0}^{1} \left[ -2x-f(x) \right]{\rm d}x = 0$$
I'm looking for a nudge in the right direction rather than a complete solution.
 A: HINT: You can get one such $f(x)$ by using the fact $$\int_0^1 (1-2x) dx=0$$
Can you use it to find a suitable $f(x)$?
Again, rewrite the above as $$\int_0^1 (\frac{1}{2}-x) dx=0$$
Can you use this to find another suitable $f(x)$?
A: Well do a little bit of integration to show that
$$\int(-2x-f(x))dx=-x^2-\int f(x)dx$$
which means that
$$\int_{0}^{1}(-2x-f(x))dx=-1-\left. \int f(x)dx \right |_{x=1}+\left. \int f(x)dx \right |_{x=0}=0$$
Therefore
$$F(0)-F(1)=1$$
where
$$f(x)=\frac{d}{dx}F(x)$$
So if you can find a suitable $F$, which has a kinder looking requirement to satisfy. You can just take the derivative to get back $f$.
A: HINT:
$$\int_0^1\left[-2x-f(x)\right]\space\text{d}x=0\Longleftrightarrow$$
$$-2\int_0^1 x\space\text{d}x-\int_0^1 f(x)\space\text{d}x=0\Longleftrightarrow$$
$$-2\int_0^1 x\space\text{d}x-\int_0^1 f(x)\space\text{d}x=0\Longleftrightarrow$$
$$-2\left[\frac{x^2}{2}\right]_0^1-\int_0^1 f(x)\space\text{d}x=0\Longleftrightarrow$$
$$-\left[x^2\right]_0^1-\int_0^1 f(x)\space\text{d}x=0\Longleftrightarrow$$
$$-\left(1^2-0^2\right)-\int_0^1 f(x)\space\text{d}x=0\Longleftrightarrow$$
$$-1-\int_0^1 f(x)\space\text{d}x=0\Longleftrightarrow$$
$$-\int_0^1 f(x)\space\text{d}x=1\Longleftrightarrow$$
$$\int_0^1 f(x)\space\text{d}x=-1$$
