Solving functional equation $f(x)=3f(x+1)-3f(x+2)$ It is given that a function f(x) satisfy:
$$f(x)=3f(x+1)-3f(x+2)\quad \text{ and } \quad f(3)=3^{1000}$$ then find value of $f(2019)$.
I further wanted to ask that is there some general method to solve such equation. The method that I know to solve such questions is to substitute $x$ with $x+1$ in equation and there by making new equation which is
$$ f(x+1)=3f(x+2)-3f(x+3)$$ then again substitute $x$ with $x+2$ in original equation and make new equation $$f(x+2)=3f(x+3)-3f(x+4)$$ Do this for a couple of times and then on combining the equations, in most of the question we get some relation like f(x) = f(x+a) but that does not work here. Please share your ideas on how to solve such questions.
 A: $$ \begin{align} f(x)&=f(x-1)-\frac{f(x-2)}{3}, f(3)=3^{1000}\\
f(x)&=f(x-1)-\frac{1}{3}f(x-2)\\
f(x+1)&=f(x)-\frac{1}{3}f(x-1)=(f(x-1)-\frac{1}{3}f(x-2))-\frac{1}{3}f(x-1)\\
f(x+1) &= \frac{2}{3}f(x-1)-\frac{1}{3}f(x-2)\\
f(x+2)&=f(x+1)-\frac{1}{3}f(x)=(\frac{2}{3}f(x-1)-\frac{1}{3}f(x-2))-\frac{1}{3}(f(x-1)-\frac{1}{3}f(x-2))\\ 
f(x+2)&=\frac{1}{3}f(x-1)-\frac{2}{9}f(x-2)\\
f(x+3)&=f(x+2)-\frac{1}{3}f(x+1)=(\frac{1}{3}f(x-1)-\frac{2}{9}f(x-2))-\frac{1}{3}(\frac{2}{3}f(x-1)-\frac{1}{3}f(x-2))\\
f(x+3) &= \frac{1}{9}f(x-1)-\frac{1}{9}f(x-2)
f(x+4)=(\frac{1}{9}f(x-1)-\frac{1}{9}f(x-2))-\frac{1}{3}(\frac{1}{3}f(x-1)-\frac{2}{9}f(x-2))\\
f(x+4)&=(-\frac{1}{9}+\frac{2}{27})f(x-2)=-\frac{1}{27}f(x-2)\end{align}$$
$$\therefore f(x+4)=-\frac{1}{27}f(x-2) \implies f(x+6)=-\frac{1}{27}f(x)$$
$$\implies f(x+6k)=(-\frac{1}{27})^k f(x)  \forall k \in N$$
$$f(2019)=f(3+6\cdot 336)=(-\frac{1}{27})^{336} f(3)=\frac{1}{3^{1008}}3^{1000} = \frac{1}{3^8}$$
$$\therefore f(2019) = \frac{1}{3^8}$$
A: Note that, we can rewrite the given recurrence such that $$af(n+1)-f(n)=b(af(n)-f(n-1))$$ with complex numbers $a=\sqrt{3}e^{i\pi/6}, b=\dfrac{\sqrt{3}}{3}e^{i\pi/6}.$ Inductively we have that $$af(n+1)-f(n)=b^{k+1}(af(n-k)-f(n-k-1))$$ for all $k\in\mathbb{N}.$ In particular, this quantity equals to $b^{n}(af(1)-f(0)).$ Now note that $$a^{n+1}f(n+1)-a^nf(n)=(ab)^{n}A,$$ where $A=af(1)-f(0)$ is a constant. By telescoping we can obtain $$a^{n+1}f(n+1)-f(0)=A\sum_{k=0}^n e^{i\pi k/3}=A\left(\dfrac{1-\omega e^{i\pi n/3}}{1- \omega} \right)$$ where $\omega=e^{i\pi /3}$ is the third root of $-1.$ Here RHS is a periodic function of $n$ with period $6,$ and hence $$f(n)=-\dfrac{1}{27}f(n-6)=\dfrac{(-1)^k}{3^{3k}}f(n-6k)$$ for all $n, k\in \mathbb{N}.$ In particular, for $n=2019, k=336$ we get the desire answer.
A: This is a difference equation. In the case of a linear, constant coefficient difference equation we make the following guess:
$$ f(x) = r^x $$
Then
$$ f(x+1) r\times r^x$$
and
$$ f(x+2) = r^2\times r^x $$
Replacing in the difference equation
$$ r^x = 3\times r\times r^x - 3\times r^2\times r^x $$
Factoring out the $r^x$ and canceling
$$ 1 = 3\times r - 3\times r^2 $$
$$ 3\times r^2 - 3\times r + 1 = 0 $$
The solutions of this quadratic equation are
$$ r_{1,2} = 0.5 \pm \frac{\sqrt{3}}{6}i $$
Replacing in our guess:
$$ f(x)= \left(\sqrt{\frac13}\right)\left[C_1\times \cos(1.51312532 \times t) + C_2\times\sin(1.51312532 \times t) \right]  $$
This is the general solution to the functional equation. However, there are two indeterminate constants and only one condition $f(3)=3^{1000}$ so I think that this method does not work here. Because imposing that condition would not yield the values of $C_1$ and $C_2$. Therefore, I think that the way of solving this is the one that Gareth Ma sketched.
