Solving a functional equation with derivatives? Am I doing this correctly?
Given
\begin{align}
f(x) = \frac{x^n}{1+x^n} - kf(x-1)
\end{align}
, then evaluating its the derivative
\begin{align}
\frac{df}{dx}=\frac{nx^{n-1}}{(1+x^n)^2}-k\frac{df}{dx}(x-1).
\end{align}
Let $t=x-1$ so $x=t+1$ and $dx=dt$. Thus,
\begin{align}
\frac{df}{dt} &= \frac{n(t+1)^{n-1}}{(1+(t+1)^n)^2} - k\frac{df}{dt}\\
\Leftrightarrow (k+1)\frac{df}{dt} &= \frac{n(t+1)^{n-1}}{(1+(t+1)^n)^2}\\
\Leftrightarrow \frac{df}{dt} &= \biggl(\frac{n}{k+1}\biggr)\frac{(t+1)^{n-1}}{(1+(t+1)^n)^2} \\
\Leftrightarrow \frac{df}{dt} &= \biggl(\frac{n}{k+1}\biggr)\frac{(x)^{n-1}}{(1+(x)^n)^2}\\
&= \biggl(\frac{1}{k+1}\biggr)\frac{nx^{n-1}}{(1+x^n)^2}\\
\Leftrightarrow f(x) &= \biggl(\frac{1}{k+1}\biggr)\frac{x^n}{1+x^n}
\end{align}
EDIT
As pointed out in the comments. My solution is incorrect. Can anyone please help me solve this?

Formally a solution is given by
$$
f_0(x) = \sum_{j = 0}^\infty (-k)^j\frac{(x-j)^n}{1+(x-j)^n}
$$
One can expect convergence if $|k| < 1$. Mathematica can evaluate this for certain choices of $k$ and $n$. For example, if $k = 1/2, \, n = 2$, then
$$
f_0(x) = \frac{1}{6} \left(4+3 i \left(-\frac{1}{2}\right)^{x-i}
   \left(\left(-\frac{1}{2}\right)^{2 i}
   B_{-\frac{1}{2}}(-x-i,0)-B_{-\frac{1}{2}}(i-x,0)\right)\right)
$$
where $B$ is the Beta function. For $n = 1$, we obtain
$$
f_0(x) = \left(-k\right){}^{x+1} B_{-k}(-x,-1)-x \Phi
   \left(-k,1,-x-1\right)
$$
where $\Phi$ is the Lerch transcendent.
In other cases, the answer may be expressed in terms of hypergeometric functions.
