title: Why does my Sympy code calculate the first order Taylor series approximation incorrectly?
body: <p>I have an expression like this</p>
  
  <p><a href="https://i.stack.imgur.com/0tR8k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0tR8k.png" alt="sympy expression"></a></p>
  
  <p>which is entered into Sympy like this (for the sake of a reproducible example in this question)</p>
  
  <pre><code>from sympy import *
  expression = Add(Mul(Integer(-1), Float('0.9926375361451395', prec=2), Add(Mul(Float('0.33167082639756074', prec=2), Pow(Symbol('k1'), Float('-0.66666666666666674', prec=2)), Pow(Symbol('n1'), Float('0.66666666666666674', prec=2))), Mul(Float('0.97999999999999998', prec=2), exp(Mul(Integer(-1), Symbol('mu1'))))), Pow(Add(Mul(Float('0.97999999999999998', prec=2), Symbol('k1'), exp(Mul(Integer(-1), Symbol('mu1')))), Mul(Integer(-1), Symbol('k2')), Mul(Pow(Symbol('n1'), Float('0.66666666666666674', prec=2)), Pow(Mul(Symbol('k1'), exp(Mul(Integer(-1), Symbol('mu1')))), Float('0.33333333333333331', prec=2)))), Integer(-1))), Pow(Add(Mul(Float('0.97999999999999998', prec=2), Symbol('k0'), exp(Mul(Integer(-1), Symbol('mu0')))), Mul(Integer(-1), Symbol('k1')), Mul(Pow(Symbol('n0'), Float('0.66666666666666674', prec=2)), Pow(Mul(Symbol('k0'), exp(Mul(Integer(-1), Symbol('mu0')))), Float('0.33333333333333331', prec=2)))), Integer(-1)))
  </code></pre>
  
  <p>Eyeballing this expression, the first order Taylor approximation for any of the variables, e.g. <code>k1</code>, around some nonzero value should be nonzero, but this code</p>
  
  <pre><code>x = symbol("x")
  expression.series(k1, x0 = x, n = 1)
  </code></pre>
  
  <p>just returns <code>0</code>. This is a problem because I'm trying to (eventually) calculate a multivariate Taylor series approximation, in a similar vein to <a href="https://stackoverflow.com/a/22877011/2766558">this answer</a>, and if one of the series expansions mistakenly evaluates to zero, the whole thing breaks down.</p>
  
  <p>Did I code something wrong, or is my basic calculus just THAT bad and this actually evaluates to zero? From the <a href="http://docs.sympy.org/latest/tutorial/calculus.html#series-expansion" rel="nofollow noreferrer">documentation on <code>series</code></a>, I'm <em>fairly</em> certain that I'm using it correctly.</p>