Using an infinite series to calculate a function will take a long time. Before doing so, ask yourself:

1. Is the function periodic? If so, reduce the argument to a single period.

2. Is it odd or even (f(x) == -f(-x) or f(x) == f(-x) )? If so, write the odd function as for example x*F(x^2), and the even function as for example G(x^2).

3. Are there any other attributes of the function that can help?

Once you have done that, you will find that only a finite number of elements are required to get the accuracy that you want.

Good luck!

15,667,736 members