The question states that I have to use the special case: $$\left(\int_0^1f(x)\ dx \right)^2 \leq \int_0^1 f(x)^2 \, dx$$ to prove $$\left(\int_a^b f(x) dx\right)^2 \leq (b-a)\int_a^b f(x)^2 dx$$ for a continuous function $f$ on $[a,b]$. This is my attempt:
Use the generalized mean value theorem for integrals which states:
$$\int_a^b f(x)g(x)dx = f(\alpha)\int_a^b g(x)dx$$
for some $\alpha \in (a,b)$. Let $g(x)=f(x)$ and get that:
$$\left(\int_0^1f(x)\ dx \right)^2 \leq \int_0^1 f(x)^2 \, dx = f(\alpha)\int_0^1f(x)\,dx$$
for some $\alpha \in (0,1)$. Simplify the equation and we get: $$\int_0^1 f(x) \, dx \leq f(\alpha)$$
Again remember the mean value theorem: $$f(\alpha)(b-a)=F(b)-F(a)$$
Go backwards from here and we find:
$$F(b)-F(a) = \int_a^b f(x) \, dx = f(\alpha)(b-a)$$ $$\Rightarrow \left(\int_a^b f(x) \, dx \right)^2 = f(\alpha)(b-a)\int_a^b f(x) \, dx = (b-a)\int_a^b f(x)^2 \, dx$$
I see two problems without my solution:
1) Have I really used the special case to solve it? My use of it felt redundant to the approach I took, even if it helped me get an idea on what to do.
2) I have proved an equality instead of the more generalized case of less-or-equal which makes me think I've done something wrong.
The question has been reported for being a duplicate, but the other question does not handle generalized limits and is not an inequality.
Updated solution:
Change of variables: $t=\dfrac{x-a}{b-a} \Rightarrow x=t(b-a)+a \Rightarrow dx=(b-a)dt$ $$\int_a^b f(x)\, dx = \int_0^1 f(t(b-a)+a)(b-a)\, dt$$ $$\int_a^b f(x)^2\, dx = \int_0^1 (f(t(b-a)+a))^2(b-a)\, dt = (b-a)\int_0^1 (f(t(b-a)+a))^2 \, dt$$ $$= \ (b-a)\int_a^b f(x)^2\, dx$$
The special case tells us that:
$$\left(\int_0^1 f(t(b-a)+a)(b-a)\, dt\right)^2\leq \int_0^1 (f(t(b-a)+a))^2(b-a)\, dt$$
Move out the constant $(b-a)$ och substitute back $f(x)$:
$$\left(\int_a^b f(x)\, dx\right)^2 \leq \ (b-a)\int_a^b f(x)^2\, dx$$
QED.
There is no reason why the two $\alpha$'s you got are the same. So your argument fails.
The correct thing to do is to make the change of variable $y=\frac {x-a} {b-a}$. This gives $\int_a^{b} f(x)dx=\int_0^{1} f(a+(b-a)y)(b-a) dy$ If you now apply the special case you will get the general case immediately.