13
$\begingroup$

Is there a (non-piecewise, non-trivial) function where $f(x) = f(\frac{1}{x})$?

Why?

It would be nice to compare ratios without worrying about the ordering of numerator and denominator. For example, I might want to know whether the "magnitude" of the ratio (maybe the "absolute ratio") of the widths of two objects is greater than $2$, but not care which is larger.

It occurred to me that there's a common solution for this problem when comparing the difference of two numbers: the square of a number is the same as the square of its opposite - $(a-b)^2=(b-a)^2$. This is really useful with Euclidean distances, because you don't have to worry about the order of subtraction or use absolute values. Can we get the same elegance for ratios?

Difference: $g(a-b)=g(b-a) \rightarrow g(x)=x^2$

Ratio: $f(\frac{a}{b})=f(\frac{b}{a}) \rightarrow f(x)=\ ?$

$\endgroup$
  • 33
    $\begingroup$ $$ f(x) = x + \frac{1}{x} $$ $\endgroup$ – Will Jagy Nov 25 '13 at 4:34
  • 7
    $\begingroup$ For positive $x$, we have $(\ln(x))^2=(\ln(1/x))^2$. So $f(t)=(\ln(t))^2$ works. But it may not be what you are after. $\endgroup$ – André Nicolas Nov 25 '13 at 4:35
  • 4
    $\begingroup$ $f(x) = x \times \frac1x$. $\endgroup$ – Stephen Montgomery-Smith Nov 25 '13 at 4:40
  • 2
    $\begingroup$ @StephenMontgomery-Smith that's not a very useful solution, but kudos for it anyway :) $\endgroup$ – Sparr Nov 25 '13 at 4:43
  • 3
    $\begingroup$ Your use of $\Longrightarrow$ is very disconcerting. $\endgroup$ – Carsten S Nov 25 '13 at 10:05
12
$\begingroup$

$$ \frac{x}{x^2+1} $$ the inverse of Will Jagy's $x + \frac{1}{x}$.

I like $$x - \frac{1}{x} = \frac{x^2-1}{x}$$ because it contains sign information (input magnitude greater or less than one) that you may choose to ignore, and gives a nice zero for $x = \frac{1}{x} = \pm 1$. If you choose to take the absolute value of it (ignoring the sign) it gives you the desired $f(x) = f(\frac{1}{x})$

$\endgroup$
  • 7
    $\begingroup$ For that matter, any $f(x) + f(\frac{1}{x})$, or $f(x)\cdot f(\frac{1}{x})$ $\endgroup$ – adam W Nov 25 '13 at 4:59
  • $\begingroup$ Oooh that's nice $\endgroup$ – Nolan Amy Nov 25 '13 at 6:36
  • 4
    $\begingroup$ ...or simply any $f(x+\frac1x)$ (or, if you want adamW's sign dependency, $f(x-\frac1x)$) $\endgroup$ – Tobias Kienzler Nov 25 '13 at 10:38
11
$\begingroup$

For lack of a better idea, $f(x)=|\ln x|$.

$\endgroup$
8
$\begingroup$

$$ \frac{1}{1 + x + \frac{1}{x}} = \frac{x}{x^2 + x + 1} $$ extends to the real analytic function written on the right. Notice that $x^2 + x + 1 = (x + \frac{1}{2})^2 + \frac{3}{4} \geq \frac{3}{4}. $

$\endgroup$
2
$\begingroup$

For lack of anything worse than this, $f(x)=(x - \frac{1}{x})^2$.

$\endgroup$
2
$\begingroup$

Let $f(x)$ be arbitrary for $-1\leqslant x\leqslant 1,$ and define $f(x):=f(1/x)$ otherwise.

$\endgroup$
  • $\begingroup$ The question specifies "non-piecewise" $\endgroup$ – Sparr Nov 25 '13 at 16:17
  • $\begingroup$ @Sparr: This definition includes the "non-piecewise" function specified in Will Jagy's answer as well as the first function in adam W's answer. (The other functions require a second statement to define them at $0.$) In fact, it includes all functions $f$ that satisfy $f(x)=f(1/x)$ for $x\neq 0.$ $\endgroup$ – John Bentin Nov 25 '13 at 18:18
  • 1
    $\begingroup$ one of the pieces of your function being non-piecewise does not make your function non-piecewise. pretty much the opposite, actually $\endgroup$ – Sparr Nov 25 '13 at 19:30
  • $\begingroup$ @Sparr: Agreed. $\endgroup$ – John Bentin Nov 25 '13 at 21:26
1
$\begingroup$

It works for any function $f(x) = g(x, \frac{1}{x})$ where $g$ is symmetric (i.e., $g(x, y) = g(y, x)$).

$\endgroup$
  • $\begingroup$ OP wants actual functions $\endgroup$ – Cruncher Nov 25 '13 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.