Ask Your Question

Numerically Solve a Symbolic Equation

asked 2017-06-16 21:23:14 -0500

happys5 gravatar image


In truth, I am feeling like an idiot but it has been a long while since I have done math.

What I want to do is find the intersection points between a parabola and a circle. After I put both equations in x and set them equal, I have:

solve (sqrt(16-x^2) - 1/4*x^2-1.28==0, x)

Problem is, I get the following for answers:

[x == -2/5*sqrt(25*sqrt(-x^2 + 16) - 32), x == 2/5*sqrt(25*sqrt(-x^2 + 16) - 32)]

If I need to numerically solve the equation, which I think I must do, how do I do it in Sage?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-06-17 04:17:02 -0500

philipp7 gravatar image

updated 2017-06-17 04:17:30 -0500


You can try the option to_poly_solve which gives you:

sage: eqn = sqrt(16-x^2) - (1/4)*x^2-1.28==0;
sage: sol = solve(eqn, x, to_poly_solve=true); sol 
[x == -2/5*sqrt(2)*sqrt(5*sqrt(157) - 41),  x == 2/5*sqrt(2)*sqrt(5*sqrt(157) - 41)] 
sage: n(sol[0].rhs())
sage: n(sol[1].rhs())

Another possiblity would be to plot the function for getting the number and estimate values for the solutions. Then you can try to find those solutions using find_roots:

sage: eqn.find_root(-3,-2)
sage: eqn.find_root(2,3)

Kind regards


edit flag offensive delete link more


Thanks, Philipp!

happys5 gravatar imagehappys5 ( 2017-06-17 13:37:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-06-16 21:23:14 -0500

Seen: 46 times

Last updated: Jun 17