# Huge braces showing Integration by Parts (Calculus) on the middle of the equation

I saw somebody do this one time and I thing it is a great idea to show an integration by parts for Calculus exercises. How can I achieve this result?

Do you have other methods to show Integration by parts (or maybe u-substitution)?

Thank you.

• I think that is a VERY bad use of notation. The = has a specific meaning. However, you can use a \left[ and \right] to obtain the large square brace or use a bmatrix. – Peter Grill Oct 24 '15 at 10:20
• @PeterGrill You should probably think of the two equal signs to the right and the left of the brackets as one equal sign that is "split up" to make room for an explanation. Essentially the same thing as writing the substitution on top of the equal sign, but with more space. – Eike Schulte Oct 24 '15 at 16:09
• @EikeSchultez: Yes, I understand what the intent is, but that is not what an = sign means. I think students have enough problems with math notation so I would stay away from misusing the =. – Peter Grill Oct 24 '15 at 22:56
• @PeterGrill I see your point, maybe switching those two equal signs for two \Rightarrow – bru1987 Oct 25 '15 at 1:33

For an exercise book I find it useful, but I'd use a different alignment based on alignedat:

\documentclass{article}
\usepackage{amsmath}

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

\begin{document}

\begin{equation*}
\int x \log x \diff x =
\left[
\begin{alignedat}{2}
u       &= \log x             \quad & \diff v &= x\diff x \\
\diff u &= \frac{1}{x}\diff x \quad & v &= \frac{x^2}{2}
\end{alignedat}\,
\right]
=
\frac{x^2}{2}\log x - \int \frac{x^2}{2}\frac{1}{x}\diff x
\end{equation*}

\end{document}


The upper line shows what you start with, the lower line what you get.

The alternative way, by columns rather than rows:

\documentclass{article}
\usepackage{amsmath}

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

\begin{document}

\begin{equation*}
\int x \log x \diff x =
\left[
\begin{alignedat}{2}
u       &= \log x   \quad & \diff u &= \frac{1}{x}\diff x\\
\diff v &= x\diff x \quad & v &= \frac{x^2}{2}
\end{alignedat}\,
\right]
=
\frac{x^2}{2}\log x - \int \frac{x^2}{2}\frac{1}{x}\diff x
\end{equation*}

\end{document}


• thank you egreg, that's exactly what I was looking for! Best Regards. – bru1987 Oct 24 '15 at 11:03
• I wouldn't write the second = sign, as the contents of the brackets is an interpolated clause. – Bernard Oct 24 '15 at 11:55
• @Bernard I would, instead, but it's a question of preferences. – egreg Oct 24 '15 at 12:01

Using using aligned environnement (\usepackage{amsmath}) and \left[ and \right] shoudl do the trick:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\left[ \begin{aligned} u &= \log{x} \\ du &= \frac{1}{x} dx \\ dv &= x \times dx \\ v &= \frac{x^2}{2} \end{aligned} \right]

\end{document}


Output:

I let you write the extreme part of your equation ;-)

• thank you friend, your solution looks great. Best Regards! – bru1987 Oct 24 '15 at 11:03