I wanted to find the roots of $\cos{x}+\cosh^2{x}=0$ to solve an integral with this expression in the denominator. I started by using the exponential definitions of the cosine function and its hyperbolic counterpart. At first, I tried substituting $v=e^x$ and I got the following equation $$v^2+v^{-2}+2v^i+2v^{-i}=-2$$ I don't know how to proceed because of the complex exponents.
For my second try, I reduced the equation into the following. $$e^{2x}+e^{-2x}+2(e^{ix}+e^{-ix}+1)=0$$ Multiply both sides by $e^{2x}e^{ix}$ $$(e^{4x}+1)e^{ix}+2e^{2x}(e^{2ix}+e^{ix}+1)=0$$ Replace $e^x$ with $a$ and $e^{ix}$ with $b$ $$(a^4+1)b+2a^2(b^2+b+1)=0$$ After some manipulation we get the following system $$\frac{b} {b^2+b+1}=\frac{-2a^2}{a^4+1}$$ $$a^i=b$$ It sure is elegant, but I don't know how to continue after this. WolframAlpha gives 4 roots. Interestingly enough, they're all conjugates and negatives of each other. I want a closed form for these roots

We want to find the roots of
$$f(x) = \cos(x) + \cosh^2(x) = 0$$
A plot shows there are no real roots (prove this), so we'll use imaginary initial conditions.
Let's try a numerical method like Newton's Method.
We have the iteration formula
$$x_{n+1} = x_n - \dfrac{f(x_n)}{f'(x_n)} = x_n - \dfrac{\cos(x_n) + \cosh^2(x_n)}{-\sin(x_n) + 2 \sinh(x_n) \cosh(x_n)}$$
Taking
We converge to one of the roots in five steps.
Next, we can try the additional initial points for the other roots
$$x_0 = 1 - i, -1 + i, -1 - i$$
This produces the other three roots, and we are not always so lucky!
We can visualize these four roots as
We can also draw a complex plot to try and ascertain the behavior of roots and to give insight for more roots. Using Mathematica's ComplexPlot, we see (refer to link for meaning of colors)
Here is another variation of the command