Variational derivative of a Lagrangian

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.

I would like to know how exactly to calculate the variational derivative of: $$L = \oint dx \: \frac{m}{a} \dot{u}(x,t) - ca(u')^2$$ with respect to $$u$$, ($$\delta L / \delta u$$). Following my lecture notes, the result is meant to be $$\delta L / \delta u = cau''$$ but whatever I do I don't get the integral over $$x$$ canceled.
The variational derivative is a functional derivative, which is defined to be just the part that is integrated against $$\delta u$$ to get $$\delta L$$.
$$\delta L = \int dx \frac{\delta L}{\delta u(x)}\delta u(x)$$
This is why you "cancel" the integral to arrive at the expression for $$\delta L/\delta u(x)$$.