Did you try using limit()? subs() just inserts the value into the
expression, which means that it won't always compute things at
infinity correctly.

SymPy's limit() implements a powerful algorithm due to Gruntz, which
can take some pretty complicated limits (it is much more powerful than
l'Hopital's rule).

Aaron Meurer

On Sat, Jun 15, 2013 at 10:26 PM, Shriramana Sharma <[email protected]> wrote:
> Hello.
>
> I working on some bezier-related algorithms and need to be able to
> provide the curvature of a bezier at any queried point. Now when cubic
> beziers have cusps, their curvature is infinite. However the infinity
> can be positive or negative. The question is how to find out the sign
> of this infinity.
>
> Now it is a fundamental property of cusps that the sign of curvature
> on either side of the cusp is the same, so it stands to reason that if
> the curvature sign on the sides is positive then the curvature at the
> cusp is positive infinity and likewise for negative. So one method to
> find the sign of the infinity is to evaluate the sign at a nearby
> point. However I'd like to do it analytically.
>
> As the attached SymPy script demonstrates, it is possible to evaluate
> the limit of the curvature and determine whether the infinity is
> positive or negative. However, L'Hopital's rule seems to fail. What is
> the method by which SymPy arrives at this result?
>
> Thank you!
>
> --
> Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to