Updates:
        Status: Accepted
        Cc: [email protected]
        Labels: Solvers

Comment #1 on issue 2656 by asmeurer: Solve exp(x*log(x) - 1, x)
http://code.google.com/p/sympy/issues/detail?id=2656

You cannot use mpmath functions with symbolic arguments. You need to use a SymPy function, unless you are just computing a floating point value (I still recommend using a SymPy function with .evalf(), when possible).

According to http://docs.sympy.org/0.7.1/modules/mpmath/functions/expintegrals.html?highlight=erfc#mpmath.erfc, erfc == 1 - erf, so you should instead do

solve(x * ((1.0 / sqrt(2 * pi) * x * sigma) * exp(-0.5 * (log(x) - mu)**2 / sigma**2)) + 0.5 * (1 - erf((mu - log(x))) / (sigma * sqrt(2))) - 1, x)

(and don't import stuff from mpmath). Unfortunately, this still doesn't work (NotImplementedError), but if it did work, that would be the way to do it.

By the way, Fredrik, it seems there is a typo in the docstring for erfc. The first LaTeX math is not being rendered.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en.

Reply via email to