I have a problem which I think is wrong.
Let $f: [a,b] \to \mathbb{R}$ be a differentiable function with $f'$ continuous such that $$\int_a^b f(x) d x = f\left(\frac{a+b}{2}\right) = 0$$
Prove that $$\int_a^b \big(f'(x)\big)^2 d x - 2 \big(f(a) + f(b)\big)^2 \geq \frac{8}{(b-a)^2} \int_a^b \big(f(x)\big)^2 d x$$
If it's correct, can you show me your solution? Else, can you fix it?
First, the proposed inequality is totally wrong. Indeed, consider $$f : [-1, 1] \to \mathbb{R}, f(x) = 18 |x|^{13/5} - 11 |x|^{6/5}$$ (so $a = -1, b = 1$.) Clearly $f$ has a continuous first derivative, and it is straightforward to check that $$\renewcommand{\intd}{\,\mathrm{d}} \int_{-1}^1 f(x) \intd x = 0 = f(0)$$ while $$A = \int_{-1}^1 \big(f'(x)\big)^2 \intd x - 2\big(f(-1) + f(1)\big)^2 = \frac{608}{35} \approx 17.37$$ and $$B = 2 \int_{-1}^1 \big(f(x)\big)^2 \intd x = \frac{11270}{527} \approx 21.385$$ So, the proposed inequality is wrong.
A Family of Possible Corrections.
Consider a function $f : [-1, 1] \to \mathbb{R}$ such that $$\int_{-1}^1 f(x) \intd x = 0 = f(0)$$ Note that $$\renewcommand{\defeq}{~{\buildrel{\rm def}\over =}~} \newcommand{\sgn}{\mathrm{sgn}} A \defeq f(1) + f(-1) = \int_{-1}^1 \sgn(x) f'(x) \intd x$$ Let $\lambda$ be a real constant. Now we have $$\int_{-1}^1 \big(f(x) - \lambda A\big)^2 \intd x = \int_{-1}^1 \big(f(x)\big)^2 \intd x + \lambda^2 A^2 \tag{1}$$ because $\int_{-1}^1 f(x) \intd x = 0$. On the other hand $$f(x) - \lambda A = \int_0^x f'(t) \intd t - \lambda \int_{-1}^1 \sgn(t) f'(t) \intd t = \int_{-1}^1 K(x,t) f'(t) \intd t$$ where $K(x,t)$ is defined as follows:
Thus, using Cauchy-Schwarz inequality, $$\big(f(x) - \lambda A\big)^2 \leq \int_{-1}^1 \big(K(x,t)\big)^2 \intd t \int_{-1}^1 \big(f'(t)\big)^2 \intd t$$ So, $$\int_{-1}^1 \big(f(x) - \lambda A\big)^2 \intd x \leq \int_{-1}^1 \left(\int_{-1}^1 \big(K(x,t)\big)^2 \intd t\right) \intd x \cdot \int_{-1}^1 \big(f'(t)\big)^2 \intd t$$ The calculations are not hard and we get $$\int_{-1}^1 \left(\int_{-1}^1 \big(K(x,t)\big)^2 \intd t\right) \intd x = 1 - 2 \lambda + 4 \lambda^2$$ That is $$\int_{-1}^1 \big(f(x) - \lambda A)^2 \intd x \leq (1 - 2 \lambda + 4 \lambda^2) \cdot \int_{-1}^1 \big(f'(t)\big)^2 \intd t \tag{2}$$ Combining $(1)$ and $(2)$, we finally get
$$ \int_{-1}^1 \big(f(x)\big)^2 \intd x + \lambda^2 \big(f(1) + f(-1)\big)^2 \leq (1 - 2 \lambda + 4 \lambda^2) \cdot \int_{-1}^1 \big(f'(t)\big)^2 \intd t \tag{3} $$
For example, if $\lambda = 1/4$, we obtain $$\int_{-1}^1 \big(f(x)\big)^2 \intd x + \frac{1}{16}\big(f(1) + f(-1)\big)^2 \leq \frac{3}{4} \cdot \int_{-1}^1 \big(f'(t)\big)^2 \intd t$$
Remark. The case of a function $f : [a, b] \to \mathbb{R}$ is obtained by applying the preceding case to $g(x) = f\left(\frac{a + b}{2} + x \frac{b-a}{2}\right)$.
Remark. In fact, there is a more subtle reason why the proposed inequality cannot be true. Consider for $a < b$ and a function $f$ with continuous derivative on $[a,b]$ the quantity $$\Delta(a, b; f) = \int_a^b \big(f'(x)\big)^2 \intd x - 2 (f(a) + f(b))^2 - \frac{8}{(b-a)^2} \int_a^b \big(f(x)\big)^2 \intd x$$ Now, for $\lambda > 0$ and $f : [a,b] \to \mathbb{R}$ we define $f_\lambda$ to be the function defined on $\left[\frac{a}{\lambda}, \frac{b}{\lambda}\right]$ by $f_\lambda(x)=f(\lambda x)$. With this notation we have $$\Delta\left(\frac{a}{\lambda}, \frac{b}{\lambda}; f_\lambda\right) = \lambda \Delta(a, b; f) + 2 (\lambda - 1) \big(f(a) + f(b)\big)^2$$ So, if $f(a) + f(b) \ne 0$, there is always $\lambda, \Lambda > 0$ where the inequality holds for $f_\lambda$ and does not hold for $f_\Lambda$.