How can I place several equations side by side inside the gather environment with the line breaking working to avoid this equations to exceed the page size. Here goes one example:
\documentclass[12pt,oneside]{report}
\usepackage{geometry}
\geometry{a4paper,total={170mm,257mm},left=20mm,top=20mm}
\usepackage[utf8]{inputenc}
\usepackage{amssymb, amsmath, amsthm}
\begin{document}
\begin{gather*}
u'(x) = p(x)u(x) \rightarrow
\frac{u'(x)}{u(x)} = p(x) \rightarrow
\int\frac{u'(x)}{u(x)}dx = \int p(x) dx \rightarrow
\ln |u(x)| = \int p(x) dx + k \rightarrow
|u(x)| = e^{\int p(x) dx + k} \rightarrow
|u(x)| = e^{k}e^{\int p(x) dx} \rightarrow
|u(x)| = ke^{\int p(x) dx}
\end{gather*}
\end{document}
Which generates the equation
that extrapolates the page margins.




\\? – David Carlisle Jul 25 '17 at 22:31