# Number of solutions to $\cos\left(A \cos\left(\frac{s}{A} \right)\right) = \sin\left(A \cos\left(\frac{s}{A} \right)\right)$

The title had to be too short, but what I want to do is find out how many solutions there are to the following equation in that interval (here $$A$$ is a constant):

$$\cos\left(A \cos\left(\frac{s}{A} \right)\right) = \sin\left(A \cos\left(\frac{s}{A} \right)\right) = A \sin\left(\frac{s}{A} \right), \quad s \in [0, 2A\pi]$$

I know it depends on $$A$$ and I've tested a few cases, but I'm rusty on this trig stuff, so I haven't been able to do it yet. I'd appreciate some help.

Update: Actually I've just realized I don't need the third inequality so I'm accepting the current answer.

For $\cos(X)$ to equal $\sin(X)$, you must have $$X=\frac{\pi}{4}+k\pi$$ So you have $$A\cos\left(\frac{s}{A}\right)=\frac{\pi}{4}+k\pi$$ $$\cos\left(\frac{s}{A}\right)=\frac{\pi}{4A}+\frac{k\pi}{A}$$ where $k$ is an integer. Since the output of $\cos$ is trapped between $-1$ and $1$, for all but finitely many values of $k$, there are no solutions. There will only be solutions when $$-1\leq\frac{\pi}{4A}+\frac{k\pi}{A}\leq1$$ $$-\frac{A}{\pi}-\frac{1}{4}\leq k\leq \frac{A}{\pi}-\frac{1}{4}$$ For each such $k$ there will be $2$ solution values for $s$ in $[0,2A\pi)$, unless for some particular $k$, $\frac{\pi}{4A}+\frac{k\pi}{A}$ happens to be exactly $1$ or $-1$, and then there will be only one solution value for $s$.
So count integers between $-\frac{A}{\pi}-\frac{1}{4}$ and $\frac{A}{\pi}-\frac{1}{4}$, and then double. If necessary adjust slightly if $\frac{\pi}{4A}+\frac{k\pi}{A}$ happens to be $\pm1$ for some $k$.