  We apply the averaging theory of high order for computing the limit cycles of
discontinuous piecewise quadratic and cubic polynomial perturbations of a
linear center. These discontinuous piecewise differential systems are formed by
two either quadratic, or cubic polynomial differential systems separated by a
straight line.
  We compute the maximum number of limit cycles of these discontinuous
piecewise polynomial perturbations of the linear center, which can be obtained
by using the averaging theory of order $n$ for $n=1,2,3,4,5$. Of course these
limit cycles bifurcate from the periodic orbits of the linear center. As it was
expected, using the averaging theory of the same order, the results show that
the discontinuous quadratic and cubic polynomial perturbations of the linear
center have more limit cycles than the ones found for continuous and
discontinuous linear perturbations.
  Moreover we provide sufficient and necessary conditions for the existence of
a center or a focus at infinity if the discontinuous piecewise perturbations of
the linear center are general quadratic polynomials or cubic quasi--homogenous
polynomials.
