A new Legendre polynomial-based approach for non-autonomous linear ODEs (Electronic transactions on numerical analysis)