# How to neglect higher power terms in a polynomial expression

I have a polynomial expression of order n (say n=20). F(x)=1+x+x^2+x^3++...x^20.

I want to approximate the polynomial for order 3 only. So I need to make the coefficient of power of x greater than 3 to zero. How can I do that in Mathematica?

-
Try Series[1 + x + x^2 + x^3 + x^20, {x, 0, 5}] // Normal. –  b.gatessucks Jul 16 '13 at 10:35
You question in not clear. The approximation theory is a vast subject. But if you want only to delete powers greater than 3, I'd do it this F[x] /. x^k_ /; k > 3 :> 0 having defined e.g. F[x_] = Total[x^Range[0, 20]];. –  Artes Jul 16 '13 at 10:36
Over what range do you need the approximation to be accurate? Simply truncating the polynomial, $1 + x + x^2 + x^3 + x^20$ leaves you with approx. a $10\%$ error at $x=1$. It quickly falls below machine precision ($10^{-16}$) on my machine at $x \approx 0.16$. However, if you need a more uniform error, you should look at expanding it in terms of Chebyshev polynomials. –  rcollyer Jul 16 '13 at 12:58

 1 + x + x^2 + x^3 + x^4 + x^20 // Function[y, Normal[y + O[x]^4]]

1 + x + x^2 + x^3