1

Why does the following simple example not return 1?

from sympy import *

r, theta, phi = symbols('r, theta, phi')
pprint(trigsimp(cos(phi)**2 * sin(theta)**2+sin(phi)**2 * sin(theta)**2  
+ cos(theta)**2))

Instead, I get

   2       2         2       2         2         2   
sin (φ)⋅sin (θ) - cos (φ)⋅cos (θ) + cos (φ) + cos (θ)

the same for simplify().

pawel_winzig
  • 902
  • 9
  • 28

1 Answers1

1

It seems to be only a version issue, in sympy 0.7.6.1 it works fine

pawel_winzig
  • 902
  • 9
  • 28