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?
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}$.