1 | initial version |
Alternatively, we can solve the corresponding polynomial equation over an explicitly declared numeric field:
sage: ( (16-x^2) - (1/4*x^2 + 1.28)^2 ).roots( ring=RR )
[(-2.63209850458273, 1), (2.63209850458273, 1)]
sage: ( (16-x^2) - (1/4*x^2 + 1.28)^2 ).roots( ring=RealField(300), multiplicities=False )
[-2.63209850458273472222645327989825104599024721420142212754062239578568429138110784195156834,
2.63209850458273472222645327989825104599024721420142212754062239578568429138110784195156834]
Let us compare with the values obtained in the spirit of the answer of philipp7...
sage: [ sol[x].n()
....: for sol in solve( sqrt(16-x^2) - 1/4*x^2-1.28 == 0, x
....: , solution_dict=True
....: , to_poly_solve=True ) ]
[-2.63209850458273, 2.63209850458273]