## ganeshie8 one year ago The starting population of a certain kind of migratory birds in a forest is $$10000$$. $$3\%$$ of the population die each year. Reproduction rate is $$4\%$$ per year and $$500$$ birds immigrate to the forest each year. Estimate the population of birds at the end of $$30$$ th year

1. anonymous

let $$P(n)$$ denote the population after $$n$$ years. we're given that $$P(0)=10000$$ and the recurrence relation $$P(n)=0.04P(n-1)-0.03P(n-1)+500\\P(n)=0.01P(n-1)+500$$

2. anonymous

so $$P(n)-0.01P(n-1)=500$$ignoring our initial condition, a constant particular solution $$P(n)=k$$ gives $$k-0.01k=500\implies 0.99k=500\implies k=500/0.99=\frac{50000}{99}$$

3. ganeshie8

Ahh that looks much better than what im doing.. i ended up with a geometric series after writing out the first few terms

4. anonymous

now consider the homogeneous recurrence relation $$P(n)-0.01P(n-1)=0$$suppose that we had a geometric sequence $$P(n)=r^n$$ which gives $$r^n-0.01r^{n-1}=0\\r^{n-1}\left(r-0.01\right)=0\implies r=0.01$$ so our homogeneous solution looks like $$P(n)=C(0.01)^n$$ and thus the general solution to our original recurrence is $$P(n)=C(0.01)^n+\frac{50000}{99}$$

5. anonymous

now we want to solve for $$C$$ using our initial condition: $$P(0)=10000\\C(0.01)^0+\frac{50000}{99}=10000\\C=10000(1-5/99)\approx 9494.95$$

6. anonymous

oops, I messed up the recurrence -- it should've actually read

7. ganeshie8

$$P(n)=C(1.01)^n+\frac{50000}{99}$$ ?

8. anonymous

$$P(n)=P(n-1)+0.04P(n-1)-0.03P(n-1)+500\\P(n)=1.01P(n-1)+500$$ in which case we'd get $$r=1.01$$ and our particular solution would be different as well

9. ganeshie8

Ohk gotcha!

10. anonymous

$$k=1.01k+500\\-0.01k=500\\C=-50000$$ so the general solution is $$P(n)=C(1.01)^n-50000$$

11. dan815

|dw:1437282863276:dw|

12. dan815

would that work?

13. anonymous

now applying our initial condition: $$10000=C(1.01)^0-50000\\60000=C$$ so our model is $$P(n)=60000(1.01)^n-50000$$

14. anonymous

now we plug in $$n=30$$ so $$P(30)\approx 30870.93$$

15. anonymous

in general, the theory of linear recurrence relations with constant coefficients $$x_n+c_1x_{n-1}+c_2x_{n-2}+\dots+c_{n-1}=g(n)$$ mirrors that of hte analogous differential equations in that we can first find a particular solution and also investigate the general homogeneous solution of the homogeneous case $$g=0$$ using the ansatz $$x_n=r^n$$

16. anonymous

the method of undetermined coefficients works here, too, only with slightly different 'rules' since we're no longer dealing with differentiation, and even variation of parameters carries over :-)

17. dan815

wolfram gives 30,991.5, with DE method http://www.wolframalpha.com/input/?i=da%2Fdt%3D0.01*a%2B500%2C+a%280%29%3D10000%2C+t%3D30

18. anonymous

yep, @dan815 your approach will overshoot since this is essentially the same as dealing with continuous compounding

19. ganeshie8

I see what you're doing to get a particular solution, but I'm not so sure why making the function a constant, $$P(n)=k$$ is working

20. dan815

yeah i think

21. anonymous

@ganeshie8 we pick a constant because we want $$P(n)-1.01P(n-1)$$ to be a constant; if there were non-constant terms then they would not be entirely annihilated -- consider $$P(n)=An+B$$ which gives $$An+B-1.01(A(n-1)+B)=-0.01An+(1.01A-0.01B)$$

22. anonymous

we'd want $$-0.01An$$ to be identically zero, which would make $$A=0$$ so this reduces to a constant solution $$P(n)=B$$. it's the same logic that is used in the method of undetermined coefficients with linear differential equations

23. ganeshie8

so a partiuclar solution need not be a function of independent variable ($$n$$) ? oh nvm i think i get it, we just want "some" particular solution and the constant funciton is good enough i tihnk xD

24. dan815

|dw:1437283645284:dw|

25. anonymous

yeah, the particular solution is just any $$P_p$$ that satisfies the recurrence regardless of initial conditions. its purpose is that we can then consider solutions of the equation in $$P_p+P_c$$; since our equation is linear, this reduces to: $$(P_p+P_c)(n)-1.01(P_p+P_c)(n)=500\$$P_p(n)-1.01P_p(n))+(P_c(n)-1.01P_c(n))=500\\500+(P_c(n)-1.01P_c(n))=500\\\quad\implies P_c(n)-1.01P_c(n)=0so finding *any* particular solution reduces the problem to solving the homogeneous case 26. ganeshie8 yeah i did solve it by expanding like that, i think oldrin's method looks more elegant and general.. 27. dan815 |dw:1437283962537:dw| 28. anonymous it's the same thing in linear algebra with \(Ax=b$$ -- you find a particular solution $$x_p$$ so you can then look at $$x=x_p+x_c$$ so $$Ax=A(x_p+x_c)=Ax_p+Ax_c=b+Ax_c$$ and thus $$b+Ax_c=b\implies Ax_c=0$$; a particular solution is the origin vector that 'steps' us into the affine space of solutions 29. dan815 ah ok 30. anonymous$$P(n)=500+1.01P(n-1)$$is an arithmetico-geometric sequence which permits a very easy trick to solve it:$$P(n)=500+1.01(500+P(n-2))\\\quad\quad=500(1+1.01+\dots+1.01^{k-1})+1.01^kP(n-k)$$so$$P(n)=500\cdot\frac{1.01^n-1}{1.01-1}+1.01^nP(0)$$31. anonymous so then you just $$\dfrac{1.01^n-1}{1.01-1}=100(1.01^n-1)=100\cdot1.01^n-100$$ so$$P(n)=50000\cdot1.01^n-50000+10000\cdot1.01^n=60000\cdot1.01^n-50000