I want transform this recurrence relation into the closed formula, but i am stuck in some place, please provide some hints or steps to help me.
The recurrence relation are $$ C_{n} = C_{n-1} + (\frac{t - C_{n-1}}{x} )$$ and $$C_{0} =c$$
Therefore, if n is larger than 0 $$C_{n} =c + \sum_{i=1}^{n} (\frac{t - C_{i-1}}{x} )$$ $$c + \frac{1}{x}\sum_{i=1}^{n}(t-C_{i-1})$$ $$c + \frac{1}{x}(\sum_{i=1}^{n}t-\sum_{i=1}^{n}C_{i-1})$$
But how can i duel with $$C_{i-1}$$ It is just repeating
Thanks
Note that you can write your recursion as $C_n=C_{n-1}(1-\frac{1}{x})+\frac{t}{x}$. The general method to solve the recursions of the form $a_{n}=b\cdot a_{n-1}+d$ where $b,d$ are constants is as follows: $$a_{n}=ba_{n-1}+d \implies \frac{a_n}{b^n}=\frac{a_{n-1}}{b^{n-1}}+\frac{d}{b^{n}} \implies \frac{a_n}{b^n}-\frac{a_{n-1}}{b^{n-1}}=\frac{d}{b^{n}} $$ Summing up from $n=1$ to $N$, we get $$\frac{a_{N}}{b^N}=a_{0}+d\cdot \sum_{n=1}^{N} \frac{1}{b^{n}}=a_{0}+d\cdot \frac{1-(1/b)^N}{b-1} \implies a_{N}=b^Na_{0}+d\left(\frac{b^N-1}{b-1}\right)$$ which gives the general solution to this type of recursions. You can do the same for your recursion as well.