Roots of trigonometric function.

263 Views Asked by At

I have a function:

$ f(x) = (ax+b) \cdot \sin(x) + (cx+d) \cdot \cos(x) + e$

for which I want to determine the roots.

I know that for $ax \cdot \sin(x) + cx \cdot \cos(x)$

the roots are $2(\tan^{-1}(\frac{a \pm \sqrt{a^2+c^2}}{c})+\pi n)$

and for $b\cdot \sin(x) + d \cdot \cos(x)$

the roots are $2(\tan^{-1}(\frac{b\pm\sqrt{b^2+d^2}}{d})+\pi n)$

but I have some trouble in finding the roots of the sum of both. Can anybody explain how to find it?

2

There are 2 best solutions below

0
On BEST ANSWER

Because of the terms $x\,\sin x$ and $x\,\cos x$ there is no hope of obtaining a formula or the roots, not even for the simple looking equation $x\,\sin x+1=0$. Because $f$ is unbounded and oscillating (if $|a|+|b|\ne 0$), there will be an infinite number of roots.

If you want to use numerical methods, say Newton's method, you need a good guess to give as initial value. You can locate zeros plotting $f$ or evaluating $f$ at some points. Good candidates are points $x$ where $\sin x=0,1,-1$, that is $\dfrac{k\,\pi}2$, $k\in\mathbb{Z}$.

0
On

As already answered by Julián Aguirre, equations which contains polynomial and trigonometric functions do not show explicit solutions (this is already the case for $x=\cos(x)$) and only numerical methods could find the roots (one at the time because there is an infinite number of solutions).

If you located one root, probably the simplest would be Newton method which, starting from a "reasonable" guess $x_0$, will update it according to $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$$

Let us consider the case of the equation you gave and use $a=1,b=2,c=3,d=4,e=5$ and we look for the root located close to $x_0=15$. The iterates will be $$x_1=14.5438284668645$$ $$x_2=14.5706131998069$$ $$x_3=14.5705976124983$$ $$x_4=14.5705976124952$$ which is the solution for fifteen significant figures.