Calculate the kink energy, in Julia#

kink = tanh(x)
energy = dkink^2 + V(kink)