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