function grad = gradient_analytical(x, a, b, e, vt)
    grad = -e*(1-tanh(-(x+a+vt)/b).^2)/b;
end