Let $y$ be a broken extremal for $J[y] = \int_a^b L(x, y, y')\, dx$ with a corner at $c \in (a,b)$. Denote the left and right limits at $c$ by a superscript ${}^-$ and ${}^+$ respectively. Then the following two conditions must hold at $c$:
1. **First Weierstrass–Erdmann condition** (continuity of momentum):
\begin{align*}
\frac{\partial L}{\partial y'}(c, y(c), y'^-) = \frac{\partial L}{\partial y'}(c, y(c), y'^+).
\end{align*}
2. **Second Weierstrass–Erdmann condition** (continuity of Hamiltonian):
\begin{align*}
\left[L - y' \frac{\partial L}{\partial y'}\right]^- = \left[L - y' \frac{\partial L}{\partial y'}\right]^+,
\end{align*}
where both sides are evaluated at $(c, y(c))$ with the appropriate one-sided derivative.