I was wondering how to align "minimize" and "subject" in the following example at their first letters, while keeping the alignment at the equal signs as is.
Thanks.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{aligned}
\text{minimize} \quad J(y) &=\int_a^b \sqrt{1 + y^{\prime}(x)^2} \, \text{d}x \\
\text{subject to} \quad y(a) &= \alpha \\
y(b) & = \beta \\
y &\in C^1[a,b].
\end{aligned}
\end{equation}
\end{document}