I ran into the following problem and its solution:
The integration by parts formula $ \int_{a}^{b}u\frac{dv}{dx}\,dx=uv\bigg|_{a}^{b}-\int_{a}^{b}v\frac{du}{dx}\,dx $ is known to be valid for functions $u(x)$ and $v(x)$, which are continuous and have continuous first derivatives. However, we will assume that $u$, $v$, $du/dx$, and $dv/dx$ are continuous only for $a\leqslant x\leqslant c$ and $c\leqslant x \leqslant b$; we assume that all quantities may have a jump discontinuity at $x=c$.
(a) Derive an expression for $\int_{a}^{b}u\,dv/dx\,dx$ in terms of $\int_{a}^{b}v\,du/dx\,dx$. $ \int_{a}^{b}u\frac{dv}{dx}\,dx=uv\bigg|_{a}^{b}+uv\bigg|_{c^+}^{c^-}-\int_{a}^{b}v\frac{du}{dx}\,dx. $
Could anyone clarify to me how this was obtained?
Edit: Following the advice of Muphrid, I obtained the following:
$\begin{align} \int_{a}^{c^-}u\frac{dv}{dx}\,dx+\int_{c^+}^{b}u\frac{dv}{dx}\,dx&=uv\bigg|_{a}^{c^-}-\int_{a}^{c^-}v\frac{du}{dx}\,dx+uv\bigg|_{c^+}^{b}-\int_{c^+}^{b}v\frac{du}{dx}\,dx,\\ \int_{a}^{b}u\frac{dv}{dx}\,dx&=\color{red}{uv\bigg|_{a}^{c^-}+uv\bigg|_{c^+}^{b}}-\int_{a}^{b}v\frac{du}{dx}\,dx. \end{align}$
What is the rule for combining the terms in red?