1. Will you close the window?

2. Would you close the window?
3. Can you close the window?
4. Could you close the window?
5. Do you mind closing the window?
6. Can I ask you to close the window?
7. May I ask you to close the window?
8. Could I ask you to close the window?
9. Might I ask you to close the window?
--------------------
Are the sentences all possible?
#9 seems to be the most polite sentence.
What about #5? Is it the second most polite sentence?

All are possible, and all are basically asking the same question.

Yes, #9 along with #s 5 and 7 are the most formal (polite).

Yes, all of the sentences listed are possible ways to ask someone to close the window. As for politeness, it can vary based on cultural norms and personal preferences. In general, #9 "Might I ask you to close the window?" tends to be perceived as more polite because it adds a note of formality. However, #5 "Do you mind closing the window?" can also be considered polite as it asks for permission and takes the other person's preferences into account. Ultimately, politeness can be subjective, so it's important to be considerate of others and choose an appropriate and respectful way to make requests.