I'm reading an programming book that uses a lot of math equations and formulas as coding examples. In one lesson, it demonstrates finding the fixed point for $\sin(x) + \cos(x)$ by repeatedly calling the same function on the function's result until a tolerable answer is found.
$$ f(x) = \cos(x) + \sin(x) $$ $$ f(f(f(...f(1)))) \iff 1.2587282 \iff \cos(1.2587282) + \sin(1.2587282) $$
When I plot $y = \sin(x) + \cos(x)$ that is correct.
Another beautiful example was given to demonstrate that the golden ratio $φ$ is a fixed point of the translation
$$ f(x) = 1 + 1/x $$
$$ f(f(f(...f(x)))) \iff 1.618033988 \iff φ $$
My brain was wandering and I was curious to write my own equation and solve it, but I'm not particularly good at math beyond basic geometry/trigonometry so I got stuck.
I thought, "Ok, let's try to use the fixed point procedure to find the solution for $\sin(x) = \cos(x)$...". I ran into trouble when I tried creating the function for it.
Can $\sin(x) = \cos(x)$ be represented as a function that can be solved using the fixed point procedure above?
$$ g(x) = ... ??? $$ $$ g(g(g(...g(1)))) \iff ? \iff \sin(x) \iff \cos(x) $$
(Yes, I realize that there are an infinite number of fixed points for $\sin(x) = \cos(x)$ but I'm okay with just getting the pair one closest to zero.)
$\sin x=\cos x \implies tan x=1\implies \tan x=\tan\dfrac{\pi}{4} \implies x=n\pi+\dfrac{\pi}{4}\\$ where $\\ n\in N$