1 | initial version |
At least SageMath solves the equality:
sage: kappa = var('kappa')
sage: m = var('m')
sage: r = var('r')
sage: expr = -kappa*m^4+8*pi*m^3*r - 4*pi*r^2
sage: solve(expr == 0, r)
[r == 1/2*(2*pi*m^3 - sqrt(4*pi^2*m^2 - pi*kappa)*m^2)/pi,
r == 1/2*(2*pi*m^3 + sqrt(4*pi^2*m^2 - pi*kappa)*m^2)/pi]
Sympy gives a simplified solution for the equality, but it neither give you the intervals for when the expression is positive:
sage: solve(expr == 0, r, algorithm='sympy')
[r == m^3 - 1/2*sqrt(4*pi*m^2 - kappa)*m^2/sqrt(pi),
r == m^3 + 1/2*sqrt(4*pi*m^2 - kappa)*m^2/sqrt(pi)]
sage: solve(expr > 0, r, algorithm='sympy')
ConditionSet(r, -kappa*m**4 + 8*pi*m**3*r - 4*pi*r**2 > 0, Reals)
2 | No.2 Revision |
At least SageMath solves the equality:equality (you may then guess the solution yourself from the sign of the coefficient for r^2
):
sage: kappa = var('kappa')
sage: m = var('m')
sage: r = var('r')
sage: expr = -kappa*m^4+8*pi*m^3*r - 4*pi*r^2
sage: solve(expr == 0, r)
[r == 1/2*(2*pi*m^3 - sqrt(4*pi^2*m^2 - pi*kappa)*m^2)/pi,
r == 1/2*(2*pi*m^3 + sqrt(4*pi^2*m^2 - pi*kappa)*m^2)/pi]
Sympy gives a simplified solution for the equality, but it neither give you the intervals for when the expression is positive:
sage: solve(expr == 0, r, algorithm='sympy')
[r == m^3 - 1/2*sqrt(4*pi*m^2 - kappa)*m^2/sqrt(pi),
r == m^3 + 1/2*sqrt(4*pi*m^2 - kappa)*m^2/sqrt(pi)]
sage: solve(expr > 0, r, algorithm='sympy')
ConditionSet(r, -kappa*m**4 + 8*pi*m**3*r - 4*pi*r**2 > 0, Reals)
3 | No.3 Revision |
At least SageMath solves the equality (you may then guess the solution yourself from the sign of the coefficient for r^2
):
sage: kappa = var('kappa')
sage: m = var('m')
sage: r = var('r')
sage: expr = -kappa*m^4+8*pi*m^3*r - 4*pi*r^2
sage: solve(expr == 0, r)
[r == 1/2*(2*pi*m^3 - sqrt(4*pi^2*m^2 - pi*kappa)*m^2)/pi,
r == 1/2*(2*pi*m^3 + sqrt(4*pi^2*m^2 - pi*kappa)*m^2)/pi]
Sympy gives a simplified solution for the equality, but it neither give you the intervals for when the expression is positive:
sage: solve(expr == 0, r, algorithm='sympy')
[r == m^3 - 1/2*sqrt(4*pi*m^2 - kappa)*m^2/sqrt(pi),
r == m^3 + 1/2*sqrt(4*pi*m^2 - kappa)*m^2/sqrt(pi)]
sage: solve(expr > 0, r, algorithm='sympy')
ConditionSet(r, -kappa*m**4 + 8*pi*m**3*r - 4*pi*r**2 > 0, Reals)