I would like to know how exactly to calculate the variational derivative of: $$L = \oint dx \: \frac{m}{a} (\dot{u}(x,t))^2 - ca(u'(x,t)^2\tag{1}$$ with respect to $u$, ($\delta L / \delta u$). The variable $x$ is integrated over a closed loop defined on an interval from $0$ to some length $a$ where $u(0) = u(a)$.
Following my lecture notes, the result is meant to be $$\delta L / \delta u = cau''\tag{2}$$ but whatever I do I don't get the integral over $x$ canceled. I have also used partial integration and the fact that $$\frac{\delta}{\delta u} = \frac{\partial \:\delta}{\partial x\: \delta u'}\tag{3}$$ and tried to treat the expression as a partial derivative in $u$, but somehow I never get rid of the closed integral. Hopefully someone might be able to help me out.