# Strangely LaTeX error for using \boldsymbol command

The LaTeX's compiler, errors for bolding the mathematic formula very strangely! To blacken the mathematic characters, I've frequently used the \boldsymbol command, but after some certain point onwards, the compiler errors. When I use the following in a new sort of vacant file, there is no errors:

$‎\boldsymbol{\cos^{2} x =}‎ ‎\frac{‎\boldsymbol{1+\cos 2x}‎}{‎\boldsymbol{2}‎}‎‎$


But when I insert the same expression in my file, the following error emerges:

! Missing { inserted. <to be read again>} !


Despite, my plenty utilization of the command in the file, there is no error for the previous uses and it only errors after this case onwards! (And I do really need to use the black face for the mathematic formulas.)

So, what should I do now? I even used the alternative version of it (i.e.: \bm), but it reports another similar error (probably their invocations are similar but have different results.)

$\bm{ \cos^{2} x = ‎\frac{1+\cos 2x}{2}}‎‎$‎‎


Please, those who have some experiences, help me out of this case, thank you :)

• @egreg I used your command but it still gives same error! – Qaher May 8 '16 at 17:55
• Please add a minimal example showing the error, from \documentclass to \end{document}. – egreg May 8 '16 at 17:59
• if you get the same error about missing { whatever command you use, the most likely explanation is that you have a missing { in your document in code you have not shown. – David Carlisle May 8 '16 at 18:03
• When I remove the last command regarding the bold issue, LaTeX does't complain about anything, and even when I remove it & replace the command of Mr. egreg, it errors again! I think, I'm limited in using the bolding commands, which then, would be really stupid! Is there any fast & quick way 2 check 4 the issue where to tell if there is an open curly brace without the proper closing pair or vice versa, dispite the LaTeX hasn't recognized any errors? Since I've typed so many and finding such a tiny in error in this huge code is a real pain in the head without using any sophisticated software! – Qaher May 9 '16 at 13:13
• Are you perhaps looking at {\boldmath$\cos^{2} x=\frac{1+\cos 2x}{2}$}? (Fixed the previous version) – egreg May 9 '16 at 16:00