How to find a function $f$ that satisfy the equation $f(x)=f(x-1)+x^2$

779 Views Asked by At

How to find a continuous function $f$ that satisfy the equation $f(x)=f(x-1)+x^2$

Where both $x$ and $f$ are members of the set of real numbers.

There’s probably more than one $f$ that satisfies the equation. So is there like a general form for all $f$ that do so?

1

There are 1 best solutions below

0
On BEST ANSWER

That is similar to the function that gives the sum of the first $n$ perfect squares. It actually follows from how that formula is proved by induction.

In this case then $f(x)=\dfrac{x(x+1)(2x+1)}{6}$

This is because for example: $f(3)-f(2)=3^2$ which should fit that sum of squares description.

However, it doesn't hurt to be more detailed. Let's say the $x^2$ defines a polynomial function. I think this is the only kind of function possible but I can't prove it.

Let's also pick one of degree 3. I'll explain why in the end.

Define it generally as $f(x)=ax^3+bx^2+cx+d$

Then:

$ax^3+bx^2+cx+d=f(x)=a(x-1)^3+b(x-1)^2+c(x-1)+d+x^2$

Let me just do the messy expansion for you.

$ax^3+bx^2+cx+d=ax^3+(b-3a+1)x^2+(3a-2b+c)x+(b+d-c-a)$

Equating coefficients we have:

$c=3a-2b+c \implies 3a=2b$

$b=b-3a+1 \implies a=\dfrac{1}{3}$

$b=3 \cdot \dfrac{1}{3} \cdot \dfrac{1}{2}=\dfrac{1}{2}$

$d=b+d-c-a \implies c=\dfrac{1}{6}$

$d$ is not determined so in the function it can be anything.

Thus all functions satisfying this equation are:

$f(x)=\dfrac{1}{3}x^3+\dfrac{1}{2}x^2+\dfrac{1}{6}x+d$

Or when you factorize and add elegance:

$\boxed{f(x)=\dfrac{x(x+1)(2x+1)}{6}+k \quad k \in \mathbb{R}}$

The reason why I picked a cubic is because upon expansion, the $ax^3$ terms cancel out as the working shows. That's why I didn't consider them. In that case the next lowest power which is $bx^2$ needs to match the highest power on the other side. So we don't need to go any higher than 3.

$\text{Edit}^2$ I hear that in this case $k$ can also be a function with a period of one e.g. $\sin(2\pi x)$ @ WE Tutorial School. Why didn't I think of that? Anyway, the other backbone is legitimate reasoning.

I also tried adding a higher power $ex^4$ on $f(x)$ but I got $a=a-4e$ which gives me a stronger statement.