Finding functions such that $f(x)=f(|x|)$ I found this question in my book's "HOTS" section.
Now I can't think of any way to solve it analytically, So I tried graphically.
If $f(x)=f(|x|)$, then the graphs $y=f(x)$ and $y=f(|x|)$ will be same also. Now the graph of $y=f(|x|)$ from the graph of $y=f(x)$ is obtained by deleting the graph for negative $x-$axis and replacing it with the reflection of that for positive $x-$ axis on $y-$axis.
Using this manipulation I found following curves-
$1.$ $y=\alpha$ , $\alpha \in R$
$2.$ $y=x^n-\alpha^n$ , $\alpha \in R$, $n$ is even
$3. $ $y^2+x^2=\alpha^2$ ,  $\alpha \in R$, $y\geq 0$ or  $y\leq 0$
$4.$ $\displaystyle\frac{x^2}{\alpha^2}+\frac{y^2}{\beta^2}=1$,  $y\geq 0$ or  $y\leq 0$
$5.$ $\displaystyle\frac{x^2}{\alpha^2}-\frac{y^2}{\beta^2}=1$,  $y\geq 0$ or  $y\leq 0$
Can you help me with some other examples ?
Also how can we solve this analytically?
 A: Although "$f(x)$ is an even function" may seem the acceptable solution, it can not be the correct answer to the question, without further hypotheses.
For example, if we take:
$$f(x)=x^2$$
that is an even function i.e. we have $f(x)=-f(-x)$, we have in the complex plane
$$f(i)=-1 \ne f(|i|)=1$$
So the the requirement $f(x)=f(|x|)$ is not satisfied, for the even function $x^2$.
Instead, any function $f(x)$ of the form $f(x)=g(|x|)$ where $g(u)$ is generic function, satisfies $f(x)=f(|x|)$, because of the identity $||x||=|x|$.
This solution: $f(x)=g(|x|)$ is valid also in complex field. Moreover, it is valid in any algebra where norm is defined (quaternions, octonions,...).
Examples:
$$f(x)=|x|^2$$
$$f(x)=\sin(|x|)$$
$$f(x)=\dfrac{1}{|x|}$$
$$f(x)=\dfrac{\exp(-|x|)}{|x|}$$
$$f(x)=a_0+a_1|x|+a_2|x|^2+...$$
A: If $f(x)=f(|x|)$ for all $x\in\Bbb{R}$ then the function $f$ satisfies (i) $f(x)=f(x)$ for $x\ge0$ and (ii) $f(x)=f(-x)$ for $x<0$. Since condition (i) is satisfied by any function, this boils down to $f(x)=f(-x)$ for $x<0$. And $f$ satisfies $f(x)=f(-x)$ for $x<0$ if and only if $f(x)=f(-x)$ for all $x\in\Bbb{R}$. Hence,
$$
\forall x\in\Bbb{R}:f(x)=f(|x|)\iff\text{$f$ is an even function defined on $\Bbb{R}$}
$$
You can read more about even functions here. Common examples include $x^4$, $\cos(x)$, $\cosh(x)$, and $|x|$, as well as the examples you have already given in your question.
