Applications of the maximum principle to a variety of problems involving elliptic and parabolic equations