<s>[INST] Evaluating a Discontinuous Integral How do you evaluate this integral? $$\int _0 ^4\frac{dx}{x^2 - 2x - 3}$$
My work:
The expression $x^2 - 2x - 3$ is discontinuous at $x = 3$ in the interval $x = 0$ to $x = 4$, so I got to integrate the expression like this:
$$\int _0 ^4\frac{dx}{x^2 - 2x - 3}$$ is equal to
$$\int _0 ^3\frac{dx}{x^2 - 2x - 3} + \int _3 ^4\frac{dx}{x^2 - 2x - 3} $$.
Then recall that in evaluating a discontinuous integrand, the integral is defined by the relations $$\int_a ^b f(x) = lim_{x->b^-} \int_a ^x f(x) dx $$
if $x = b$  is the discontinuous point or $$\int_a ^b f(x) = lim_{x->a^+} \int_x ^b f(x) dx $$
if $x = a$  is the discontinuous point.
With that in mind:
$$\int _0 ^3\frac{dx}{x^2 - 2x - 3} + \int _3 ^4\frac{dx}{x^2 - 2x - 3} $$
$$\int _0 ^3\frac{dx}{(x^2 - 2x + 1) + (-3)(-1)} + \int _3 ^4\frac{dx}{(x^2 - 2x + 1) + (-3)(-1)} $$
$$\int _0 ^3\frac{dx}{(x-1)^2 -(2)^2} + \int _3 ^4\frac{dx}{(x-1)^2  -(2)^2} $$
Remembering that $\int \frac{du}{u^2 +a^2} = \frac{1}{a} \arctan \left( \frac{u}{a}\right) + C, $
we get:
$$\int _0 ^3\frac{dx}{(x-1)^2 -(2)^2} +\int _3 ^4\frac{dx}{(x-1)^2 -(2)^2}$$
equals
$$lim_{x->3^+} \int_0 ^x \frac{dx}{(x-1)^2 -(2)^2} + lim_{x->3^-} \int_x ^4 \frac{dx}{(x-1)^2 -(2)^2} $$
equals
$$lim_{x->3^+} \left( \frac{1}{2} \arctan \left( \frac{x-2}{2}\right) \right)|_3 ^x + lim_{x->3^-} \left(\frac{1}{2} \arctan \left( \frac{x-2}{2}\right) \right)|_x ^4$$
equals
$$\left ( \frac{1}{2} \arctan \left( \frac{x-2}{2}\right)-\frac{1}{2} \arctan \left( \frac{3-2}{2}\right) \right ) + \left ( \frac{1}{2} \arctan \left( \frac{4-2}{2}\right)-\frac{1}{2} \arctan \left( \frac{x-2}{2}\right) \right )$$
equals
$$\left ( \frac{1}{2} \arctan \left( \frac{x-2}{2}\right)- 0.2318 \right ) + \left ( \frac{\pi}{8}-\frac{1}{2} \arctan \left( \frac{x-2}{2}\right) \right )$$
which makes  $$\int _0 ^4\frac{dx}{x^2 - 2x - 3} = 0.1609$$
But in my book, it said there is no value of $\int _0 ^4\frac{dx}{x^2 - 2x - 3}.$
How do you prove that the integral $$\int _0 ^4\frac{dx}{x^2 - 2x - 3}$$ has no value?
 [/INST] The indefinite integral is 
$$\int \frac{1}{x^2-2 x-3} \, dx=\frac{1}{4} \left[\log |3-x|-\log (x+1)\right]+C$$
Indeed the fraction can be split in the sum of two fractions
$\dfrac{1}{(x-3) (x+1)}=\dfrac{a}{x-3}+\dfrac{b}{x+1}=\dfrac{(a+b) x+a-3 b}{(x-3) (x+1)}$
which is equal to the given  fraction if 
$\left\{ \begin{gathered}
  a + b = 0 \hfill \\
  a - 3b = 1 \hfill \\ 
\end{gathered}  \right.\rightarrow$ 
$\left\{ \begin{gathered}
  a = \frac{1}{4} \hfill \\
  b =  - \frac{1}{4} \hfill \\ 
\end{gathered}  \right.\rightarrow \dfrac{1}{(x-3) (x+1)}=\dfrac{1}{4}\left(\dfrac{1}{x-3}-\dfrac{1}{x+1}\right)$
If we write the given definite integral as you did
$$\int _0 ^3\frac{dx}{x^2 - 2x - 3} + \int _3 ^4\frac{dx}{x^2 - 2x - 3}=\\=\frac{1}{4} \left[\log |3-x|-\log (x+1)\right]_0^3+\frac{1}{4} \left[\log |3-x|-\log (x+1)\right]_3^4$$
we see that the first tends to $+\infty$ as $x\to 3$ because of the logarithm
So the integral diverges
Hope this helps
</s>