Question
You buy a $35,000 vehicle for nothing down at $8,500 per year for 7 years. Use the bisect function (given) to determine the interest rate
You buy a $35,000 vehicle for nothing down at $8,500 per year for 7 years. Use the bisect function (given) to determine the interest rate that you are paying. Use initial guesses for the interest rate of 0.01 and 0.3 and a stopping criterion of 0.00005. The formula relating present worth P, annual payments A, number of years n, and interest rate i is
A = P*(i(1+i)^n)/((1+i)n 1)
Remember, this is a root finding method, you need to have a function that is set equal to zero.
Go ahead and plot the function to be sure that intial guesses properly bracket the root.
Also, be sure to use function handle notation for the input function. As an example, if I want to find the root of x^2=52: first set equal to zero, x^2-52=0, and then to save as a function handle, f=@(x) x^2-52.
*This is what I've gotten so far. But I keep getting errors:
clear, clc, clf, format short gP=35000; A=8500; n=7; f=@(irate)P*irate.*(1+irate).^n./((1+irate).^n-1)-A; iplot=linespace(0.01,.2);fplot=f(iplot); plot(iplot,fplot),grid[xr,fx,ea,iter]=bisect(f,0.01,.3,0.00005)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started