I know calculus, and I also know that mortgage payments don't follow that formula - or, maybe they do but they're so buried in noise and extra charges and costs you'd never know it.
Financial calculators do integrate, though. "Present value" is computed by integration.
On some things, governments put the cap on how much can early payments be loaded with interest and how much at least should be paying off the base debt — otherwise, you'd be paying only the interest for the first 15 years of a mortgage.
Though, these things work slightly differently in different countries.