This works in the git master:

In [166]: solve((1-exp(-4*x))-y,x)
Out[166]:
⎡   ⎛     _______⎞     ⎛    _______⎞     ⎛       _______⎞     ⎛      _______⎞⎤
⎢   ⎜    ╱   -1  ⎟     ⎜   ╱   -1  ⎟     ⎜      ╱   -1  ⎟     ⎜     ╱   -1  ⎟⎥
⎢log⎜-4 ╱  ───── ⎟, log⎜4 ╱  ───── ⎟, log⎜-ⅈ⋅4 ╱  ───── ⎟, log⎜ⅈ⋅4 ╱  ───── ⎟⎥
⎣   ⎝ ╲╱   y - 1 ⎠     ⎝╲╱   y - 1 ⎠     ⎝   ╲╱   y - 1 ⎠     ⎝  ╲╱   y - 1 ⎠⎦

In [167]: solve((1-exp(4*x))-y,x)
Out[167]:
⎡   ⎛   4 ________⎞     ⎛  4 ________⎞     ⎛ 4 ________⎞     ⎛4 ________⎞⎤
⎣log⎝-ⅈ⋅╲╱ -y + 1 ⎠, log⎝ⅈ⋅╲╱ -y + 1 ⎠, log⎝-╲╱ -y + 1 ⎠, log⎝╲╱ -y + 1 ⎠⎦

guess_solve_strategy was removed since 0.7.1, and solving procedures
in general have been improved.

By the way, since you are implementing a random variable class, you
might check out the new stats module that is also in the git master.

See https://github.com/sympy/sympy/wiki/Getting-the-bleeding-edge for
a little guide on how to get the git master.

Aaron Meurer

On Thu, Mar 22, 2012 at 7:14 PM, Matthew Robinson
<[email protected]> wrote:
> Hi Everyone,
>
> First of all, just wanted to say that I just recently started working
> in sympy. I've enjoyed it so far and think that it is a wonderful
> project.
>
> On to my issue. I'm currently in the process of writing a random
> variable class, and need to write a procedure that can invert
> cumulative distribution functions. Basically, it seems like the solve
> procedure chokes when there is a negative symbol in an exponential
> function. The procedure works fine if there is a non-negative symbol
> instead. For instance, solve((1-exp(-4*x))-y,x) fails, whereas
> something like solve((1-exp(4*x))-y,x) works correctly. The negative
> sign does not look like it's the problem, since solve works with
> negative integers and floating point numbers in the exponential.
>
> The exception raised is NotImplementedError, and may be related to the
> guess_solve_strategy procedure.
>
> Note that I haven't looked through the code for the solve procedure
> yet. Wanted to see if anyone else has run into this issue.
>
> -- Matt Robinson
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" 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?hl=en.
>

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

Reply via email to