# How to solve this equation

olgranpappy
Homework Helper
okey dokey

HallsofIvy
Homework Helper
?

x = Arccos(-b/a)/a
Actually there is no "symantical argument", just a typographical error. The equation I was referring to is the original equation, cos(ax)+ bx= 0, not cos(ax)+ b= 0. Olgranpappy got me!

Since we now know how the function looks like, (Halls_of_Ivy blatantly pointed it out!)we may employ a brute force method.

y= sin(ax) +bx. Increase x in small amounts (1e-6) and find y. If y<= epsilon where epsilon is the matlab operator 1e-15 (you can set this depending on your accuracy) you know that you have found a root of the equation.

It is a brute force method and can get accurate results, but more time consuming than NR. However the time taken to code the NR may be equal to the time required to solve it the above mentioned way.

BTW thanks to Halls_of_Ivy. Good to be shaken once in a while for not thinking straight.

HallsofIvy