  The aim of this paper is to find the numerical solutions of the second order
linear and nonlinear differential equations with Dirichlet, Neumann and Robin
boundary conditions. We use the Bernoulli polynomials as linear combination to
the approximate solutions of 2nd order boundary value problems. Here the
Bernoulli polynomials over the interval [0, 1] are chosen as trial functions so
that care has been taken to satisfy the corresponding homogeneous form of the
Dirichlet boundary conditions in the Galerkin weighted residual method. In
addition to that the given differential equation over arbitrary finite domain
[a, b] and the boundary conditions are converted into its equivalent form over
the interval [0, 1]. All the formulas are verified by considering numerical
examples. The approximate solutions are compared with the exact solutions, and
also with the solutions of the existing methods. A reliable good accuracy is
obtained in all cases.
