HP Forums
fsolve bug? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: fsolve bug? (/thread-790.html)



fsolve bug? - John Colvin - 03-01-2014 12:08 AM

Using fsolve to find the roots of the equation: x + 4.5sin(x) = 5, I can get the
two roots [1.0645, 6.0481], but I am unable to get the third root 2.5716 no
matter how close a guess I set x to.

For example, if I enter fsolve(x+4.5sin(x) = 5, x = 2.5716), I get 1.0645 as the
root. Is there a way to solve this equation for all of its roots in CAS mode?
fsolve should do it.


RE: fsolve bug? - John Colvin - 03-01-2014 12:26 AM

I posted too soon, my apologies. fsolve requires a minimum and maximum value
for the guess. If I enter fsolve(x+4.5sin(x) = 5,x,1..7), I get all of the roots.
Sorry about that.

I tried to delete this post, but the forum wouldn't let me.