I answered to you on StackOverflow. You should be more clear by posting questions, this looks like a problem in your calculation logic, not in SymPy.
-- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/b0174854-20f8-45a6-817e-6659fceb4300%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.