# Solving $\int_{0}^{2\pi} \cos (x) \cos (z(x)) \, dx$ with a bounded version of $z(x)=a \cos (x)+b$

I am trying to solve the following equation:

$$\int_{0}^{2 \pi } \cos (x) \cos z(x) \, dx \hspace{20 mm} (1)$$

where $z(x)$ is a bounded version of $z(x)=a \cos (x)+b$ that reads as:

$$z(x)=\min\left[ a\cos(x)+b, c \right] \hspace{20 mm} (2)$$

(is there a way to write this bounded equation in a nicer form without the min?)

For the special case in which $c$ is inactive, I get a solution including a Bessel function of the first kind:

$$-2 \pi J_1(a) \sin (b) \hspace{20 mm} (3)$$

However, I would like to obtain a more general analytical expression. I could split the integral into 3 parts:

$$\int_{0}^{x_1} \cos (x) \cos (c) \, dx + \int_{x_1}^{x_2} \cos (x) \cos (a\cos(x)+b) \, dx + \int_{x_2}^{2\pi} \cos (x) \cos (c) \,dx$$

where I can analytically find the values of $x_1$ and $x_2$ by solving for $z(x)=c$ in (the unbounded version of) Eq. 2

However, the integral with bounds $x_1$ and $x_2$ is no longer analytically tractable (at least as far as I can tell). A partial question would be: is this indeed no longer analytically tractable?

Assuming that I am indeed correct. I could also calculate the full integral and subtract parts that don't exist:

$$\int_{0}^{2\pi} \cos (x) \cos (a\cos(x)+b) \, dx - \int_{0}^{x_1} \cos (x) \cos (a\cos(x)+b-c) \, dx$$ $$- \int_{x_2}^{2\pi} \cos (x) \cos (a\cos(x)+b-c) \, dx$$

but then I run into a similar problem where I cannot solve the parts that I need to subtract.

Does anybody know how I could go about solving this integral? Maybe, if necessary, by approximating the $a\cos(x)+b-c$ term by something else?

-