title: Solving Arc tan using Taylor series
body: <p>I want to solve arctan (x) using a Taylor series but my code doesn't work. How do I solve this?</p>
  
  <pre><code>#!usr/bin/python
  
  
  from numpy import *    
  
  def err(string):
      print string
      raw_input ('Press Enter to Exit')
      sys.exit()
  
  def postive_term(x)
      sum_i = 0.0
      for i in range(50):
          Y(i) = 1**((4.0*i)+1.0)/((4.0*i)+1.0)
      sum_i = Y(i)
      return sum_i
  
  def negatif_term(x)
      sum_j = 0.0
      for j in range(50):
          S(j) = 1**((4.0*j)+3.0)/((4.0*j)+3.0)
      sum_j = S(j)
      return sum_j                   
  
  u(i) = sum_i - sum_j
  
  print 'result Tan^{-1} (x)=', u(i)`
  </code></pre>