As mentioned in the title: I would like to know if there is an elegant way to plot long mathematical expressions in a latex document in a very "coherent" way.
I have no specifically idea what is the best solution for that: so I am just asking for people who are familiar with long equations in a latex document: How do you manage to write it?
For instance : I have these equations :
But you can notice that the expressions are not structured in an homogeneous way: what could you advise?
\documentclass{article}
\usepackage{amsmath}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\newpage
\item \textbf{En $i$}
\begin{align}
h_{i}^{n} = - \color{red}h_{i-1}^{n+1} \color{black} \left(\frac{\Delta t}{(\Delta x)^2} \left(\frac{h_{i}^{n} + h_{i-1}^{n}}{2} \right)^3 \right) &+ \color{red} h_{i}^{n+1} \color{black} \left (1+ \frac{\Delta t}{(\Delta x)^2} \left(\frac{h_{i}^{n} + h_{i-1}^{n}}{2} \right)^3 + \frac{\Delta t}{(\Delta x)^2} \left(\frac{h_{i+1}^{n} + h_{i}^{n}}{2} \right)^3 \right) \notag \\
- \color{red}h_{i}^{n+1} \color{black}\left(\frac{\Delta t}{(\Delta x)^2} \left(\frac{h_{i}^{n} + h_{i+1}^{n}}{2} \right)^3 \right) \notag
\end{align}
\item \textbf{En $i = (N-1)$}
\begin{align}
h_{N-1}^{n} = - \color{red} h_{N-2}^{n+1} \color{black} \left(\frac{\Delta t}{(\Delta x)^2} \left(\frac{h_{N-1}^{n} + h_{N-2}^{n}}{2} \right)^3 \right) + \color{red} h_{N-1}^{n+1} \color{black} \left (1+ \frac{\Delta t}{(\Delta x)^2} \left(\frac{h_{N-1}^{n} + h_{N}^{n}}{2} \right)^3 + \frac{\Delta t}{(\Delta x)^2} \left(\frac{h_{N}^{n} + h_{N-1}^{n}}{2} \right)^3 \right) \notag \\
- \color{red} h_{N}^{n+1} \color{black} \left(\frac{\Delta t}{(\Delta x)^2} \left(\frac{h_{N-1}^{n} + h_{N}^{n}}{2} \right)^3 \right) \notag
\end{align}
\end{enumerate}
\end{document}