El VPN es
$$\begin{array}{rl} \mbox{NPV} &= \displaystyle\left(\sum_{k=1}^n \frac{6000}{(1+r)^k}\right) + \frac{2000}{(1+r)^n} - 20000\\ &= \displaystyle\frac{6000}{r} \left(1 - \frac{1}{(1+r)^n}\right) + \frac{2000}{(1+r)^n} - 20000\\ &= \displaystyle\left(\frac{6000}{r} - 20000 \right) + \left( 2000 - \frac{6000}{r}\right) \frac{1}{(1+r)^n} \end{array}$$
Let $n=4$ and let us try to find for which $r$ the $\mbox{NPV}$ is zero. Using SymPy:
>>> r = Symbol('r', real=True, positive=True)
>>> NPV = (6000/r - 20000) + (2000 - 6000/r)*(1/(1+r)**4)
>>> NPV
6000
2000 - ----
r 6000
----------- - 20000 + ----
4 r
(r + 1)
>>> solve(NPV)
____________________________________________________________________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________________________________________________________________
/ ________________________ / ________________________ / ________________________ / ________________________
/ / __________ / / __________ / / __________ / / __________
/ 2787 / 259 \/ 60325113 89 83 / 2787 / 259 \/ 60325113 89 83 / / 259 \/ 60325113 89 83 2787 / / 259 \/ 60325113 89 83 2787
/ - -------------------------------------------------------------------------------------------- - 2*3 / - ----- + ------------ + --- + --------------------------------- / - -------------------------------------------------------------------------------------------- - 2*3 / - ----- + ------------ + --- + --------------------------------- / - 2*3 / - ----- + ------------ + --- + --------------------------------- + -------------------------------------------------------------------------------------------- / - 2*3 / - ----- + ------------ + --- + --------------------------------- + --------------------------------------------------------------------------------------------
_____________________________________________________________________________ / _____________________________________________________________________________ \/ 16000 144000 200 ________________________ _____________________________________________________________________________ / _____________________________________________________________________________ \/ 16000 144000 200 ________________________ _____________________________________________________________________________ / \/ 16000 144000 200 ________________________ _____________________________________________________________________________ / \/ 16000 144000 200 ________________________ _____________________________________________________________________________ _____________________________________________________________________________
/ ________________________ / / ________________________ / __________ / ________________________ / / ________________________ / __________ / ________________________ / / __________ / ________________________ / / __________ / ________________________ / ________________________
/ / __________ / / / __________ / 259 \/ 60325113 / / __________ / / / __________ / 259 \/ 60325113 / / __________ / / 259 \/ 60325113 / / __________ / / 259 \/ 60325113 / / __________ / / __________
/ 83 89 / 259 \/ 60325113 / / 83 89 / 259 \/ 60325113 300*3 / - ----- + ------------ / 83 89 / 259 \/ 60325113 / / 83 89 / 259 \/ 60325113 300*3 / - ----- + ------------ / 83 89 / 259 \/ 60325113 / 300*3 / - ----- + ------------ / 83 89 / 259 \/ 60325113 / 300*3 / - ----- + ------------ / 83 89 / 259 \/ 60325113 / 83 89 / 259 \/ 60325113
/ - --------------------------------- + --- + 2*3 / - ----- + ------------ / 4000* / - --------------------------------- + --- + 2*3 / - ----- + ------------ \/ 16000 144000 / - --------------------------------- + --- + 2*3 / - ----- + ------------ / 4000* / - --------------------------------- + --- + 2*3 / - ----- + ------------ \/ 16000 144000 / - --------------------------------- + --- + 2*3 / - ----- + ------------ / \/ 16000 144000 4000* / - --------------------------------- + --- + 2*3 / - ----- + ------------ / \/ 16000 144000 4000* / - --------------------------------- + --- + 2*3 / - ----- + ------------ / - --------------------------------- + --- + 2*3 / - ----- + ------------
/ ________________________ 400 \/ 16000 144000 / / ________________________ 400 \/ 16000 144000 / ________________________ 400 \/ 16000 144000 / / ________________________ 400 \/ 16000 144000 / ________________________ 400 \/ 16000 144000 / / ________________________ 400 \/ 16000 144000 / / ________________________ 400 \/ 16000 144000 / ________________________ 400 \/ 16000 144000
/ / __________ / / / __________ / / __________ / / / __________ / / __________ / / / __________ / / / __________ / / __________
/ / 259 \/ 60325113 / / / 259 \/ 60325113 / / 259 \/ 60325113 / / / 259 \/ 60325113 / / 259 \/ 60325113 / / / 259 \/ 60325113 / / / 259 \/ 60325113 / / 259 \/ 60325113
/ 300*3 / - ----- + ------------ / / 300*3 / - ----- + ------------ / 300*3 / - ----- + ------------ / / 300*3 / - ----- + ------------ / 300*3 / - ----- + ------------ / / 300*3 / - ----- + ------------ / / 300*3 / - ----- + ------------ / 300*3 / - ----- + ------------
37 \/ \/ 16000 144000 \/ \/ \/ 16000 144000 37 \/ \/ 16000 144000 \/ \/ \/ 16000 144000 37 \/ \/ 16000 144000 \/ \/ \/ 16000 144000 37 \/ \/ \/ 16000 144000 \/ \/ 16000 144000
[- -- - --------------------------------------------------------------------------------------- - -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------, - -- - --------------------------------------------------------------------------------------- + -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------, - -- + --------------------------------------------------------------------------------------- + -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------, - -- - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + ---------------------------------------------------------------------------------------]
40 2 2 40 2 2 40 2 2 40 2 2
>>> solutions = solve(NPV)
>>> solutionsinlatex = [latex(solutions[i]) for i in range(4)]
The first solution is
$$- \frac{37}{40} - \frac{1}{2} \sqrt{- \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{89}{400} + 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} - \frac{1}{2} \sqrt{- \frac{2787}{4000 \sqrt{- \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{89}{400} + 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}}} - 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}} + \frac{89}{200} + \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}}}$$
The second solution is
$$- \frac{37}{40} - \frac{1}{2} \sqrt{- \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{89}{400} + 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{1}{2} \sqrt{- \frac{2787}{4000 \sqrt{- \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{89}{400} + 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}}} - 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}} + \frac{89}{200} + \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}}}$$
The third solution is
$$- \frac{37}{40} + \frac{1}{2} \sqrt{- \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{89}{400} + 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{1}{2} \sqrt{- 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}} + \frac{89}{200} + \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{2787}{4000 \sqrt{- \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{89}{400} + 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}}}}$$
The fourth solution is
$$- \frac{37}{40} - \frac{1}{2} \sqrt{- 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}} + \frac{89}{200} + \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{2787}{4000 \sqrt{- \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{89}{400} + 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}}}} + \frac{1}{2} \sqrt{- \frac{83}{300 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}} + \frac{89}{400} + 2 \sqrt[3]{- \frac{259}{16000} + \frac{\sqrt{60325113}}{144000}}}$$
Of these $4$ solutions, one is positive, one is negative, and two form a complex conjugate pair. The positive solution can be found numerically:
>>> nsolve(NPV,r,0.07)
0.108478871693288
Hence, $r \approx 11\ % $.