General comments
I will first share my point of view about this particular bit:
I'm trying to learn, and while the topic may seem rudimentary (a) we all start somewhere and (b) all I get told is that I'm using the wrong formula without any further explanation. How is an environment like this conducive to learning physics?
(a) At least in my opinion, Physics SE tends to be quite aware that we all start somewhere. Most people on the site will tend to know or be interested in something about Newtonian Mechanics, but only a handful will be discussing a given very specific research topic, for example. From my point of view, most of the questions and answers in this site are exactly to help people that are starting from somewhere.
(b) While Physics SE is a website for asking Physics questions, not all questions belong here. For example, some questions are way more adequate to Mathematics SE, although they might relate to Physics in some way. For many reasons, the community of Physics SE has decided some questions are not suited to this site.
From the point of view of someone who's asking, this is usually a bummer. Fairly often I'm stuck on a problem and want to ask something here, but I know the question will get closed due to being homework-like. This is definitely quite frustrating, and I've seen many people complaining about this both on the site and in real life, when chatting with friends of mine who come in here now and then.
However, it is important to consider that this site works based on other people voluntarily answering questions for free (or for internet points hahaha). As I started staying around for a little longer and taking the time to answer other people's questions, I started noticing that I was also naturally complaining about some questions. For example, from the point of view of an answerer, it is a bummer when
- equations are written on MS Paint instead of MathJax, making them difficult to read
- questions that just want you to solve their homework for them
- questions that are asking lots of different stuff in the same post and you can't answer because you only know how to address one or two points
and so on. These sorts of behavior need to be discouraged by the site to avoid it from spreading. The issue if these sorts of things become too common is that you'll eventually learn users no longer want to answer questions, and the premise of the website ends. Very often, edits are enough to correct the question and put it to a good standard. Whenever I have the time, I convert equations and texts posted as images to MathJax and leave a heads up for the author so they correct it next time. Closing a question that lacks focus has the author focus on what they are interested and perhaps separating the questions into a few more, so they become manageable.
Your question in particular doesn't have the issues I mentioned, but it does have some characteristics that do not match the site's style. In my point of view, an issue with "What did I do wrong?" is that while your question is particularly short, many aren't, and actually expect answerers to read paragraphs of calculations to find a mistake somewhere. If the site ever gets too filled with these sorts of questions, people will just stop answering. Furthermore, "Where is my mistake?" is a question that applies only to you, not to a broader community. Hence, from the point of the view of other users, these sorts of question are hardly useful. They are too specific to be found through search engines and you'll hardly end up in them to understand why this particular method works or not.
How to improve this question in particular?
My main suggestion is to get rid of "What did I do wrong?". Using Griffith's question as an example is not an issue (textbook questions are very often good starting points for deeper questions), but asking what you did wrong is sort of a red flag. As you mentioned in your post, you are confident that you did the integration right and checked it. Hence, you don't really need the details of the computation in there, nor do you need people to check what you did wrong. You already noticed that the problem seems to be in your expression of Coulomb's law (which is indeed wrong, as pointed out by the answer). Hence, isolate what you are actually concerned with and leave the details of the solution to the problem out of the question.
A structure for the question (I absolutely expect you will not copy this verbatim) could then be
I'm attempting at solving Griffiths Problem 2.14, which is [text]. I know how to do it with Gauss's Law, but when I tried using the fact that the electric field is given by [expression] I got a different answer, which led me to wonder whether that expression holds in every situation. What are the limits of applicability of this equation?
Notice this question has the following different features:
- doesn't provide complete solutions to lazy people that might lurk on the site later;
- the focus is no longer on checking your computations, but rather answering a conceptual question.
Of course, not everyone on the site might agree that this reformulation is adequate. Each person has a different interpretation of the site's rules and it is overall built as a community effort. In my particular understandment, this formulation would be more adequate (and it would allow for fairly interesting answers on how Coulomb's law gets adapted in Electrodynamics, for example).