### Derivative of a recurrence equation

Given:

```
var('β α γ t R')
```~~ ~~c = function('c')
~~ ~~g = function('g')
~~ ~~f = ~~function('f')
~~function('f')
λ = function('λ')

~~Suppose ~~suppose I define a function as

```
def U(l):
eq = 0
for i in
```~~range(0,l):
~~range(l):
eq += (β^i)*(((c(t+i)+α*g(t+i))^(1-R))/(1-R))
~~ ~~ return eq

How do I take the first order derivative ~~w.r.t C_t C_t+1 ~~w.r.t. `C_t`

`C_t+1`

and so ~~forth? ~~forth?

I tried:

~~ ~~n = ~~2
~~2
L = ~~U(n)
~~U(n)
L.derivative(c(t))

~~Without ~~without any luck.