Some alignment issues in the align environment
A solution without \hphantom
, but with alignat*
. I took the opportunity to improve the look of the vectors with the esvect
package, and simplified the code for the derivatives with the esdiff
package: it has a \diff*
command, with an optional argument (the order of derivation) and $3$ mandatory arguments: the function to derive, the name of the variable and the point at which the derivative is evaluated. A similar diffp*
command exists for partial derivatives.
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage{mathtools, esvect}%
\usepackage{esdiff}
\begin{document}
\begin{alignat*}{4}
\diff*{\vv{OM}}{t}{\mathcal{R}_A}
&=\mathrlap{\diff*[2]{\vv{OO'}}{t}{\mathcal{R}_A}+\diff*[2]{\vv{O'M}}{t}{\mathcal{R}_A}} \\
&=\vv{a_a}(O') & & + \mathrlap{\diff[2]{}{t} \Bigl( x' \vv{u'_x}+y' \vv{u'_y}+z' \vv{u'_z} \Bigr)} \\
& & & + x'\diff*[2]{\vv{u'_x}}{t}{\mathcal{R}_A} & & + 2 \dot{x} \diff*{\vv{u'_x} }{t}{\mathcal{R}_A} && + \ddot{x}'\vv{u'_x} \\
& & & + y'\diff*[2]{\vv{u'_y}}{t}{\mathcal{R}_A} & & + 2 \dot{y}\diff*{\vv{u'_y}}{t}{\mathcal{R}_A} & &+ \ddot{y}'\vv{u'_y} \\
& & &+ z'\diff*[2]{\vv{u'_z}}{t}{\mathcal{R}_A} & & + 2 \dot{z}\diff*{\vv{u'_z}}{t}{\mathcal{R}_A} & & + \ddot{z}'\vv{u'_z}
\end{alignat*}
\end{document}
Split the \hphantom, so that only the equal sign is in the \mathrel:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage{amsmath,tikz}
\begin{document}
\begin{align*}
x &= \overrightarrow{a_a}(O') + x'\\
&\mathrel{\hphantom{= \overrightarrow{a_a}(O') }} +\, y'\\
&\mathrel{\hphantom{=}} \hphantom{\overrightarrow{a_a}(O')} + y'\\
&\mathrel{\hphantom{=}} \hphantom{\overrightarrow{a_a}(O')} \tikz[overlay]\draw[red](6pt,0)--++(0,3);+ z'
\end{align*}
\end{document}