# The better way to show the steps of equation solution

Is there any better way to show the steps of equation solution? The following does not look good, IMHO.

\documentclass[preview,border=12pt]{standalone}
\usepackage{mathtools}
\usepackage[a6paper]{geometry}
\begin{document}
\begin{align*}
x^2 &= 25 \\
x^2 &= 5^2      & \text{or}&&       x^2 &= (-5)^2 \\
x   &=5             & \text{or}&&           x   &=-5
\end{align*}
\end{document}


• I would simply write x² = 5² iff x = ±5. Commented Jul 23, 2019 at 12:06

I would write this:

\documentclass{article}
\usepackage{witharrows}
\usepackage{amstext} % for \text
\begin{document}
\begin{DispWithArrows*}[wrap-lines]
x^2 = 25
& \Longleftrightarrow x^2-25 = 0 \\
& \Longleftrightarrow (x-5)(x+5) = 0
\Arrow{a product equals zero iff a factor equals zero} \\
& \Longleftrightarrow x=5 \text{ or } x=-5
\end{DispWithArrows*}
\end{document}


• Is using double arrows per line an internationally accepted notation? Commented Jul 23, 2019 at 13:09
• Yes. It's the international symbol for the logical equivalence. And here, as you want to resolve an equation, you have to do a raisoning by equivalence (in order to have the solutions, all the solutions, only the solutions...) Commented Jul 23, 2019 at 13:17