Functions for which $f(x) = f(|x|)$ [closed]

Can there be a function $f$ for which $f(x) = f(|x|)$ (excluding $f(x) = x^2$ or any even exponent)?

• $\cos{x}$? Or let $g$ be any function, and consider $g(x)+g(-x)$. – Chappers Feb 15 '17 at 3:50
• Hehe, $|x|$ ! (and from there, all $f(|x|)$). – Yves Daoust Feb 15 '17 at 8:41

Yes any even function will satisfy the given condition f(x) = f(|x|) As it is standard definition of even function e.g. y = |x| , y = cos(x) Actually any function giving same value of y for -ve x and +ve x where x will have same magnitude in both cases

• I was going to upvote, but couldn't after I saw "+ve" :) – pjs36 Feb 15 '17 at 4:07
• We generally not show +ve sign but actually it is +ve x – user41111 Feb 15 '17 at 4:09
• I just meant "+ve" as an abbreviation; it drives me crazy for some reason. – pjs36 Feb 15 '17 at 4:12
• Great.......... 👍👍👍 – user41111 Feb 15 '17 at 4:14
• So "$+$" stands for "positi", and "$-$" stands for "negati"? – Jonas Meyer Feb 15 '17 at 5:12

Of course. Take any function defined on the positive reals and zero. Then define $f(-x)=f(x)$. My favorite is $f(x)=\text{cheese}$ for any $x \in \Bbb R$

This is very flip, but there is a real point here. There are lots of functions out there, most of which do not have any nice description at all. Most are not continuous, let alone differentiable, but the ones we draw are (almost) always differentiable. You did not specify the range, so I could define a function from $\Bbb R$ to $\{\text{cheese}\}$. If you had demanded $\Bbb R \to \Bbb R$ I could have said $f(x)=18000$ instead. Just within functions from $\Bbb R \to \Bbb R$ I have shown how to get $2^{\mathfrak c}$ of them.

• Do the set of functions and the set of even functions have the same cardinality ? – Yves Daoust Feb 15 '17 at 8:45
• @YvesDaoust: Yes, they are both $\mathfrak c^{\mathfrak c}$. There are $\mathfrak c$ positive numbers and each one gets $\mathfrak c$ choices of the function value. – Ross Millikan Feb 15 '17 at 14:48
• Agreed, but can we establish an easy bijection between these ? – Yves Daoust Feb 15 '17 at 15:34
• @YvesDaoust: start with your favorite bijection $\Bbb R \leftrightarrow \Bbb R^+$ Then each function of $\Bbb R$ matches a function on $\Bbb R^+$. Extend the latter by symmetry. – Ross Millikan Feb 15 '17 at 15:43

All functions such that $f(x)=f(|x|)$ can be written as $g(|x|)$, where $g$ coincides with $f$ in the non-negative domain.

Conversely, for any function $f$, $f(|x|)$ has the desired property.

Hence,

$$5,\\|x|,\\\lfloor|x|\rfloor,\\ |x|^k=|x^k|,\\\cos(|x|)=\cos x,\\\sin(|x|)=|\sin x|,\\\ln|x|,\\a|x|^2+b|x|+c=ax^2+b|x|+c\\\cdots$$