For a real quantity, its absolute value should be equal to the square-root of the quantity squared. Thus, in the example below (i.e., for |u'(x)|), why do I get different functional derivatives? What do I miss something? What is the correct answer?
Needs["VariationalMethods`"];
A = Sqrt[D[u[x], x]^2];
B = Abs[D[u[x], x]];
dA = VariationalD[A, u[x], x]
dB = VariationalD[B, u[x], x]