So, I need to find an extremal of a given functional
J=Integrate[12*x*y+(y')^2,{x,1,3}]
To do that I write the Euler's equation and get the DE: 12xy-2*y"=0. 
Then I try to do the same thing using Mathematica and EulerEquations[] function. And it returns just -2y"=0, ignoring 12x. 
What am I doing wrong? How to make Mathematica consider the independent variable?