# How to prove that $y$ is a minimiser for a certain functional $J$?

## The problem

Consider the functional $$J(y)=\int_a^b (y')^2 \, \mathrm{d}x$$ where $$y \in D = C^{1,\mathrm{pw}}[a,b] \cap \{ y(a)=A,y(b)=B \}$$ (the usual domain in the calculus of variations). We are told this functional is known as the "Dirichlet integral".

Solving the Euler-Lagrange equation relating to this function and considering the boundary conditions, one obtains the function $$y_0(x)=\frac{B-A}{b-a}x+\frac{bA-aB}{b-a}$$ as the only possible minimiser for $$J$$ on $$D$$.

As an assignment, I have to prove that $$y_0$$ is indeed a minimiser, by showing that $$J(\tilde{y}) \geq J(y_0)$$ for all $$\tilde{y} \in D$$.

## How far I got

Plugging $$y_0$$ into $$J$$, we get: $$J(y_0)=\frac{(B-A)^2}{b-a}$$ So we need to show that $$J(\tilde{y})=\int_a^b (\tilde{y}')^2 \, \mathrm{d}x \geq \frac{(B-A)^2}{b-a}$$ for all $$\tilde{y} \in D$$.

We are advised to use integration by parts somehow. Applying this on $$J(\tilde{y})$$ yields: \begin{align} J(\tilde{y}) & = \int_a^b (\tilde{y}')^2 \, \mathrm{d}x\\ & = \left . (\tilde{y} \tilde{y}') \right |_a^b - \int_a^b \tilde{y} \tilde{y}'' \, \mathrm{d}x\\ & = B \tilde{y}'(b) - A \tilde{y}'(a) - \int_a^b \tilde{y} \tilde{y}'' \, \mathrm{d}x\\ \end{align}

This is as far as I got, though. I just don't see how to get anywhere from here. It would be great if someone could provide a hint so that I can finish the proof myself, though a full-fledged answer would be appreciated as well. Thanks in advance!

Hint: Write $$\bar y=y_0+h$$, expand the integrand and apply integration by parts only to the summand that contains derivatives of $$y$$ and $$h$$. For the boundary terms, take into account that $$h$$ satisfies the boundary conditions $$h(a)=h(b)=0$$.