[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Help resolving the following equation...
From: |
Allen.Windhorn |
Subject: |
RE: Help resolving the following equation... |
Date: |
Tue, 16 Mar 2010 08:51:56 -0500 |
Julien,
From: Julien Martin [mailto:address@hidden
> I am trying to determine an interest rate by solving the following
> equation:
> fsolve(@(r) 200*(1+r)^(4)+300*(1+r)^(3)+400*(1+r)^(2)
> +500*(1+r)^(1)-1000,0)
> What really puzzles me is that Octave will not give me a solution
> that makes sense: it gives me a negative interest rate!!
> In plain English, the problem is as follows: one invests 1000$ at
> year 1, and receives 200 at year 2, 300 at year 3, 400 at year 4
> and 500 at year 5. I have to find out the interest rate of this
> investment...
Octave is giving the correct answer to the formula. (You can see
that the amounts taken out add up to more than $1000, so you have
to multiply them by something less than one to make it come out.)
Hint: the interest is on the amount put in, not the amount taken
out. Also, the $200 earns interest for one year, not four, etc..
Hope this is helpful.
Regards,
Allen