On the algebraic reconstruction of the Duffing's mechanical system