Are there any elementary functions $\beta(x)$ that follows this integral $\int_{y-1}^{y} \beta(x) dx =\cos(y)$

If you substitute $ \beta (x) = A \sin (x) + B \cos(x) $, perform the integration and use the trigonometric addition formulas, you should get two simultaneous equations which you can solve for the coefficients. I get $$ \beta (x) = -\frac{1}{2} \left(\sin(x) + \frac{\sin(1)}{\cos(1) -1} \cos(x) \right) .$$

Also, you could add any multiple of a function which integrates to zero over the interval. That is, if $f(x)$ satisfies $f(x+1) = f(x)$ then one could add a term to $\beta(x)$ of the form $f(x) - \int_0^1 f(x) dx$ .

Decomposing the periodic function into Fourier series, this would amount to subtracting the constant term, so I think the most general term of this form would give the following answer.

$$\beta (x) = -\frac{1}{2} \left(\sin(x) + \frac{\sin(1)}{\cos(1) -1} \cos(x) \right) + \sum_{n=1}^\infty \left( a_n \cos (2 n \pi x) + b_n \sin(2 n \pi x) \right) .$$


Try this: $$ \beta(x) = \frac{\sin(x+1)}{2} - \frac{\sin(1)\;\cos(x+1)}{2\cos(1)-2} $$


How to find this? If $N$ is a positive integer, then $$ \int_0^N \beta(x)\;dx = \sum_{n=1}^N\int_{n-1}^n\beta(x)\;dx =\sum_{n=1}^N \cos n =-\frac{\cos(N+1)}{2}-\frac{\sin(2)\;\sin(N+1)}{2(\cos(1)-1)} - \frac{1}{2} $$ Now make a guess that the same formula will also work when we replace $N$ with $y$ which is not a positive integer. Differentiate to get $\beta(y)$.

Then check that it works.


Check:

\begin{align} \beta(x) &= \frac{\sin(x+1)}{2} - \frac{\sin(1)\;\cos(x+1)}{2\cos(1)-2} \\ \int\beta(x)\;dx &= \frac{-\cos(x+1)}{2} - \frac{\sin(1)\;\sin(x+1)}{2\cos(1)-2} \\ \int_{y-1}^y\beta(x)\;dx &= \frac{-\cos(y+1)+\cos(y)}{2} + \frac{\sin(1)\;(-\sin(y+1)+\sin(y))}{2\cos(1)-2} \\ &= \frac{-\cos(1)\cos(y)+\sin(1)\sin(y)+\cos(y)}{2} + \frac{\sin(1)\;(-\cos(1)\sin(y)-\sin(1)\cos(y)+\sin(y))}{2\cos(1)-2} \\ &= \left[\frac{-\cos(1)+1}{2} +\frac{-\sin^2(1)}{2(\cos(1)-1)}\right]\cos(y) +\left[\frac{\sin(1)}{2} +\frac{-\cos(1)\sin(1)-\sin(1)}{2(\cos(1)-1)}\right]\sin(y) \\ &= \frac{-\cos^2(1)+2\cos(1)-1-\sin^2(1)}{2(\cos(1)-1)}\cos(y) +\frac{\cos(1)\sin(1)-\sin(1)-\sin(1)\cos(1)+\sin(1)}{2(\cos(1)-1)}\sin(y) \\ &= \frac{2\cos(1)-2}{2(\cos(1)-1)}\cos(y) +\frac{\cos(1)\sin(1)-\sin(1)-\sin(1)\cos(1)+\sin(1)}{2(\cos(1)-1)}\sin(y) \\ &= \cos(y) \end{align}


Hint.

Calling $B(y) - B(y-1)= \int_{y-1}^y b(x) dx$ we have the functional equation

$$ B(y)-B(y-1) = \cos y $$

with solution

$$ B(y) = \frac 12\left(\cot\left(\frac 12\right)\sin y+\cos y-1\right)+\Phi(y) $$

with $\Phi(y)$ a periodic function with period $1$