Solutions of linear second order initial value problems by using Bernoulli polynomials