Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Solve/find_root for miscellaneous special function elliptic_kc?

I am looking to use solve() or find_root() with a function defined using elliptic_kc (sage.functions.special.EllipticKC), however Sage produces an error. The context of this is for use in a coplanar waveguide impedance calculation.

Example:

sage: find_root(elliptic_kc(x)==2, x, 0, 0.5)

[...]

'TypeError: unable to simplify to float approximation'.

and

sage: solve(2.0==elliptic_kc(x), x, to_poly_solve=True)

[...]

TypeError: 'sage.symbolic.expression.Expression' object is not subscriptable

Is there a convenient way to perform a solve/numerical root for these special functions?