Yield of 2 investments For an initial investment of  $1000$, investment A pays $100$ every year for $10$ years, starting from the end of year 1, plus a bonus maturity payout of $1000$ (i.e you receive a  total of  $1100$ at the end of the tenth year), while investment for B pays you $80$ every year for $10$ years, starting from the end of year $1$, plus bonus maturity payout of $1220$. On the basis of yield, which of the 2 investments is preferable.
Yield for A should be
$-1000 + \sum_{n=1}^{10}\frac{100}{(1+i)^{10}} +\frac{1000}{(1+i)}$
Yield for B should be
$-1000 + \sum_{n=1}^{10}\frac{80}{(1+i)^{10}} +\frac{1220}{(1+i)}$
A hinnt is given in the question to use Newton Raphson, but I do not knw where to start.
 A: Here is how to go about doing it
Let d be the discount factor defined as $d_1 = \frac{1}{1+i_1}$ for the first investment and $d_2=\frac{1}{1+i_2}$.
Now you formulas are almost right except the last term.
Now $f(i_1) = -1000+ 100(d_1 + d_1^2 + d_1^3+\cdots d_1^{10}) + 1000.d_1^{10}$
Now $f'(i_1) = -100(1+2d_1+3d_1^2+\cdots 10d_1^9)-1000\times 10.d_1^{9}$
Similarly$ g(i_2) =-1000+ 80(d_2 + d_2^2 + d_2^3+\cdots d_2^{10}) + 1220.d_2^{10}$
and $g'(i_2) = -80(1+2d_2+3d_2^2+\cdots 10d_2^9)-1220\times 10.d_2^{9}$
Start with the initial guess of a good yield, let us say $i_1^{0}= i_2^{0} = 0.05$
Compute $f(i_1^{0}),f'(i_1^{0}),g(i_2^{0}),g'(i_2^{0})$ subscript denotes the yield for investment 1 or 2 and the super script denotes the 0th guess for both the yeilds
Now compute 
$i_1^{1} = i_1^{0} - \frac{f(i_1^{0})}{f'(i_1^{0})}$
$i_2^{1} = i_2^{0} - \frac{g(i_2^{0})}{g'(i_2^{0})}$
Keep doing until $i_1$ and $i_2$ converge to a reasonable error of  0.0001.
$i_1^{n},i_2^{n}$ will be the yields to compare.
From the image below, you get $i_1 = 10$% and $i_2 = 9.4193$%.  I will leave you to decide which one is better.

A: The investment for A is given as
$0=-1000 +10[\frac{1-(1+i)^{-10}}{i}]+1000(1+i)^{-10}$
Letting $(1+i)^{-1}=x$ and simplifying
$f(x)=-1000(1-x)+100x(1-x^{10})+1000x^{10}(1-x)=0$
$f(x)=11x^{11}-10{x^{10}}-11x+10$;
$f'(x)=121 x^{10}-100x^{9}-11$
By Newton Raphson, we get $i=0.10$
Similar approach for B.
$f(x)=65x^{11}-61x^{10}-54x+50$
$f'(x)=715x^{10}-610x^9-54$. 
After $5$ iterations, I got $i=0.098$
