# Missing } inserted

I don't know where I've went wrong here. It pops up with "missing } inserted" and I'm not entirely sure what is wrong. It is happening after the "or" part of the code. When i have (x'(t))^2 by itself under the square root it works but when I add the y'(t) bit it doesn't. This is within a table btw.

$$\int_{x_1}^{x_2} {\sqrt{1+{(f'(x))}^2}}\,\mathrm{d}x$$ or $$\int_{t_1}^{t_2} {\sqrt{{({x'(t)})}^{2}+{({y'(t)})}^{2}}\,\mathrm{d}t$$

• Insert a brace (}) after the last t. Apr 10 '17 at 11:55
• My editor, Sublime Text, marks matching parentheses, which is helpful in these cases.
– lblb
Apr 10 '17 at 12:03

You're using too many braces and it's easy to forget one.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\diff}{\mathop{}\!\mathrm{d}}

\begin{document}

$$\int_{x_1}^{x_2} \sqrt{1+(f'(x))^{2}}\diff x$$
or
$$\int_{t_1}^{t_2} \sqrt{(x'(t))^{2}+(y'(t))^{2}}\diff t$$

\end{document}


you have a extra grouping here {\sqrt{

• This is already covered in the other answer (posted before yours).
– Werner
Apr 11 '17 at 5:25