Why do I get a square wave when iterating $$\cos\left(\tan\left(\cos\left(\tan\left(\cos(x)\right)\right)\right)\right)?$$ And why does the square wave happen where it does? It is clearly an even function, and it seems to have period $1.634$
2026-03-27 04:23:36.1774585416
Why do I get a square wave when iterating $\cos\left(\tan\left(\cos\left(\tan\left(\cos(x)\right)\right)\right)\right)$?
89 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in REAL-ANALYSIS
- how is my proof on equinumerous sets
- Finding radius of convergence $\sum _{n=0}^{}(2+(-1)^n)^nz^n$
- Optimization - If the sum of objective functions are similar, will sum of argmax's be similar
- On sufficient condition for pre-compactness "in measure"(i.e. in Young measure space)
- Justify an approximation of $\sum_{n=1}^\infty G_n/\binom{\frac{n}{2}+\frac{1}{2}}{\frac{n}{2}}$, where $G_n$ denotes the Gregory coefficients
- Calculating the radius of convergence for $\sum _{n=1}^{\infty}\frac{\left(\sqrt{ n^2+n}-\sqrt{n^2+1}\right)^n}{n^2}z^n$
- Is this relating to continuous functions conjecture correct?
- What are the functions satisfying $f\left(2\sum_{i=0}^{\infty}\frac{a_i}{3^i}\right)=\sum_{i=0}^{\infty}\frac{a_i}{2^i}$
- Absolutely continuous functions are dense in $L^1$
- A particular exercise on convergence of recursive sequence
Related Questions in TRIGONOMETRY
- Is there a trigonometric identity that implies the Riemann Hypothesis?
- Finding the value of cot 142.5°
- Using trigonometric identities to simply the following expression $\tan\frac{\pi}{5} + 2\tan\frac{2\pi}{5}+ 4\cot\frac{4\pi}{5}=\cot\frac{\pi}{5}$
- Derive the conditions $xy<1$ for $\tan^{-1}x+\tan^{-1}y=\tan^{-1}\frac{x+y}{1-xy}$ and $xy>-1$ for $\tan^{-1}x-\tan^{-1}y=\tan^{-1}\frac{x-y}{1+xy}$
- Sine of the sum of two solutions of $a\cos\theta + b \sin\theta = c$
- Tan of difference of two angles given as sum of sines and cosines
- Limit of $\sqrt x \sin(1/x)$ where $x$ approaches positive infinity
- $\int \ x\sqrt{1-x^2}\,dx$, by the substitution $x= \cos t$
- Why are extraneous solutions created here?
- I cannot solve this simple looking trigonometric question
Related Questions in GRAPHING-FUNCTIONS
- Lower bound of bounded functions.
- Do Irrational Conjugates always come in pairs?
- Graph rotation: explanation of equation
- Plot function y = tan(yx)
- Sketching a lemniscate curve with a max function?
- 3 points on a graph
- show $f(x)=f^{-1}(x)=x-\ln(e^x-1)$
- What is this method of sketching a third degree curve?
- Getting a sense of $f(x) = x (\log x)^6$
- Can I describe an arbitrary graph?
Related Questions in FUNCTION-AND-RELATION-COMPOSITION
- Proof verifications: Elementary composition proofs. (if $g\circ f$ is one-to-one, then show $f$ is one-to-one etc.)
- Easy looking functional equation.
- Find matrix associated to linear transformation
- Inverse of a map $T_{(p,q)}(X \times Y) \to T_p X \times T_p Y$
- Prove that composition functions are surjective
- Function Composition Formulas
- Residue of composite functions
- Are there functions (or category of functions) that satisfy following conditions?
- How many successive logs until a number becomes $1$?
- What numbers can be created by $1-x^2$ and $x/2$?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?

