1 | initial version |
Ahem... solve
suggests numerical approximate solutions :
sage: SN=solve(Eq, r, to_poly_solve=True) ; Sn
[r == (-0.08510234586942406 - 0.5483016107521035*I),
r == (-0.08510234586942406 + 0.5483016107521035*I)]
sage: print([(Eq.lhs()-Eq.rhs()).subs(s).n() for s in SN])
[1.77635683940025e-15*I, -1.77635683940025e-15*I]
Not that far of the target... But indeed :
sage: print([(Eq.lhs()-Eq.rhs()).subs(s).is_zero() for s in SN])
[False, False]
Let's hunt for exact solutions, if any... Start by rewriting the equation, as judiciously suggested by dan_fulea
:
Eq=3*((11/5)+(64/r)^(1/3))==4*(11/5+(128/(r-1))^(1/4)) ; print(Eq)
$$\frac{12}{r^{\frac{1}{3}}} + \frac{33}{5} = \frac{8 \cdot 8^{\frac{1}{4}}}{{\left(r - 1\right)}^{\frac{1}{4}}} + \frac{44}{5}$$
Work on this a bit :
E2=Eq.subs([r==R^3,(R^3)^(-1/3)==R^-1])-44/5 ; print(E2)
(One will note the awkward internal representation of powers in fractions...)
$$\frac{12}{R} - \frac{11}{5} = \frac{8 \cdot 8^{\frac{1}{4}}}{{\left(R^{3} - 1\right)}^{\frac{1}{4}}}$$
We eliminate the fractional powers by elevating both hands at the fourth power (thus potentially introducing spurious solutions...) :
E3=(E2^-4).factor()
$$\frac{625 \, R^{4}}{{\left(11 \, R - 60\right)}^{4}} = \frac{1}{32768} \, {\left(R^{2} + R + 1\right)} {\left(R - 1\right)}$$
This equation is utimately the equation of a rational fraction to zero. Its roots are therefore the roots of its denominator, provided that the denominator is not null in these points :
P=(E3.lhs()-E3.rhs()).factor().numerator()
$$-14641 \, R^{7} + 319440 \, R^{6} - 2613600 \, R^{5} + 29998641 \, R^{4} - 13279440 \, R^{3} + 2613600 \, R^{2} - 9504000 \, R + 12960000$$
A raincheck doesn't hurt :
sage: P.is_polynomial(R)
True
The roots of this polynomial are potential solutions of our original equations...
Sol=P.roots(x=R,ring=QQbar, multiplicities=False)
... provided that they do not nullify the denominator...
Sol=[u for u in Sol if not (E3.lhs()-E3.rhs())(R=u).is_zero()]
... and their cubes are indeed solution of the original equation :
sage: SolR=[u^3 for u in Sol if bool(Eq(r=u^3))] ; SolR
[-0.085102345869424? - 0.548301610752104?*I,
-0.085102345869424? + 0.548301610752104?*I]
Those two solutions are "exact" in the same sense as QQbar is "exact" : there is a way to determinate them with as much as precision as needed, with a upper bound of the difference as small as desired, notwithstanding the absence of a closed-form radical expression...
HTH,
2 | No.2 Revision |
Ahem... solve
suggests numerical approximate solutions :
sage: SN=solve(Eq, r, to_poly_solve=True) ; Sn
[r == (-0.08510234586942406 - 0.5483016107521035*I),
r == (-0.08510234586942406 + 0.5483016107521035*I)]
sage: print([(Eq.lhs()-Eq.rhs()).subs(s).n() for s in SN])
[1.77635683940025e-15*I, -1.77635683940025e-15*I]
Not that far of the target... But indeed :
sage: print([(Eq.lhs()-Eq.rhs()).subs(s).is_zero() for s in SN])
[False, False]
Let's hunt for exact solutions, if any... Start by rewriting the equation, as judiciously suggested by dan_fulea
:
Eq=3*((11/5)+(64/r)^(1/3))==4*(11/5+(128/(r-1))^(1/4)) ; print(Eq)
$$\frac{12}{r^{\frac{1}{3}}} + \frac{33}{5} = \frac{8 \cdot 8^{\frac{1}{4}}}{{\left(r - 1\right)}^{\frac{1}{4}}} + \frac{44}{5}$$
Work on this a bit :
E2=Eq.subs([r==R^3,(R^3)^(-1/3)==R^-1])-44/5 ; print(E2)
(One will note the awkward internal representation of powers in fractions...)
$$\frac{12}{R} - \frac{11}{5} = \frac{8 \cdot 8^{\frac{1}{4}}}{{\left(R^{3} - 1\right)}^{\frac{1}{4}}}$$
We eliminate the fractional powers by elevating both hands at the fourth power (thus potentially introducing spurious solutions...) :
E3=(E2^-4).factor()
$$\frac{625 \, R^{4}}{{\left(11 \, R - 60\right)}^{4}} = \frac{1}{32768} \, {\left(R^{2} + R + 1\right)} {\left(R - 1\right)}$$
This equation is utimately the equation of a rational fraction to zero. Its roots are therefore the roots of its denominator, provided that the denominator is not null in these points :
P=(E3.lhs()-E3.rhs()).factor().numerator()
$$-14641 \, R^{7} + 319440 \, R^{6} - 2613600 \, R^{5} + 29998641 \, R^{4} - 13279440 \, R^{3} + 2613600 \, R^{2} - 9504000 \, R + 12960000$$
A raincheck doesn't hurt :
sage: P.is_polynomial(R)
True
The roots of this polynomial are potential solutions of our original equations...
Sol=P.roots(x=R,ring=QQbar, multiplicities=False)
... provided that they do not nullify the denominator...
Sol=[u for u in Sol if not (E3.lhs()-E3.rhs())(R=u).is_zero()]
... and their cubes are indeed solution of the original equation :
sage: SolR=[u^3 for u in Sol if bool(Eq(r=u^3))] ; SolR
[-0.085102345869424? - 0.548301610752104?*I,
-0.085102345869424? + 0.548301610752104?*I]
Those two solutions are "exact" in the same sense as QQbar is "exact" : there is a way to determinate them with as much as precision as needed, with a upper bound of the difference as small as desired, notwithstanding the absence of a closed-form radical expression...
HTH,
EDIT : This result is also found by Mathematica
, as shown in the following atrocity :
sage: MS=mathematica.Solve(Eq,r);MS
{{r -> Root[-2176782336000000000000 + 6584000661504000000000*#1 -
10160322906612096000000*#1^2 + 21200873670270453024000*#1^3 -
24022442465994700088721*#1^4 - 15246001414346517837*#1^5 -
15216891738794163*#1^6 + 3138428376721*#1^7 & , 4, 0]},
{r -> Root[-2176782336000000000000 + 6584000661504000000000*#1 -
10160322906612096000000*#1^2 + 21200873670270453024000*#1^3 -
24022442465994700088721*#1^4 - 15246001414346517837*#1^5 -
15216891738794163*#1^6 + 3138428376721*#1^7 & , 5, 0]}}
sage: MSR=union(SR(repr(MS[1][1][2][1]).replace("#1","x").replace("&","")).roots(ring=QQbar, multiplicities=False),SR(repr(MS[2][1][2][1]).replace("#1","x").replace("&","")).roots(ring=QQbar, multiplicities=False))
sage: [u for u in MSR if bool(Eq.subs(r=u))]
[-0.0851023458694239? + 0.5483016107521033?*I,
-0.0851023458694239? - 0.5483016107521033?*I]