Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I was trying to answer a programming challenge about interest, and my first thought was to model the situation using a single recurrence:

principal = (principal - payment) * interest_rate;

The question actually involved finding a payment amount that would produce an exact term... but on my way to figuring that out I was playing with the components of the equation to find clues.

First, I thought that

principal = principal - payment;

Would be a linear equation of the form

y = x - a;

Which I picture as a straight line offset from the y-axis by a units.

Next, I thought that

principal = principal * interest_rate;

Would be a linear equation of the form

y = x * a;

Which I picture as a straight line with slope a.

Now, my question is -- if the interest equation is composed of these linear sub-parts, how do these sub-parts combine to form a non-linear equation? Did I do the modeling wrong? I am a little worried I am confusing linear equations and recurrence relations.

share|improve this question
2  
You are correct that the recurrence relation for interest is composed of multiplication by a constant and addition/subtraction with a constant, which leads to a linear recurrence relation. However, a linear recurrence relation $a_{n+1}=ka_n+c$ with $k\neq 1,0$ leads to an exponential explicit formula. –  Isaac May 9 '11 at 15:46
1  
if the rate of change of a quantity is proportional to the quantity, you get exponential behaviour –  yoyo May 9 '11 at 16:07
add comment

1 Answer 1

up vote 5 down vote accepted

I think your confusion comes from thinking of the recurrence relation as if it were relating the $y$-value with the $x$-value. It is true that an equation of the form $$y = 2x,$$ for example, would lead to a straight line. But a recurrence relation is not relating a $y$-value (the vertical position) with the corresponding $x$-value (horizontal position). Instead, it relates a $y$-value with another $y$-value: $$y(t+1) = 2y(t),$$ (the value at time $t+1$ is twice the value at $t$). You are not graphing $y(t+1)$ vs. $y(t)$ (which would result in a straight line); you are graphing $y$ vs. $t$. The recurrence relation does not express the dependent variable in terms of the independent variable, it relates one value of the dependent variable to another value of the dependent variable.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.