I have know that the general form of a rotating function is as follows:
$$y(\cos\theta) - x(\sin\theta) = f\big(x(\cos\theta\big) + y\big(\sin\theta)\big).$$
Suppose that the following function will make a rotation by $45$ degrees: $$f(x) = x^3$$
How can one deduce that the right hand-side substitution will be $$ \dfrac{y}{\sqrt{2}}-\dfrac{x}{\sqrt{2}} = \left(\dfrac{y}{\sqrt{2}}+\dfrac{x}{\sqrt{2}}\right)^3 $$
I know that $$ \cos(45) = \sin(45) = \dfrac{1}{\sqrt{2}} $$
Actually the question is how one can understand that $x^3$ should make $(x(\cos\theta) + y(\sin\theta))$ which is the right hand of the function to be $(x(\cos\theta) + y(\sin\theta))^3$ (i.e. cubed).
What if the function was: $$ f(x) = \sin(a*x) $$ or $$ \dfrac{y}{a}+\dfrac{x}{b} = c $$ How can we substitute the given function in the general form as the first one?