[Tex/LaTex] How to make curly braces with several equations

alignamsmathequations

I am trying to type the following equations in LaTeX:equations with curly brace

What I currently have is:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{align*}
\left.\begin{aligned}
\dfrac{C}{V}=\sin\gamma\implies C=V\cdot\sin\gamma\\
\sin\gamma=\cos\gamma\cdot\dfrac{\sin\gamma}{\cos\gamma}
\end{aligned}\right\}
\implies C=V\cdot\cos\gamma\cdot\dfrac{\sin\gamma}{\cos\gamma}\\
\left.\begin{aligned}
\dfrac{\sin\gamma}{\cos\gamma}=\dfrac{C_D}{C_L}
\end{aligned}\right\}
\end{align*}

\end{document}

So, as you can see I could not manage to put the second curly brace properly.
How can I solve this problem?

Best Answer

Nest aligned properly; I defined a compute environment for convenience, also removing as much useless space as possible.

\documentclass{article}
\usepackage{mathptmx}
\usepackage{amsmath}

\newenvironment{compute}
 {\left.\kern-\nulldelimiterspace\!\aligned}
 {\endaligned\right\rbrace}

\begin{document}

\begin{equation*}
\begin{compute}
  \begin{compute}
    \begin{compute}
    \frac{C}{V}=\sin\gamma\to C=V\sin\gamma\\
    \sin\gamma=\cos\gamma\frac{\sin\gamma}{\cos\gamma}
    \end{compute}
  \to C=V\cos\gamma\frac{\sin\gamma}{\cos\gamma}\\
  \frac{\sin\gamma}{\cos\gamma}=\frac{C_D}{C_L}
  \end{compute}
\to C=V\frac{C_D}{C_L}\cos\gamma\\
V=\sqrt{\frac{W}{S}\frac{2}{\rho}\frac{1}{C_L}\cos\gamma}
\end{compute}
\to C=\sqrt{\frac{W}{S}\frac{2}{\rho}\frac{C_D^2}{C_L^3}\cos^3\gamma}
\end{equation*}

\end{document}

enter image description here