I'm having problem coming up with a way to express the recursive(compound?) nature of the inflation. Monthly the payment \$38.19 is decreasing in "today's month" value but just how much its decreasing is not linear so I'm looking for help for an equation to describe this relation.
For example: If little Jeff wants to buy a house for \$10000 dollars and he borrows \$8000 from the bank, with annual interest rate at 4.00%. say the term of this loan is 30 years and his monthly payment is \$38.19 and supposedly after 360 payments(30 years) he would had paid \$13,749.56. But how much does the loan really cost him in today money if we assume a consistent annual inflation rate of 3%. *Please note that since payment is made monthly so annual inflation rate need to be used monthly also, 3% will translate to .25%.
If we let $f(t)$ be the value of a dollar $t$ months from now (in today's dollars), and $P(t)$ be the payment amount in that same month (this allows for variable payments) then for a given month $t$, the amount in today's dollars is $(f\cdot P)(t)=f(t)P(t)$. Thus, the total value in today's dollars of the first n payments will be $$\sum_{i=1}^n f(i)P(i).$$