0
$\begingroup$

Wolfram Alpha is able to solve a few basic functional equations. For example, it knows how to solve equations like this. My question is: how does it do this? I am planning on creating a program to find solutions to functional equations (doesn't have to be anything too fancy -- start with just testing for polynomial solutions, etc.).

Note: By "functional equation" I mean this.

$\endgroup$
12
  • $\begingroup$ Have you taken a look at the references on the page you link to? Based on the titles a few of them seem relevant. $\endgroup$
    – D.W.
    Commented Jun 26, 2021 at 21:41
  • $\begingroup$ @D.W. I have, none of the references accessible to me seem fruitful for my cause. It may be true that I am missing one that might be helpful, if that is the case could you please point me towards that specific one? $\endgroup$ Commented Jun 26, 2021 at 21:48
  • $\begingroup$ Try looking at Mathematica docs for this functionality. If you can't find it, ask a question on Mathematica SE. But is your question about how to do this on a computer in general, or specifically how Mathematica does it? $\endgroup$
    – Juho
    Commented Jun 26, 2021 at 21:54
  • $\begingroup$ @Juho I can't find this specific functionality in the Wolfram Language Docs, rather the Wolfram Mathworld Document (which I linked). I'm asking about a computer in general (the Wolfram example was just to show that it is possible). $\endgroup$ Commented Jun 26, 2021 at 21:58
  • 2
    $\begingroup$ Posts on Stack Exchange must stand on their own, and must be fully understandable and answerable without following any links or any external resources. Right now, I cannot even figure out what you are asking. What is this "this" that you are talking about? $\endgroup$ Commented Jun 26, 2021 at 23:07

1 Answer 1

3
$\begingroup$

While I don't know how Mathematica solves all such cases, it's worth noting that you need to impose some conditions on Cauchy's functional equation $f(x) + f(y) = f(x+y)$ for it to have a unique solution, such as that $f$ is continuous.

Nonetheless, what's probably going on in this case is that Mathematica turned the system into a recurrence, solved that, and then tested to see if that solution also works on negative numbers, rationals and reals.

Let me show you what I mean. Consider the (more complex) functional equation:

$$f(x+y) + f(x-y) = 2\left[ f(x) + f(y) \right]$$

Set $x = y = 0$ to find:

$$2 f(0) = 4 f(x) \Rightarrow f(0) = 0$$

Set $x=n$ and $y=1$ to find:

$$f(n+1) + f(n-1) = 2\left[ f(n) + f(1) \right]$$ $$\Rightarrow f(n+1) = 2f(n) - f(n-1) + 2f(1)$$

Assuming that $f(1)$ is a free constant, what we have now is a linear inhomogeneous recurrence, and there are well-known reasonably mechanical ways to solve these. Once you've found a potential most-general solution for natural numbers, test to see if the solution is still true for negative numbers, rationals, and reals.

In the cause of the Cauchy functional equation, set $x = y = 0$ to find:

$$2f(0) = f(0) \Rightarrow f(0) = 0$$

and set $x=n$ and $y=1$ to find:

$$f(n + 1) = f(n) + f(1)$$

I'll leave the rest as an exercise.

$\endgroup$
1
  • 1
    $\begingroup$ Thanks so much! This makes a lot of sense. In the case with $3$ or more variables, the recurrence solution would still work with this method (you just need a few more substitutions at the beginning). $\endgroup$ Commented Jun 27, 2021 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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