Explicit form of recursive function representing marginal cost

24 Views Asked by At

I am selling a printing service and I would like to charge marginally less for an additional print compared with the average cost of each print given the current quantity. My recursive rule representing the total charge for X+1 given X is therefore:

$$f(x+1) = \left(\frac{f(x)}{x}\times d\right) + f(x)$$ $$f(0) = 0; f(1) = C$$ $${d \; \epsilon \; \mathbb{R}\; | \;0<d<1}$$

My WooCommerce site won't let me use a recursive rule so I was wondering if there is an explicit approximation of this?

Thanks!

1

There are 1 best solutions below

3
On BEST ANSWER

No need for an approximation. Note that our recursion can be restated as $$f(x+1)=\left(\frac{d}x+1\right)f(x)$$ Hence, by applying this formula $x$ times, we have that (for $x\ge0$) $$\begin{align} f(x+1) &=C\cdot\prod_{k=1}^x\left(\frac{d}k+1\right)\\ &=C\cdot\prod_{k=1}^x\left(\frac{d+k}k\right)\\ &=C\cdot\frac{(d+x)(d+x-1)\cdots(d+1)}{x!}\\ &=C\binom{d+x}{x}\\ \end{align}$$ Hence we have the closed form $$f(x)=\begin{cases}C\binom{d+x-1}{x-1}&x\ge1\\0&x=0\end{cases}$$