Solving a recurrence relation with a definite integral?

339 Views Asked by At

In my attempt to derive an equation for the population of Minecraft cows in a farm given some number of 5 minute periods, n; I'll spare the game mechanics at play. I came up with the following recurrence relation:

$$T(n) = 1.5\int_0^{n-4} T(x) \, dx,\space\space\forall n \ge 4$$ $$T(n) = 2,\space\space0\le n\lt 4$$

Has a similar problem been observed before, with a potentially infinite depth recursive integral? I haven't seen it in any of my classes (Computer Science major). Google yielded nothing relevant, however I might be missing some crucial vocabulary here.

My best thoughts on solving it would be doing a guess and proving it with strong induction, as was my intention going into crafting this equation, but I'm curious if there is a better way. Any relevant knowledge, vocabulary, or pointers are appreciated.

Some work towards a guess:

Result bounds by problem definition: $$1.5^{n/4}\le T(n)\le 1.5^n$$

which is to say (greedily):

$$1.1^n\le T(n)\le 1.5^n$$

as there is more than a 50% increase every 20 minutes (4 counts of 5 minutes), and less than a 50% increase every 5 minutes. Intuitively, the base is probably some irrational number between 1 and 1.5, potentially a non-constant base derived from n, with an exponent of n. I believe it is an error to think that 4x 50% increases is a 200% increase in this case, as the number of grown cows (i.e. T(n)) changes every 5 minutes, not every 20. As such, the exponent should be n.

I do imagine an exponential solution, as the growth is experimentally and intuitively, a delayed exponential growth. This imposed limit comes from examining if cows grew at a rate of 50% every 5 minutes for the best case as opposed to 50% every 20 minutes for the worst case. In reality, every 5 minutes, the amount of cows grown up changes due to maturation delay. Due to this delay, we cannot reach the ideal of a base of 1.5, but similarly, because we are not as inefficient to only breed the cows every 20 minutes instead of 5 minutes (the ideal), $\sqrt[4] 1.5$ = ~1.1 as a base is also not attained.

This intuitively confirms the likelihood of some irrational answer, but doesn't point me to any exact guesses, yet.

3

There are 3 best solutions below

2
On BEST ANSWER

I just figured out that what I found is probably an extraneous solution, since substituting the solution back into the integral yields $c_2=0$ or $T_0=0$ (the trivial solution). As vadim123 pointed out in his comment to the OP, maybe there is something wrong with the equation.


It's a particular case of the Volterra integral equation of the second kind. Let's write the problem as $$ T(n) = a \int_0^{n-k}T(x)\ dx, \ \ \ T(k) = T_0. $$ Differentiating both sides i.r.t. $n$ (the Leibniz integral rule can be helpful) one has $$ T'(n) = a T(n-k), $$ which is a simple delay differential equation. Using $T=c_1 \exp (c_2 n)$ yields $$ c_1 c_2 \exp (c_2 n) = a c_1 \exp(-c_2 k) \exp (c_2 n), $$ showing that $c_2$ must satisfy the transcedental relation $$ c_2 = a \exp(-c_2 k), $$ leading to $$ c_2= \frac{W(a k)}{k}, $$ in which $W$ is the Lambert $W$ function. From the initial condition one has $$ c_1 = T_0\exp(-c_2 k) $$ and, therefore, $$ T(n) = T_0 \exp \left( c_2 (n-k)\right), \ \ n\ge k. $$

The following graph depicts the solution for the case with $a=1.5$, $k=4$ and $T_0 = 2$. enter image description here

0
On

If you just want to compute $T(n)$ for integer $n \ge 4$, you may just compute a sum (you can think of it as applying the trapezoidal rule). I you make the current value $T(n)$ depend only on the previous 5 values of $T$ and keep the structure of your formula, you would get something like

$$ T_n = \frac 32 \times \frac{1}{2} \left(T_{n-5} + 2 T_{n-4}+2T_{n-3}+2 T_{n-2}+T_{n-1} \right) $$

If you solve this difference equation you'll see that it has an exponential growth, slightly affected by oscillations of smaller magnitude (the characteristic polynomial has two pairs of complex roots).

0
On

$$ t_n = \alpha\sum_{k=4}^{n-4}t_k\\ t_{n-1} = \alpha\sum_{k=4}^{n-5}t_k $$

then

$$ t_n-t_{n-1} = \alpha t_{n-4} $$

so considering $\{r_k, k=1,\cdots,4\}$ the roots of $\gamma^4-\gamma^3-\alpha = 0$ we have

$$ t_n = \sum_{k=1}^4C_k r_k^n $$

with $\{C_k, k=1,\cdots,4\}$ constants depending on the boundary conditions.