Principles of Intermediate Algebra with Applications