Thanks a lot chris for your timely help! I hope this helps me out in my work ahead.
On Friday, 26 April 2013 01:44:21 UTC+5:30, smichr wrote: > > Your tolerance is too high so you are not as close to the roots as you > would like to be. Also, whenever there is a denominator, it is better to > get rid of it as this helps the numerical process. > > >>> nsolve([numer(i.normal()).expand() for i in > (eqn1,eqn2,eqn3)],(p,q,r),(.01, > .2,18)) > matrix( > [['0.00959710286420681'], > ['0.25'], > ['18.9205683344602']]) > >>> reps = dict(zip([p,q,r],[S(i) for i in _])) > >>> eqn1.subs(reps).n(3) > -3.55e-15 > >>> eqn2.subs(reps).n(3) > 0.0906 > >>> eqn3.subs(reps).n(3) > 2.22e-16 > > > It looks like that particular solution sets the denominator of eqn2 to > zero: > > >>> denom(eqn2.normal()).subs(reps) > -1.33226762955019e-15 > > Another thing to try when solving a nasty set of equations is to introduce > a parameter `a` that can be varied from 0 to 1: when 0 it shuts off a > nonlinear portion of your equations making them easier to solve. From that > solution you increase `a` a little and use the last guess as your next > guess, increasing `a` and updating the guess until you get to `a`=1. > > Hope that gets you a little further down the road. > > /chris > -- 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?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.