Exchange of integral and derivative in complex anaylsis In the book "Function Theory of One Complex Variable, R.Greene, S.Krantz", I saw the following (Exercise 3 in Chapter 3):

Explain why the following string of equalities is incorrect:
  $$\frac{d^2}{dx^2} \int_{-1}^{1} \log |x-t| dt = \int_{-1}^{1} \frac{d^2}{dx^2}\log |x-t| dt = \int_{-1}^{1}\frac{-1}{(x-t)^2}dt.$$

I tried to find a proper reason, but I couldn't find any satisfying solution.
Especially, I don't know why the second equality is incorrect. I think that
$$\int_{-1}^{1} \frac{d^2}{dx^2}\log |x-t| dt = \int_{-1}^{1} \frac{d}{dx}\frac{\pm1}{|x-t|}dt= \int_{-1}^{1} \frac{d}{dx}\frac{1}{x-t}dt=\int_{-1}^{1}\frac{-1}{(x-t)^2}dt.$$
Where am I wrong?
 A: Theorem. Let $g : J\times I\to \mathbf{R}$ be a function where $I$ and $J$ are (real) intervals. Suppose that $\frac{\partial g}{\partial x} (x,t)$ exists on $J\times I$ and that :


*

*$\forall x\in J$ the application $t\mapsto g(x,t)$ is piecewise continuous and integrable on $I$

*$\forall x\in J$ the application $t\mapsto\frac{\partial g}{\partial x} (x,t)$ is piecewise continuous on $I$

*$\forall t\in I$ the map $x\mapsto\frac{\partial g}{\partial x} (x,t)$ is continuous on $J$

*for each $[a,b]\subseteq J$ there exists $\varphi : [a,b]\to \mathbf{R}$ piecewise continuous, positive and integrable on $I$ such that $\forall x\in[a,b], \forall t\in I, \left|\frac{\partial g}{\partial x} (x,t)\right| \leq \varphi(t)$


then $t\mapsto\frac{\partial g}{\partial x} (x,t)$ is integrable on $I$ for all $x\in J$ and the application $x\mapsto \int_I g(x,t)dt$ is of class $\mathscr{C}^1$ on $J$ with derivative equals to $x\mapsto \int_I \frac{\partial g}{\partial x} (x,t)dt$.
Non-application. In your case, you cannot apply this theorem as even the continuity condition is not verified...
