Ask Your Question

# Revision history [back]

The first two can be (awkwardly) solved by Sage :

sage: E1=R^(1/3)*p == x^(1/3)
sage: E1.solve(x, algorithm="sympy")
[x == R*p^3]
sage: I1=R^(1/3)*p <= x^(1/3)
sage: [x-v for v in solve(I1^3,x)]
[R*p^3 == x, R*p^3 > x]


But the third one : sage: I2=0 <= (R-x)^(1/3)p + (1-p) (-x)^(1/3)

requires manual solution. Sage can help, at least for record-keeping :

sage: I22=((((I2-I2.rhs().operands())/(1-p))^3)).expand() ; I22
x <= -R*p^3/(p^3 - 3*p^2 + 3*p - 1) + p^3*x/(p^3 - 3*p^2 + 3*p - 1)
sage: I23=I22-I22.rhs().operands() ; I23
-p^3*x/(p^3 - 3*p^2 + 3*p - 1) + x <= -R*p^3/(p^3 - 3*p^2 + 3*p - 1)
sage: I23.factor()/(I23.factor().lhs().coefficient(x))
x <= R*p^3/(3*p^2 - 3*p + 1)


"The competition" fares a bit better :

sage: mathematica.Reduce(I2,x)
Element[p, Reals] &&
((R < 0 && ((p <= 1 && x <= R) || (p > 1 &&
x <= (p^3*R)/(1 - 3*p + 3*p^2)))) || (R == 0 && x <= 0) ||
(R > 0 && ((p < 0 && x <= (p^3*R)/(1 - 3*p + 3*p^2)) ||
(p >= 0 && x <= 0))))


HTH,