Why $f(x)$ cannot be obtained clearly from $\int ^{b}_{a} (f(x)-3x)\; dx=a^2-b^2$ 
If $$\int ^{b}_{a} (f(x)-3x)\; dx=a^2-b^2$$ then the value of $f(\frac{\pi}{6})$ is


Ans: [$\frac{\pi}{6}$]  OR [$\frac{\pi}{6},\frac{2\pi}{3},\frac{\pi}{3},\frac{\pi}{2},\pi$ {ie all given options}] according to the official exam answer key


Question Source: JEE ADVANCED 2011, Subpart of match the column.

My doubt: I understand the following solution of $\frac{\pi}{6}$ by assuming (it was not given in original question) question statement valid for all $a,b\in\mathbb R$ & $a\neq b$ as stated here pg-48 to 50

The data in (B) is not proper. The symbols $a$ and $b$ are normally used
for some constants whose values are fixed in a particular problem. With
this interpretation the given equation viz.
$$\int_a^b
(f(x) − 3x) dx = a
^2 − b
^2
$$
means nothing. It would mean a lot if this equality were to hold for all
real values of a and b. The paper-setters ought to have made this explicit.
With this interpretation, we are free to give any values to a and b. Let
us put $a = 0$ and $b$ to be a variable $x$. Replacing the dummy variable of
integration by $t$ we now have
$$\int_0^x
(f(t) − 3t) dt = −x
^2
$$
Differentiating both the sides w.r.t. x (using the second form of the fundamental theorem of calculus), we get
$$f(x) − 3x = −2x $$
Concluding $f(x)=x$ and hence $f( \frac{\pi}{6}) = \frac{\pi}{6}$

but I want to know because of which mathematical error exactly 2 answers were given and question did not got bonus completely (ie marks given to all candidates)? Official paper see pg 25 Q-59 part B
 A: Explanation of the point in the PDF
I will try my best to explain. The problem is that there maybe many such functions which integrates to the quantity $a^2 - b^2$ over the interval $\int_a^b$ for a fixed value of $a$ and $b$. For example, if $a=0,b=1$:
$$ \int_0^1 f(x)-3x dx =0^2 -1^2$$
$$\int_0^1 f(x) dx=-1+\int_0^1 3x dx = \int_0^1 (3x-1) dx =1/2$$
then $f(x)=\frac12 $ and $f(x)= (3x-1)$ also satisfies given conditions. Hence, there are many $f$ such that the result is true.
So, from this , there is not enough information to uniquely identify the function since many functions map to the same integral expression under the interval. Also, the question should be technically a bonus.
However, if we say that this true for any interval subset of a bigger interval set (eg: think of subsets of $R$), then we can uniquely determine the function by fixing one of the bounds and letting the other vary. In the case of this question, we got the expression true for all $(a,b)$ intervals in $\mathbb{R}$, hence we consider the integral over the variable interval $(0,x)$ and Leibniz the expression.

the issue is either candidate may assume a=b or a≠b giving 2 answers and not bonus.

If you take $a=b$, then there is really no information to be derived since $\int_a^a f(x) dx$ is zero for all $f$. What you gotta do, as I said before, is take the variable set thing.

Note: I have assumed continuity of the function to say the below.
Under the assumption that result is true for all $(a,b)$ we can rewrite the original expression as:
$$\int_a^b (f(x) - 3x) dx = \int_a^b (-2x) dx$$
But, this is true for all $(a,b)$ but that is only possible if the inside integrands agree, hence $f(x)=x$. But, if it is only true for certain value of $(a,b)$ like initial case, we can't directly equate in such a way.
A: Even if the question were

Find $f\left(\pi/6\right)$, given that $\int_{a}^{b}(f(x)-3x)\,dx =
 a^2-b^2$ holds for any $a,b\in\mathbb{R}$.

it would have been poorly written. For any constant $k$, the function
$$ f(x) = x +\left\{\begin{array}{rcl}0 &\text{if }x\neq \pi/6\\ k &\text{if }x=\pi/6\end{array}\right. $$
is a solution with $f(\pi/6)=k+\pi/6$. A non-ambiguous question is

Given that $f:\mathbb{R}\to\mathbb{R}$ is a continuous function such that $\int_{a}^{b}(f(x)-3x)\,dx =
 a^2-b^2$ holds for any $a,b\in\mathbb{R}$, find $f(\pi/6)$.

One needs to fix two different things to turn the given question into a rigorous one.
