<p>It is not possible to delete an answer that is accepted. So this is not an option.</p>

<p>Next, I would argue that the priority should be not to confuse future readers. This means that the correct answer should be seen <em>first</em> and not after the wrong answer. This means that posting a new answer is a bad option.</p>

<p><strong>This leaves only one option: edit the existing answer.</strong> I would suggest the following rules to alleviate potential shortcomings:</p>

<ol>
<li><p>Put a short disclaimer in the beginning, something along the lines of 
"This answer as originally posted was wrong. I have provided the correct solution in Jan 2018." (Maybe in bold or in italics).</p></li>
<li><p>Then post the NEW answer. Otherwise the readers will have "to trudge through a wrong explanation before they get to the correct one" which is exactly what you don't want.</p></li>
<li><p>Then, if space allows, you can put a horizontal bar, make a title <code># The original (wrong!) answer</code> and leave your original answer below. If space does not allow, cut it out. Anybody will be able to look in the edit history to see your original answer.</p></li>
</ol>

<p>PS., If the OP is still active, I would leave a comment under the question to notify them that the answer has substantially changed. Otherwise they might never notice.</p>
