Consider a non-autonomous system
$ m \ddot{x} + k_1\dot{x} + k_2 x^3 = 0 $
Assume we perturb the initial position to $x_0 = x_0 + \delta x_0$. The resulting system trajectory is denoted as $x(t)$. Now in a book they have derived the differential equation concerning the motion error $e$ to be
$m\ddot{e} + k_1\dot{e} + k_2[e^3 + 3 e^2 \dot{x}(t) + 3 e \dot{x}^2(t)] = 0$
Can someone help me to derive this ?
Hint : Replace $x$ by $x+e$ in the first equation and do not forget that $x$ satisfies $m \ddot{x} + k_1\dot{x} + k_2 x^3 = 0$.