We all know that the lagrangian for the free electromagnetic field is given by $$ \mathscr{L} = -\frac{1}{4}F^{\mu \nu}F_{\mu \nu} $$ where $ F^{\mu \nu} = \partial^\mu A^\nu -\partial^\nu A^\mu $ is the electromagnetic field tensor. But also we know that
Lets consider $c=1$ for simplicity. Then, doing the math, the lagrangian can be written as $$ \mathscr{L} = \frac{1}{2} (|\vec{E}|^2 - |\vec{B}|^2) $$
By applying Euler-Lagrange, i.e. $$ \partial_\mu \left( \frac{\partial \mathscr{L}}{\partial (\partial_\mu \phi_i)} \right) - \frac{\partial \mathscr{L}}{\partial \phi_i} = 0 $$ where $\phi_i$ is each of the components of each field, I find $$ \vec{E} = 0 $$ and $$ \vec{B} = 0 $$ but not the Maxwell equations... What is going on?