Smooth sawtooth wave $y(x)=\cos(x-\cos(x-\cos(x-\dots)))$
Consider an infinite recursive function
$$y(x)=\cos(x-\cos(x-\cos(x-\dots)))$$
$$y=\cos(x-y)$$
Plotting the function $y(x)$ implicitly we get a smooth sawtooth-like wave:
Was this function studied before? For example, its derivative, Fourier series or other properties. It may be useful in electronics or other applications.
I can find the expression for its derivative in terms of $y$ and $x$, but I do not know how to plot it effectively (without tabulating it by recursive formula for $y$).
$$y'(x)=-\frac{\sin(x-y)}{1-\sin(x-y)}$$
We obtain the correct expression for the maxima and minima of the function. (Note that the first positive maximum is at $x=1$ and the first minimum is at $x=\pi-1$, which is confirmed by numerical computation).
Since the function is smooth, the derivative should be finite everywhere. Does this mean that the denominator in this expression can never be equal to $0$?
By the way, the recursive formula itself is not a fluke - I checked its convergence numerically in Mathematica and it seems to converge for all values. However, for the values close to the 'vertical lines' the convergence is slower than for the rest.
Edit
The function is not smooth, because its derivative is not defined at $x=\frac{\pi}{2}+2\pi n$ and $y=0$ as cardboard_box pointed out and as can be seen from the expression. Oh, it's just vertical tangents apparently
Update
I wanted to illustrate the very helpful answers and comments I've been given so far.
First, credit goes to Lucian for introducing me to Clausen function (see the first comment below). However, this function does not have vertical tangents anywhere, as you can see in the graph (I plotted Clausen using its Fourier series, since it's easier than the integral definition):
So, the function I defined here is much more "sawtooth-like".
And finally, davik gave the parametric form for the function and figured out its Fourier series, which I plot below:
You may notice I displaced and reversed the original function when plotting these graphs. We can also use sine instead of cosine if needed.
Now the final question that I wanted to ask:
Has anyone seen this function anywhere? Maybe it's worth it to make a complete description of its properties and publish somewhere?
Solution 1:
Note that this function's graph can be parametrized as $ x(t) = t + \cos(t)$ and $ y(t) = \cos (t)$
So, we can pretty much use this to find most interesting things you may want to know. First, it is a shear of the graph of $ y = \cos(x)$ by the matrix $$ \pmatrix{1 & 1 \\ 1 & 0} $$ Which tell you the zeros and maxima. Also, if you want vertical tangents, since $y'(t) = - \sin(t);~~ x'(t) = 1 - \sin (t)$ you have vertical tangents at $\frac{\pi}{2} + 2\pi k$.
If we shift this to the right by $\frac{\pi}{2}$, then by quite straightforward computation, together with the definition of the Bessel function, we get that the nth fourier sine series coefficent
$$b_n = \frac{2(-1)^nJ_n(n)}{n}$$ where $J_n(x)$ is the Bessel function of the first kind.