Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

From the documentation of roots:

Return roots of self that can be found exactly, possibly with multiplicities. Not all roots are guaranteed to be found.

Warning: This is not a numerical solver

and

ring - a ring (default None): if not None, convert self to a polynomial over ring and find roots over ring

The latter explains why you get the error in the title: the expression is not a polynomial, so the conversion fails.

The expression itself is only defined as a real number if y is between 0 and 10 (due to the y(10y), so:

sage: var('y')
sage: f = sqrt(10*y*(10-y))+sqrt(1000)*acos(sqrt(y/10))-15*sqrt(2*6.673*10^(-11)*50000000000)
sage: f.find_root(0,10)
5.5672155196677675
sage: find_root(f,0,10)
5.5672155196677675

By plotting f you see that it's the only root.

In general there is no magic method to find an interval where a root may live. It is however always a good idea to check the domain of definition first.

click to hide/show revision 2
No.2 Revision

From the documentation of roots:

Return roots of self that can be found exactly, possibly with multiplicities. Not all roots are guaranteed to be found.

Warning: This is not a numerical solver

and

ring - a ring (default None): if not None, convert self to a polynomial over ring and find roots over ring

The latter explains why you get the error in the title: the expression is not a polynomial, so the conversion fails.

The expression itself is only defined as a real number if y is between 0 and 10 (due to the y(10y), y(10y)), so:

sage: var('y')
sage: f = sqrt(10*y*(10-y))+sqrt(1000)*acos(sqrt(y/10))-15*sqrt(2*6.673*10^(-11)*50000000000)
sage: f.find_root(0,10)
5.5672155196677675
sage: find_root(f,0,10)
5.5672155196677675

By plotting f you see that it's the only root.

In general there is no magic method to find an interval where a root may live. It is however always a good idea to check the domain of definition first.