Hi,
I'm new to sympy, like is very much as far. Can't figure 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 list [], but I'm expecting at least one solution: x =
(p1*(-r1) + p1 + p2*(r2 - 1) + r1 - 1) / ((r1 - 1) * (r2 - 1) * (p1 - p2 -
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/640a1aca-76c7-4e7d-a268-b78c8b7717a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.