title: How to plot a summation with two variables in Python 3
body: <p>I would like to make a function and use pyplot to plot it nicely.<br>
  The function it self looks like this: </p>
  
  <p><a href="https://i.stack.imgur.com/YD8xy.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YD8xy.gif" alt="enter image description here"></a></p>
  
  <p>I am tasked with plotting C for k = [2, 4, 6, 8, 10] for x in range [-3pi, 3pi].
  I also want to plot cos(x) in the same window. </p>
  
  <p>Is there also a way to animate this?</p>
  
  <p>my code so far is :</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import math 
  n=0;
  def C_series(n):
      return (((-1)**n)*x**(2*n)) / math.factorial(2*n)
  
  C_func = np.vectorize(C_series)
  x = np.arange(-3*math.pi, 3*math.pi, 5.0)
  k = np.arange(2, 10, 2)
  T = C_func(n)
  plt.plot(T, k)
  </code></pre>
  
  <p>can anyone give me any pointers as to what I am doing wrong?
  I did not mean for this to be a tutorial, and I got some harsh comment, but I hope that now I am trying to grab the apple.</p>