Example 2 A rental company owns 100 cars. When the monthly rent for each car is 3000 yuan, all can be rented out. When the monthly rent for each car increases by 50 yuan, the number of unrented cars will increase by one. The maintenance cost for each rented car is 150 yuan per month, and the maintenance cost for each unrented car is 50 yuan per month. Question: At what monthly rent per car will the rental company's monthly profit be maximized? What is the maximum monthly profit?
Let the monthly rent of each car be increased by $50n$ yuan ($n$ is a non-negative integer) compared to 3000 yuan, then the company's monthly income $y$ is
$$
\begin{aligned}
y & =(100-n)(3000+50 n)-150(100-n)-50 n \\
& =-50(n-21)^{2}+307050,
\end{aligned}
$$

When $n=21$, $y$ reaches its maximum value, so when the monthly rent is set to 4050 yuan, the company achieves the maximum monthly income of 307050 yuan.