Maclaurin series ================ We are given the two following Maclaurin series that correspond respectively to the development of functions :math:`\frac{1}{1-x}` and *arctangent*: :math:`\sum_{n=0}^{k} x^{n} = 1 + x + x^{2} + x^{3} + \cdots` :math:`\sum_{n=0}^{k}(-1)^{n} \frac{x^{2n+1}}{2n+1} = x - \frac{x^{3}}{3} + \frac{x^{5}}{5} - \frac{x^{7}}{7} + \cdots` Save all function into file ``maclaurin.py``. #. Given a real value ``x`` as :math:`-1 \leq x \leq 1` and another positive real value ``epsilon`` which is the tolerance, write the function :py:func:`series1` to calculate the sum of terms of the first given series. The summation must stop when two consecutive terms are equal with a tolerance ``epsilon``, in other words, when the absolute value of the difference between them is less than ``epsilon``. Examples: .. literalinclude:: maclaurin1.txt :language: python3 :lines: 3- .. note:: You can download the file with tests :download:`maclaurin1.txt ` #. Write the function :py:func:`series2` analogous to function :py:func:`series1` but using the second given series. Examples: .. literalinclude:: maclaurin2.txt :language: python3 :lines: 3- .. note:: You can download the file with tests :download:`maclaurin2.txt ` .. rubric:: Solution A solution of these functions is provided in the :download:`maclaurin.py `