I have an equation of the form f(x) = 0 which I need to solve numerically because f is absolutely horrible. I'm using FindRoot to achieve my goal. Here's my code:
FindRoot[ (43.76760935027122*(ArcCos[(3.6958544099301736-0.09097576027495978*x^2-1.*x^4)/(3.695854409930174-0.30306895456563354*x^2-1.*x^4)]-1.*ArcTan[(1223.7099426464301*x^4-725.4797933949869*x^6-69.76907700248954*x^8+105.90945888977912*Sqrt[x^4*(22.772281766782058-51.683884026721294*x^2+43.76287298560037*x^4-16.38570295772005*x^6+2.2889328165770233*x^8)]+x^2*(507.6064341807468-45.96118379610641*Sqrt[x^4*(22.772281766782058-51.683884026721294*x^2+43.76287298560037*x^4-16.38570295772005*x^6+2.2889328165770233*x^8)]))/(x*(16.765159281029014-4851.4404675526785*Sqrt[x^4*(3.157334518321-3.553778*x^2+x^4)*(3.151032666129048-3.60488687607268*x^2+1.*x^4)]+x*(1.8755408291095235*^-15+x*(33.141011104612154+x*(6.514741496419986*^-15+x*(-41.50048368818499+x*(3.2465458701698195*^-15+x*(8.093976+x*(2.2903016461860367*^-16+1.*x)))))))))]))/x, {x, 1.4, 1, 2}] (I told you it was horrible.)
When I try to run this, I get the following error:
FindRoot::reged: The point {1.4} is at the edge of the search region {1.,2.} in coordinate 1 and the computed search direction points outside the region. >>
Obviously, 1.4 is not outside the region [1,2]. Furthermore, I know that the solution is 1.553, which is not outside the region [1,2] either. I know this because if I play around with the starting value I get {x -> 1.553} as the output if the starting value is close enough to that value and an error if it is not; I've also plotted f in the interval [1.5,1.6], and it looks like the root is indeed around 1.553. What's going on?



f? Hard to say without the code. Please post a complete minimal working example (MWE). $\endgroup$x->1.4. $\endgroup$