[Tex/LaTex] How to use an align environment flush right

alignamsmathhorizontal alignmentmath-mode

Is there an option analogous within the align environment to the left align for right align, i.e. fralign.

MWE:

 \documentclass{article}
 \usepackage[fleqn]{amsmath} % Instead have [freqn].
 %\usepackage[fleqn]{mathtools} Something that will also work for mathtools as well.

\begin{document}

\begin{align*} % Would be fralign* instead.
    \sin 2x &= 2sin x\cos x \\ 
    \cos 2x &= \cos^2 x-\sin^2 x &
\end{align*}

\end{document}

Best Answer

Without specifying a package option to amsmath, you can use the flalign[*] environment and add some (unused) alignment characters & to typeset the equation flush right:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\lipsum[1] \setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}
\begin{flalign*}
  &&\sin 2x &= 2\sin x\cos x \\ 
  &&\cos 2x &= \cos^2 x-\sin^2 x
\end{flalign*}
\lipsum[2]
\end{document}

The adjustment to the lengths \abovedisplayskip and \abovedisplayshortskip (both set to 0pt) was merely to reduce the gap above the flushed equation. This may not be necessary in the document in general.