\documentclass[11pt]{scrartcl}
\usepackage{evan}

\begin{document}
\title{IntBee 2023/S7}
\subtitle{Evan Chen}
\author{Twitch Solves ISL}
\date{Episode 114}
\maketitle

\section*{Problem}
Evaluate the indefinite integral
\[ \int \left(\sqrt{x+1}-\sqrt{x}\right)^{\pi} \; dx. \]

\section*{Video}
\href{https://www.youtube.com/watch?v=Skl06cOBbV8&list=PLi6h8GM1FA6yHh4gDk_ZYezmncU1EJUmZ}{\texttt{https://youtu.be/Skl06cOBbV8}}



\newpage

\section*{Solution}
Here are two approaches.

\paragraph{Evan's approach using $u$-substitution (from Twitch Solves ISL).}
Note that
\[
  \frac{d}{dx} \left(\sqrt{x+1}-\sqrt{x}\right)
  = \half \left( \frac{1}{\sqrt{x+1}} - \frac{1}{\sqrt x} \right) \\
  = -\frac{\sqrt{x+1}-\sqrt{x}}{2\sqrt{x(x+1)}}.
\]
Define
\begin{align*}
  u &\coloneqq \sqrt{x+1}-\sqrt{x}
  \implies \frac 1u = \sqrt{x+1}+\sqrt{x} \\
  \implies u^{-2} - u^2 &= 4\sqrt{x(x+1)}.
\end{align*}
Differentiating $u$ with respect to $x$,
\begin{align*}
  \frac{du}{dx} &= -\half u \cdot \frac{1}{\sqrt{x(x+1)}} \\
  &= -\half u \cdot \frac{4}{u^{-2} - u^2} \\
  dx &= \frac{u^2 - u^{-2}}{2u} \; du.
\end{align*}
Thus the original integral can be resolved with a $u$-substitution:
\begin{align*}
  \int \left( \frac{u^2-u^{-2}}{2u} \right) \cdot u^\pi \; du
  &= \half \int \left( u^{\pi+1} - u^{\pi-3} \right) \; du \\
  &= \half \left( \frac{u^{\pi+2}}{\pi+2} - \frac{u^{\pi-2}}{\pi-2} \right) + C \\
  &= \boxed{\half \left( \frac{(\sqrt{x+1}-\sqrt{x})^{\pi+2}}{\pi+2} -
  \frac{(\sqrt{x+1}-\sqrt{x})^{\pi-2}}{\pi-2} \right) + C}.
\end{align*}

\paragraph{Trig substitution approach.}
Substitute $x = \sinh^2 t$ so that $x+1 = \cosh^2 t$, to get
\begin{align*}
  \int \left(\sqrt{x+1} - \sqrt x\right)^\pi \d x
  &= \int (\cosh t - \sinh t)^\pi \sinh 2t \d t\\
  &= \int e^{-\pi t} \cdot \frac{e^{2t} - e^{-2t}}{2} \d t\\
  &= \frac{1}{2}\left(\frac{e^{-(\pi+2)t}}{\pi+2} - \frac{e^{-(\pi-2)t}}{\pi-2}\right) + C.
\end{align*}

Using the identity $\sinh^{-1} x = \log\left(\sqrt{x^2+1} + x\right)$,
we have
\[e^{-t} = \left(\sqrt{x+1} + \sqrt x\right)^{-1} = \sqrt{x+1} - \sqrt x,\]
which we use to rewrite the expression above as
\[
  \frac{1}{2}\left(
  \frac{\left(\sqrt{x+1}-\sqrt x\right)^{\pi+2}}{\pi+2} -
  \frac{\left(\sqrt{x+1}-\sqrt x\right)^{\pi-2}}{\pi-2}
  \right) + C.
\]

\end{document}
