Are there any elementary functions $\beta(x)$ that follows this integral $\int_{y-1}^{y} \beta(x) dx =\cos(y)$ Are there any simple functions $\beta(x)$ that follows this integral $$\int_{y-1}^{y} \beta(x) dx =\cos(y)$$
I think there is an infinite amount of solutions that are continuous everywhere but how can I find one that only uses elementary functions?
 A: 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) .$$
A: 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}
A: Let $f(y) :=\beta(y) - (A\sin y + B \cos y) = \beta(y-1) - (A\sin (y-1) + B\cos (y-1))$
then $(A+1)\sin y + B\cos y =A\sin(y-1) +B \cos(y-1) $.
$=(A\cos 1 + B \sin 1)\sin y + (B \cos 1 - A\sin 1)\cos y$
$\therefore A+1 = (A\cos 1 + B \sin 1) \; , \; B = (B \cos 1 - A\sin 1) $
$A+1 = \frac{1}{A}((A^2+B^2)\cos 1 - B^2) $  ( $\because B(\cos 1 - 1) = A \sin 1 $)
$\Rightarrow (A^2 + B^2)(\cos 1 -1) = A , (A^2+B^2)\sin 1 = B$
Let $A^2 + B^2 = R$. then $R = R^2 ( 2 - 2\cos 1) $ ,  $R= \frac{1}{2-2\cos 1}$
so $ A = -1/2$ , $ B = \frac{\sin 1}{2(1-\cos 1)}$.
Now, $f(y)$ is periodic. ( period of $f(y)$ is $1$)
and
$ \int_{y-1}^{y} f(x)dx = \cos y - \int_{y-1}^{y} (A\sin x +B \cos x)dx \\ =\cos y + A(\cos y - \cos (y-1)) - B(\sin y - \sin (y-1))$.
because period of $f(y)$ is $1$, $\int_{y-1}^{y} f(x) dx = \int_{0}^{1} f(x) dx$
$= \cos1 + (A\cos 1 - A)-B(\sin 1) =\frac{1}{2} + \frac{1}{2} \cos 1 - \frac{\sin^2 1}{2(1-\cos 1)}$.
Finally, we get $ \beta(y) = -\frac{1}{2}\sin y + \frac{\sin 1}{2(1 - \cos 1)} \cos y + (\frac{1}{2} + \frac{1}{2} \cos 1 - \frac{\sin^2 1}{2(1-\cos 1)} ) $
A: 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$
