# \underbrace function: How can two underbraces be on the same height?

I am introducing a formula in my paper and would like to have two \underbraces below two parts of the formula. Now it looks kind of odd, as the second \underbrace is way higher than the first. Do you have any ideas ho to fix it without needing to eliminate the fraction?

I print my code below:

$$\label{eq:underbrace} x_{t} = \underbrace{\beta_{0} + \beta_{1} t + \gamma_{1} \cos(t * \frac{2\pi}{365}) + \delta_{1} d_{t}}_{s_{t}} + \underbrace{\epsilon_{t}}_{y_{t}}$$


You can use \vphantoms to achieve similar heights for constructions:

\documentclass{article}

\begin{document}

$x_t = \underbrace{ \beta_0 + \beta_1 t + \gamma_1 \cos(t \times \frac{2\pi}{365}) + \delta_1 d_t }_{s_t} + \underbrace{\epsilon_t \vphantom{\frac{2\pi}{365}}}_{y_t}$

\end{document}


I'd probably be inclined to drop the use of such a large (display) \frac and instead use:

\documentclass{article}

\begin{document}

$x_t = \underbrace{ \beta_0 + \beta_1 t + \gamma_1 \cos(2 \pi t / 365) + \delta_1 d_t }_{s_t} + \underbrace{\epsilon_t \mathstrut}_{y_t}$

\end{document}