First of all, notice that it depends on how you "iterate". If you repeatedly apply $x \mapsto \cos(\tan(x))$ to $\cos(x)$, you will eventually get graphs that look like square waves, but the wave will "flip" every time you iterate: the peaks will become troughs and the troughs will become peaks. This is not a convergent sequence of functions.
If you repeatedly apply $x \mapsto \cos(\tan(\cos(\tan(x))))$ to $\cos(x),$ however, you do get a converging sequence of functions.
I think this is a little easier to make sense of by considering the function $f(x) = \tan(\cos(\tan(\cos(x)))).$ The figure below is a graph of $y=f(x)$ with the graph of $y=x$ for comparison.
There are exactly three values of $x$ for which $f(x) = x.$ Let's call them $x_1,$ $x_2,$ and $x_3.$ These numbers are approximately \begin{align} x_1 &\approx 0.0137109619668026, \\ x_2 &\approx 0.816541226172734, \\ x_3 &\approx 1.55708579436399. \end{align}
Because $f(x) < x$ when $x_1 < x < x_2,$ if we apply $f$ repeatedly to a value of $x$ in that range, the outcomes of $f(x),$ $f(f(x)),$ $f(f(f(x))),$ $f(f(f(f(x)))),$ and so forth will be progressively smaller, eventually approaching $x_1.$
Because $f(x) > x$ when $x_2 < x < x_3,$ if we apply $f$ repeatedly to a value of $x$ in that range, the outcomes of $f(x),$ $f(f(x)),$ $f(f(f(x))),$ $f(f(f(f(x)))),$ and so forth will be progressively larger, eventually approaching $x_3.$
For similar reasons, if $0 \leq x < x_1$ then the successive applications of $f$ produce larger and larger values approaching $x_1,$ whereas if $x_3 < x \leq \frac\pi2$ then the successive applications of $f$ produce smaller and smaller values approaching $x_3.$
On the other hand, $f(x_1) = x_1$ exactly, and therefore $f(x_1) = f(f(x_1)) = f(f(f(x_1))) = f(f(f(f(x_1))))$ and so forth. Likewise $x_2 = f(x_2) = f(f(x_2)) = f(f(f(x_2))) = f(f(f(f(x_2))))$ and $x_3 = f(x_3) = f(f(x_3)) = f(f(f(x_3))) = f(f(f(f(x_3)))).$
So for every possible value of $x$ in the range from $0$ to $\frac\pi2$ inclusive, whenever $x < x_2$ the repeated application of $f$ produces a sequence of outputs converting to $x_1,$ and whenever $x > x_2$ the repeated application of $f$ produces a sequence of outputs converting to $x_3.$ The result is a sequence of functions, which if restricted to the domain $\left[0,\frac\pi2\right]$ converge on the step function $$ f^*(x) = \begin{cases} x_1 & 0 \leq x < x_2, \\ x_2 & x = x_2, \\ x_3 & x_2 < x \leq \frac\pi2.\end{cases} $$
Outside of the interval $\left[0,\frac\pi2\right],$ we can use the fact that $\cos(-x) = \cos(x)$, the fact that $\cos(\pi - x) = -\cos(x)$, and the fact that $\tan(-x) = -\tan(x)$ to conclude that $$ \cos(\tan(\cos(\pi - x))) = \cos(\tan(-\cos(x))) = \cos(-\tan(\cos(x))) = \cos(\tan(\cos(x))) $$ and therefore $f(\pi - x) = f(x)$ and $f(f(\cdots f(\pi - x))) = f(f(\cdots f(x)))$ for any number of iterations of the application of $f$; that is, each of these functions is symmetric around the line $y = \frac\pi2,$ and each function on the interval $\left[\frac\pi2,\pi\right],$ is just a mirror image of the same function over $\left[0,\frac\pi2\right].$ This gives us $$ f^*(x) = \begin{cases} x_1 & 0 \leq x < x_2, \\ x_2 & x = x_2, \\ x_3 & x_2 < x < \pi - x_2,\\ x_2 & x = \pi - x_2, \\ x_1 & \pi - x_2 < x \leq \pi.\end{cases} $$ This is already starting to look like a square wave.
The fact that $\cos(-x) = \cos(x)$ also tells us that any of these functions on the interval $[-\pi,0]$ is a mirror image of the function on the interval $[0,\pi].$ This gives us something that looks like two cycles of a square wave.
Then the fact that $\cos(x+2\pi) = \cos(x-2\pi) = \cos(x)$ means the function over $[-\pi,\pi]$ repeats forever to the left and right, so $f^*$ actually is a square wave with period $\pi$ (not $1.634$).
You are interested in functions of the form $\cos(f(\cdots f(x)))$, which converge on the limit function $\cos(f^*(x)).$ This again is a square wave, except that all the $x_1$ values are replaced by $\cos(x_1)$ (which is close to $1$), all the $x_3$ values are replaced by $\cos(x_3)$ (which is close to $0$), and all the $x_2$ values are replaced by $\cos(x_2)$. That is, the wave has a smaller amplitude, it has peaks where $f^*(x)$ has troughs, and it has troughs where $f^*(x)$ has peaks.
Unlike what you might have expected, the peaks and troughs are not of equal width. One peak of $\cos(f^*(x))$ runs from $-x_2$ to $x_2,$ so its width is $2x_2 \approx 1.63308.$ That is greater than $\frac\pi2,$ so the trough has a width less than $\frac\pi2$ in order to make the length of one complete cycle be $\pi.$