# Equation - brackets

How can I improve brakets in this equation please?

$$\label{E} E_0^{(1)} = \expval{\frac{e'^2}{|\vec{r_1}-\vec{r_2}|}}{\Phi}$$


EDIT: And please, what is wrong here? I think that in the end should be {\Phi }\, but it is mistake by compilation.

\documentclass{article}
\usepackage{physics}
\begin{document}
$$\label{E} E_0^{(1)} = 4 \pi e'^2 \expval**{\frac{1}{|\vec{r}_2|} \sum\limits_{l=0}^{\infty} \sum\limits_{m=-l}^l \left(\frac{|\vec{x}^{(1)}|}{|\vec{x}^{(2)}|} \right)^l \Phi }\\$$
\end{document}

• \left...\right? P.S. I usually write \vec{r}_1 because of space. – manooooh Nov 9 '18 at 19:36
• Please provide a compilable example. Where does the \expval command come from? – Phelype Oleinik Nov 9 '18 at 19:37
• Off-topic: One should probably write \vec{r}_1 instead of \vec{r_1}, and \vec{r}_2 instead of \vec{r_2}. – Mico Nov 9 '18 at 20:04
• Instead of editing an existing query to pose what's essentially a new question, you should post a new query. – Mico Nov 9 '18 at 20:07

If you're using the physics package, then it looks like you have to pass two * arguments to \expval to allow it to auto-resize the brackets.

As for your second equation, it is missing an argument. You had \expval**{stuff \Phi}, but you need to provide another argument: \expval**{stuff}{\Phi}.

\documentclass{article}
\usepackage{physics}
\begin{document}
$$\label{E} E_0^{(1)} = \expval**{\frac{e'^2}{|\vec{r}_1-\vec{r}_2|}}{\Phi}$$
$$\label{E2} E_0^{(1)} = 4 \pi e'^2 \expval**{\frac{1}{|\vec{r}_2|} \sum_{l=0}^\infty \sum_{m=-l}^l \left(\frac{|\vec{x}^{(1)}|}{|\vec{x}^{(2)}|} \right)^l}{\Phi}$$
\end{document}


• Please, can I have one more question - I editted my origin question. – Elisabeth Nov 9 '18 at 20:08
• @Elisabeth The solution was simple, so I also updated my answer. If you happen to have more problems it's advisable, as Mico said, to ask a new question instead of editing an old question. – Phelype Oleinik Nov 9 '18 at 20:10
• You should definitely remove the double-backslash stuff at the end of the equation environments. Also, the \limits directives are redundant; all they do is create code clutter. – Mico Nov 9 '18 at 20:12
• @Mico Oops, I forgot those there. Thanks for pointing it out :-) – Phelype Oleinik Nov 9 '18 at 20:15

I do not know where \expval comes from but with braket you could do

\documentclass{article}
\usepackage{amsmath}
\usepackage{braket}
\begin{document}
$$\label{E} E_0^{(1)} = \Braket{\Phi | \frac{e'^2}{\left|\vec r_1 - \vec r_2\right|} | \Phi}$$
\end{document}