> Try it in isympy, like this:
>
> >>> test=c2**2*q2p*c3 + c1**2*s2**2*q2p*c3 + s1**2*s2**2*q2p*c3 -
> >>> c1**2*q1p*c2*s3 - s1**2*q1p*c2*s3
> >>> test.subs({c1**2 : 1-s1**2, c2**2 : 1-s2**2, c3**3: 1-s3**2})
>
> ⎛ 2⎞ 2 ⎛ 2⎞ ⎛ 2⎞ 2 2
> c₃⋅q2p⋅⎝1 - s₂ ⎠ + c₃⋅q2p⋅s₂ ⋅⎝1 - s₁ ⎠ - c₂⋅q1p⋅s₃⋅⎝1 - s₁ ⎠ + c₃⋅q2p⋅s₁ ⋅s₂
>
> 2
> - c₂⋅q1p⋅s₃⋅s₁>>> print test.subs({c1**2 : 1-s1**2, c2**2 : 1-s2**2, c3**3:
> 1-s3**2})
>
> c3*q2p*(1 - s2**2) + c3*q2p*s2**2*(1 - s1**2) - c2*q1p*s3*(1 - s1**2)
> + c3*q2p*s1**2*s2**2 - c2*q1p*s3*s1**2>>> test.subs({c1**2 : 1-s1**2, c2**2 :
> 1-s2**2, c3**3: 1-s3**2}) == c3*q2p*(1 - s2**2) + c3*q2p*s2**2*(1 - s1**2) -
> c2*q1p*s3*(1 - s1**2) + c3*q2p*s1**2*s2**2 - c2*q1p*s3*s1**2
>
> True
>
> Does it work or fail for you? We'll go from there.
Odd. I just put it onto my laptop for comparison, and it works
there. Now it's just a mystery as to why it doesn't work on my Ubuntu
machine.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.