We say that $g(x)\sim h(x)$ when $x\to x_0$ if $$ \lim_{x\to x_0}\frac{g(x)}{h(x)}=1, $$ so, for example, $x\sim\sin(x)$ when $x\to0$.
I would like to find a function $f$ such that $f(x)\sim f(\sin(x))$ is false as $x\to0$. Can you find an example?
We say that $g(x)\sim h(x)$ when $x\to x_0$ if $$ \lim_{x\to x_0}\frac{g(x)}{h(x)}=1, $$ so, for example, $x\sim\sin(x)$ when $x\to0$.
I would like to find a function $f$ such that $f(x)\sim f(\sin(x))$ is false as $x\to0$. Can you find an example?
On
How about $$f(x) = \begin{cases} x \sin \frac1x & (x\neq 0)\\ 0 & (x=0) \end{cases}$$ Consider in fact $$g(x)= \frac{x\sin\frac1{x}}{\sin x \sin\frac1{\sin x}} \stackrel{x\to 0}{\sim }\frac{\sin\frac1{x}}{\sin\frac1{\sin x}}=h(x).$$ Now the limit for $x\to 0$ of $h(x)$ (and therefore of $g(x)$) does not exist. In fact, for $a_n = \frac1{n\pi}$ we have $h(a_n) = 0$, and for $b_n = \frac1{\frac{\pi}2 +n\pi}$, we have $$h(b_n) = \frac1{\sin\frac1{\sin\frac1{\pi/2+n\pi}}}\sim \frac1{\sin\frac1{\pi/2 +n\pi}}\to +\infty.$$
On
If you can render $f(x-x^3/6)\not\sim f(x)$ (using the leading difference between $x$ and $\sin x$), you're there.
We have, from the Binomial Theorem extended to nonnatural exponents:
$(x-x^3/6)^{-2}=[x^{-2}][(1-x^2/6)^{-2}]=x^{-2}+1/3+O(x^2).$
So if we select $f(x)=\exp(x^{-2})$, then with that constant term of $1/3$ entering the exponent we get $f(x-x^3/6)\not\sim f(x)$ and thence $f(\sin x)\not\sim f(x)$.
If $x$ is considered as a complex variable, then the function chosen above has an essential singularity at $x=0$. Suppose (with $x$ a complex variable) that $g(x)$ is any function such that $g(x)\sim x$ as $x\to0$, and that $f$ is to be analytic in some disc point-punctured at $0$ ($0<|x|<\epsilon$). Then any leading term in the Laurent series for $f$ would force $f(x)\sim f(g(x))\sim$ this leading term. We could avoid this only by setting up $f$ with an essential singularity, as above.
On
For $|x|\le\pi$,
$$
\begin{align}
\frac{\sin(x)}x\left(1+\frac{x^2}6\right)
&\le\left(1-\frac{x^2}6+\frac{x^4}{120}\right)\left(1+\frac{x^2}6\right)\tag{1a}\\
&=1-\frac{7x^4}{360}+\frac{x^6}{720}\tag{1b}\\[6pt]
&\le1\tag{1c}
\end{align}
$$
If we let
$$
f(x)=\sin\left(\frac1x\right)\tag2
$$
then, for $n$ a positive integer, at $x=\frac1{n\pi}$, $f(x)=0$ and
$$
\begin{align}
\vert f(\sin(x))\vert
&=\left|\,\sin\left(\frac1{\sin\left(\frac1{n\pi}\right)}\right)\,\right|\tag{3a}\\
&=\left|\,\sin\left(\frac{n\pi}{n\pi\sin\left(\frac1{n\pi}\right)}\right)\,\right|\tag{3b}\\
&\ge\left|\,\sin\left(n\pi+\frac1{6n\pi}\right)\,\right|\tag{3c}\\[6pt]
&=\left|\,\sin\left(\frac1{6n\pi}\right)\,\right|\tag{3d}
\end{align}
$$
Explanation:
$\text{(3a):}$ evaluate $(2)$ at $x=\frac1{n\pi}$
$\text{(3b):}$ multiply numerator and denominator by $n\pi$
$\text{(3c):}$ apply $\frac{x}{\sin(x)}\ge1+\frac{x^2}6$ from $(1)$
$\text{(3d):}$ $\sin(n\pi+x)=(-1)^n\sin(x)$
Thus,
$$
\lim_{x\to\frac1{n\pi}}\left|\,\frac{f(\sin(x))}{f(x)}\,\right|=\infty\tag4
$$

Let's construct a continuous function near $0$ with $f(0)=0$ st $\liminf f(x)/f(\sin x) \to 0, x \to 0$; as we can define it to be even it is enough to construct it on $[0, \delta]$.
Pick $n \ge 10$ say st $\frac{1}{n+1}<\frac{1}{n}-\frac{1}{n^3} < \frac{1}{n}-\frac{1}{6n^3} < \frac{1}{n}$
Then define $f(1/n)=1/n^2, f(\frac{1}{n}-\frac{1}{n^3} )=f(\frac{1}{n}-\frac{1}{6n^3})=1/n$ and $f$ linear between $ \frac{1}{n}, \frac{1}{n}-\frac{1}{6n^3}$, constant between $\frac{1}{n}-\frac{1}{6n^3}, \frac{1}{n}-\frac{1}{n^3}$ and linear again between $\frac{1}{n}-\frac{1}{n^3}, \frac{1}{n+1}$.
Clearly $f(x) \to 0, x \to 0, f(x) >0, x >0$ so putting $f(0)=0$ and extending it to be even we get a continuous function on $[-1/10, 1/10]$ with $f(0)=0$
From the Taylor series of $\sin x=x-x^3/6+x^5/120...$ it is clear that for small $x>0$ we have $x-x^3 < \sin x < x- x^3/6$ so for $n$ large enough so $x=1/n$ satisfies the previous inequality, hence $\sin 1/n \in [\frac{1}{n}-\frac{1}{n^3}, \frac{1}{n}-\frac{1}{6n^3}]$ where $f$ is constant $1/n$ we have $f(1/n)=1/n^2, f(\sin 1/n)=1/n$ so $\liminf f(x)/f(\sin x) =0$ since $f >0$
Edit: per comments what I actually meant is not that any such counterexample cannot be continuously differentiable at $0$ but that it can not have a nonvanishing derivative of some order at zero which is continuous near zero; in other words $f$ can even be $C^{\infty}$ but with all derivatives at zero being zero since what is not possible is a local normal form $f(x)=cx^k+O(x^{k+1}), c \ne 0$