Hi,
I'm new to sympy, like it very much as far, but can't figure out what am I
doing wrong. I want to find x for maximum value of f(x). I'm running
following commands:
>>> from __future__ import division
>>> from sympy import *
>>> x = symbols('x')
>>> p1, p2, r1, r2 = symbols('p1 p2 r1 r2', real = True, nonnegative =
True, finite = True)
>>> f = (1 + x*(r1 - 1))**(1 - p1) * (1 + x*(r2 - 1))**p2
>>> solve(Eq(f.diff(x), 0), x)
and I'm getting empty result - [], but I'm expecting at least one result: x
= (p*r1 + p*r2 - 2*p - r1 + 1) / ((r1-1) * (r2-1))
What am I doing wrong ??
Regards
Dawid
--
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 https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/14a27bdd-6498-4aa3-b713-5d5ed9cdad15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.