Numerical solution of the Duffing equation with three types of boundary conditions using shifted Legendre polynomials | Synapse