I am working on a Java project where I have implemented an interest rate solver using the Newton and Secant methods.
The TVM formula and associated use of solver methods have been tested and proofed.
I would like to graph the TVM equation which takes financial variables and solves to zero.
The participles of the TVM formula mapped to variables are:
a = PV (present value)
b = PMT (annuity payment)
c = FV (future value)
d = Begin/End period calculation of interest
x = i/100 where i is the interest rate expressed as a percentage
The TVM formula is:
f(x) = a+(1+x*d)*b*((1-(1+x)^-n)/x)+c*(1+x)^-n
where f(x) with the correct value of x will solve to 0
I would like to graph this to see the root or roots of the function.
Normally there is a single root (in x) which is the interest rate solution.
Sometimes there can be a double root, and this is what I would like to be able to see.
This is a complex function and I am not sure how to graph it in this perspective.
I would like to see where double roots tend to form so I can generate a seed value of i for the Newton/Secant solvers.
Any suggestions on how I can roughly determine a second root through the application of a formula would be most welcome.
I appreciate any help, thanks, matt