<s>[INST] Evaluating an integral with a division by $0$ issue Problem:
Evaluate the following integral.
$$ \int_{0}^{4} \frac{dx}{\sqrt{4-x}} $$
Answer:
Let $u = 4 - x$. We have:
\begin{align*}
du &= -dx \\
\int_{0}^{4} \frac{dx}{\sqrt{4-x}} &= \int_{4}^{0} \frac{- du}{\sqrt{u}} \\
\int_{0}^{4} \frac{dx}{\sqrt{4-x}} &= \int_{0}^{4} \frac{- du}{\sqrt{u}} \\
\int_{0}^{4} \frac{dx}{\sqrt{4-x}} &= \int_{0}^{4}  u^{-\frac{1}{2}} \,\, du \\
\int_{0}^{4} \frac{dx}{\sqrt{4-x}} &= 2u^{ \frac{1}{2} } \Big|_0^4 = 2(4)^{ \frac{1}{2} } - 2(0)^{ \frac{1}{2} } \\
\int_{0}^{4} \frac{dx}{\sqrt{4-x}} &= 2(2) - 0 \\
\int_{0}^{4} \frac{dx}{\sqrt{4-x}} &= 4
\end{align*}
My answer matches the back of the book. However, the original function was not defined
at $x = 4$ (due to a divide by $0$ issue ) and I did not do anything special for this case. Should I have? Is my solution correct?
 [/INST] Your solution is fine, if a little informal.
If you want to evaluate it more formally, you need to recognize the integral as an improper integral, so the first step would become $$\int_0^4 \frac{dx}{\sqrt{4-x}} := \lim_{t\to4 {}-} \int_0^t \frac{dx}{\sqrt{4-x}}$$ but then the rest of the solution is almost identical to yours (with an extra limit hanging around until the end), so it doesn't add much.
</s>