WeBWorK Main Forum

Any caveats regarding the range of x and y when using the ImplicitEquation context?

Re: Any caveats regarding the range of x and y when using the ImplicitEquation context?

by Davide Cervone -
Number of replies: 0
This is probably not a good idea. The ImplicitEquation object locates solutions by picking pairs of points (randomly within the limits) that have opposite signs, and doing bisection to find a zero in between. The closer you are to a zero to start with, the quicker you will find the zero. Setting the limits to [-1000,1000] would mean you are likely far from the actual zero to start with and so would have to do lots of bisection steps. Also, the bisection algorithm cuts off after 40 iterations, and with a potential distance of 2000sqrt(2) , that means you could cut off with the bisection interval still wider than 70 units, which doesn't give very good resolution for a problem like yours.

In my experience, three are no magic bullets for numeric problems like this, so you do have to spend some time thinking about the proper settings of the parameters. That can be complicated by randomization within the problem, but you can make the limits depend on the values in the problem, so you should be able to do better than using something like [-1000,1000].