It’s unfortunate that this guide must exist, but Math Stack Exchange is going through a mild upheaval right now that new users who want to post a question should be aware of. Prominent members of the MathSE community disagree over what is and is not an acceptable post on the site. Check out this post if you want to get deeper into the drama. To make a long story short though, some users are making a concentrated effort to close and delete thoughtless posts on the site. These are posts where the poster includes only the statement of the question, problem, or exercise they want answered, and nothing more. The intention is basically to discourage users from posting homework questions that they don’t want to think about themselves, but sometimes a legitimately interesting question will be targeted just because the post contained only a problem statement. So how can you avoid having these folks in the MathSE community descend upon your question with the intent to close it? Just provide some context in your post.
When posting a question to MathSE, the most important thing is to provide context. See this answer on MathSE for details of what is meant by context, but the idea that an exercise or question is not interesting in its own right, and you need to provide some background or a reason for the question. Like, where did you come across the problem? What have you tried yourself to answer it? Are there any relevant details that a user might find helpful when answering your question, like certain definitions or a theorem you suspect will be useful? Context is information that will serve to orient a future reader when they read a post.
One more thoughtful thing you should do before posting a question is to make a strong effort to see if your question has already been asked on the site. Users of MathSE don’t want to be answering the same questions over and over. It’s a big site though, so you may not find your question even if it is there. But all you can do is give it your best shot. The site’s main search feature kinda sucks though. Usually if you go to the ask a question page and begin typing out your question, the site suggests some similar questions and you may find your question among those. Or you can try using Approach0, a math-aware search engine that handles LaTeX markup well, if the thing you’re searching for has a bunch of formatted math in it, like a summation or a difficult integral.
On the page to ask a question notice there is a small checkbox at the bottom that allows you to immediately answer your own question. The (original) general purpose of Stack Exchange is to create a large repository of good questions and their answers for people to reference; the fact that this allows a confused person to ask a question and get help is just a nice bonus. So posting your own question and answer is strictly encouraged on Stack Exchange.
Some users are unaware that this is encouraged though, and may still descend upon your self-answered question if there is no context included in the post. Luckily, the sorts of context you can include in this case is obvious. Something like one of these:
This is just exercise NUMBER from chapter NUMBER in BOOK that I wanted to have a solution to typed up online. The purpose of this exercise it to point out the general fact that INSERT-GENERAL-FACT-HERE. Maybe reading the answer will help future students studying SUBJECT.
This is an exercise that appears on SUBJECT exams at my university. I’m typing up a thorough response to this exercise here to share with my class since they are really struggling with questions like this, and maybe it’ll help other students too.
Here’s a nifty puzzle I came up with. I’ll post my solution in a bit, but I’m curious how other users of this site may go about answering this question.
And then you can see here and here and here for examples where I’ve done this myself on MathSE.