7

I want to know how to solve this type of questions. How can I find $\ f(x)$ from $\ f(f(x))$

Suppose, $\ f(f(x)) = x$ , then $\ f(x)=x$ or $\ f(x)=\dfrac{(x+1)}{(x-1)}$
how to find these solutions..
I have found one.. $\ f(6) = \sqrt{222} $
Is this correct?

Rezwan Arefin
  • 3,106
  • 1
  • 14
  • 39
  • 2
    There are infinitely many real-valued functions of a real variable such that $f(f(x)) = x$, not just the two you give. – Rob Arthan Jan 14 '16 at 17:29
  • 1
    The set of involutions is not made by just those functions, and $f(f(x))=x^2+1$ does not give enough information to find a unique value $f(6)$. Do you want to find all the possible values of $f(6)$, given $f(f(x))=x^2+1$? – Jack D'Aurizio Jan 14 '16 at 17:30
  • For large values of $x$, $f(f(x))\approx x^2$, for which a solution is $f(x)=x^{\sqrt2}$. –  Jan 14 '16 at 17:30
  • 1
    Related: http://math.stackexchange.com/questions/3633/square-root-of-a-function-in-the-sense-of-composition. – Martin R Jan 14 '16 at 17:39
  • Do you want to impose constraints on the set of functions we'll consider that would give $f(f(x))$ just the two solutions you mention? If you can articulate such constraints, they might determine $f(6)$. – J.G. Mar 05 '22 at 21:35
  • 1
    $f(6)=\sqrt{222}$ How do you find or guess this? – auntyellow Mar 06 '22 at 07:48

2 Answers2

12

Assume $f(x_1)=f(x_2)$. Then $x_1^2+1=f(f(x_1))=f(f(x_2))=x_2^2+1$ and so $x_2=\pm x_1$. Then from $f(f(-x))=f(f(x))$ we conclude that $f(-x)=\pm f(x)$ for all $x$.

Define $g\colon [0,\infty)\to [0,\infty)$ by $g(x)=|f(x)|$. For $x$ with $g(x)=f(x)$ we have $$g(g(x))=|f(f(x))|=|x^2+1|=x^2+1.$$ And for $x$ with $g(x)=-f(x)$ we have $$g(g(x))=|f(-f(x))|=|\pm f(f(x))|=|f(f(x))|=x^2+1$$ as well. Hence $g(g(x))=x^2+1$ for all $x\ge 0$. Given a function $g$ with this property, we can easily construct a suitable $f$: Just let $f(x)=\begin{cases}g(x)&x\ge0\\g(-x)&x<0\end{cases}$. If $g$ is additionally continuous then so is $f$. We can find a lot of continuous $g$:

Pick $a_1\in(0,1)$, let $a_0=0$ and recursively $a_n=a_{n-2}^2+1$ for $n\ge 2$. Then the sequence $(a_n)$ is strictly increasing towards $\infty$. Now let $g_1\colon[0,a_1]\to[a_1,1]$ be an arbitrary increasing bijection. We can work our way to infinity from there: Assume we have an increasing bijection $g_n\colon [0,a_n]\to [a_1,a_{n+1}]$ such that $g(g(x))=x^2+1$ for $0\le x\le a_{n-1}$. Then define $g_{n+1}\colon [0,a_{n+1}]\to[a_1,a_{n+1}]$ by $$g_{n+1}(x)=\begin{cases}g_n(x)&0\le x\le a_n\\g_n^{-1}(x)^2+1&a_1< x\le a_{n+1}\end{cases}$$ (noting that the two cases agree for $a_1\le x\le a_n$) and finally $g(x)=g_n(x)$ for any $n$ with $a_n\ge x$. One verifies that this is well-defined and indeed $g(g(x))=x^2+1$ for all $x$.

Note that the sequence of $a_n$ goes like this: $$0, a_1, 1, a_1^2+1, 2, (a_1^2+1)^2+1, 5, ((a_1^2+1)^2+1)^2+1, 26, \ldots$$ and that it is quite clear that we can make our choices (even under the restriction of requiring continuous $f$) at least such that $f(x)$ is an arbitrary number between $6$ and $26$.

-1

Here is a javascript function that conforms to the original poster's requirement that $f(f(x)) = x^2+1$. The original poster asked what is $f(6)$. This program computes that

$f(6)=12.813735153397387$

and

$f(12.813735153397387)=37$

QED we see $f(f(6)) = 6^2+1=37$

function f(x) {
  x<0 && (x=-x);
  return x==x+1 ? Math.pow(x, Math.sqrt(2)) : Math.sqrt(f(x*x+1)-1);
}

It is not known that the function $f(x)$ can be expressed in mathematical terms (closed-form). It may be the $f(x)$ implementation in javascript above could help in discovering such a closed-form solution. I only know that the above javascript code adheres to the OP's requirement that $f(f(x)) = x^2+1$ for all $-\infty<x<\infty$ insofar as javascript has finite precision.

I wrote the code, BTW. I am sharing it in the hopes that it will be useful.

Javascript can be executed in a browser sandbox, here is one (no affiliation): https://jsconsole.com/

Here is the equivalent description of the function implemented above: $f(x)=\begin{cases}f(-x)&x<0\\x^{\sqrt{2}}&x\approx x+1\\\sqrt {f(x^2+1)-1}\end{cases}$

I believe this function is the optimal solution for $f(f(x)) = x^2+1$ but I can't prove it.

  • As the existing answer says, there's an infinite number of reasonable choices for $f$ resulting in an infinite number of possibilities for $f(6)$. So suggesting a numerical algorithm for a particular $f$ (with no explanation of or motivation for the algorithm, at that) seems rather beside the point. – epimorphic Nov 11 '18 at 15:49
  • What's specifically wrong with it? – epimorphic Nov 11 '18 at 18:43
  • 1
    Elaboration would be great! :) – epimorphic Nov 12 '18 at 07:20
  • I'm looking for a smooth f(x) function that doesn't have zig-zags or elbows or a discernable period to it. The solutions that arise from Hagen von Eitzen's scheme (and it is indeed clever) seem jarring to the eye in comparison to the nice, smooth $x^2+1$ curve. They have monotonically increasing $f(x)$ but not monotonically increasing slope. Also they are only the product of an algorithm, likely making a closed-form solution unattainable. The curve my function produces suffers from none of the objections I've brought up and may be expressable in a closed-form solution. I just don't know. – dashxdr Nov 12 '18 at 07:49