You can at least obtain the solutions via
sage: Eq = -1/2*sqrt(-4*p^2 + 4*p + 1)*p + 1/2*p == 1/2
sage: (((2*Eq -p)/p)**2)
-4*p^2 + 4*p + 1 == (p - 1)^2/p^2
sage: (((2*Eq -p)/p)**2).solve(p)
[p == -1/4*sqrt(5) - 1/2*sqrt(-1/2*sqrt(5) - 1/2) + 1/4,
p == -1/4*sqrt(5) + 1/2*sqrt(-1/2*sqrt(5) - 1/2) + 1/4,
p == 1/4*sqrt(5) - 1/2*sqrt(1/2*sqrt(5) - 1/2) + 1/4,
p == 1/4*sqrt(5) + 1/2*sqrt(1/2*sqrt(5) - 1/2) + 1/4]
Le 21/12/2016 à 14:36, Peleg Michaeli a écrit :
I am trying to solve the following equation:
-1/2*sqrt(-4*p^2 + 4*p + 1)*p + 1/2*p = 1/2
I was trying the following:
sage: var('p')
p
sage: solve(-1/2*sqrt(-4*p^2 + 4*p + 1)*p + 1/2*p == 1/2, p)
[p == -1/(sqrt(-4*p^2 + 4*p + 1) - 1)]
So the solution is p = some expression of p. Not very useful. Wolfram
Alpha, for example, gives the following solution:
1/4 + 1/4 (sqrt(5) + sqrt(2 (-1 + sqrt(5))))
(along with some complex solutions)
I do get a proper solution if I use `to_poly_solve=True` in the call to
solve.
Am I doing it wrong? Should I, for some reason, always use Maxima's solver?
Thanks,
Peleg.
--
You received this message because you are subscribed to the Google Groups
"sage-support" 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/sage-support.
For more options, visit https://groups.google.com/d/optout.