Write $\sin{x} = (e^{i x}-e^{-i x})/(2 i)$. Then consider the integral
$$PV \oint_{C_{\pm}} dx \frac{e^{\pm i z}}{z (z^2-2 z+2)} $$
where $C_{\pm}$ is a semicircular contour of radius $R$ in the upper/lower half plane with a semicircular detour into the upper/lower half plane of radius $\epsilon$. For $C_{+}$, we have
$$PV \oint_{C_{+}} dz \frac{e^{i z}}{z (z^2-2 z+2)} = \int_{-R}^{-\epsilon} dx \frac{e^{i x}}{x (x^2-2 x+2)}+ i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{e^{i \epsilon e^{i \phi}}}{\epsilon e^{i \phi} (\epsilon^2 e^{i 2 \phi} - 2 \epsilon e^{i \phi}+2)} \\+ \int_{\epsilon}^R dx \frac{e^{i x}}{x (x^2-2 x+2)}+ i R \int_0^{\pi} d\theta \, e^{i \theta} \frac{e^{i R e^{i \theta}}}{R e^{i \theta} (R^2 e^{i 2 \theta} - 2 R e^{i \theta}+2)} $$
For $C_-$, we have
$$PV \oint_{C_{-}} dz \frac{e^{-i z}}{z (z^2-2 z+2)} = \int_{-R}^{-\epsilon} dx \frac{e^{-i x}}{x (x^2-2 x+2)}+ i \epsilon \int_{-\pi}^0 d\phi \, e^{i \phi} \frac{e^{-i \epsilon e^{i \phi}}}{\epsilon e^{i \phi} (\epsilon^2 e^{i 2 \phi} - 2 \epsilon e^{i \phi}+2)} \\+ \int_{\epsilon}^R dx \frac{e^{-i x}}{x (x^2-2 x+2)}- i R \int_0^{\pi} d\theta \, e^{-i \theta} \frac{e^{-i R e^{-i \theta}}}{R e^{-i \theta} (R^2 e^{-i 2 \theta} - 2 R e^{-i \theta}+2)} $$
In both cases, we take the limits as $R \to \infty$ and $\epsilon \to 0$. Note that, in both cases, the respective fourth integrals have a magnitude bounded by
$$\frac{2}{R^2} \int_0^{\pi/2} d\theta \, e^{-R \sin{\theta}} \le \frac{2}{R^2} \int_0^{\pi/2} d\theta \, e^{-2 R \theta/\pi}\le \frac{\pi}{R^3}$$
The respective second integrals of $C_{\pm}$, on the other hand, become equal to $\mp i \frac{\pi}{2} $. Thus,
$$PV \oint_{C_{\pm}} dz \frac{e^{\pm i z}}{z (z^2-2 z+2)} = PV \int_{-\infty}^{\infty} dx \frac{e^{\pm i x}}{x (x^2-2 x+2)} \mp i \frac{\pi}{2}$$
On the other hand, the respective contour integrals are each equal to $\pm i 2 \pi$ times the sum of the residues of the poles inside their contours. (For $C_-$, there is a negative sign because the contour was traversed in a clockwise direction.) The poles of the denominator are at $z_{\pm}=1 \pm i$. Thus,
$$PV \int_{-\infty}^{\infty} dx \frac{e^{\pm i x}}{x (x^2-2 x+2)} \mp i \frac{\pi}{2} = \pm i 2 \pi \frac{e^{\pm i (1 \pm i)}}{(1 \pm i) (2) (\pm i)} $$
Taking the difference between the two results and dividing by $2 i$, we get that
$$\int_{-\infty}^{\infty} dx \frac{\sin{x}}{x (x^2-2 x+2)} = \frac{\pi}{2} \left (1+\frac{\sin{1}-\cos{1}}{e} \right ) $$
Note that we may drop the $PV$ because the difference between the integrals removes the pole at the origin.
Feynman isn't necessarily antangonistic to contour integration. They sometimes work together well.
$$J=\int^\infty_0\frac{\log^4(x)}{1+x^2}dx=I^{(4)}(0)$$
where
$$I(a)=\int^\infty_{0}\frac{x^{a}}{1+x^2}dx$$ with $-1<a<1$.
Take $C$ as a keyhole contour, centered at the origin, avoiding the positive real axis.
Let $f(z)=z^a(1+z^2)^{-1}$ with branch cut on the positive real axis, implying $z^a\equiv \exp(a(\ln|z|+i\arg z))$ where $\arg z\in[0,2\pi)$.
Firstly, by residue theorem,
$$\oint_C f(z)dz=2\pi i\bigg(\operatorname*{Res}_{z=i}f(z)+\operatorname*{Res}_{z=-i}f(z)\bigg)$$
We have
$$\operatorname*{Res}_{z=i}f(z)=\frac{\exp(a(\ln|i|+i\arg i))}{i+i}=\frac{e^{\pi ia/2}}{2i}$$
$$\operatorname*{Res}_{z=-i}f(z)=\frac{\exp(a(\ln|-i|+i\arg -i))}{-i-i}=-\frac{e^{3\pi ia/2}}{2i}$$
Thus,
$$\oint_C f(z)dz=\pi(e^{\pi ia/2}-e^{3\pi ia/2})$$
On the other hand,
$$\oint f(z)dz=K_1+K_2+K_3+K_4$$
where
$$
K_1=\lim_{R\to\infty}\int^{2\pi}_0 f(Re^{it})iRe^{it}dt
=\lim_{R\to\infty}2\pi f(Re^{ic})iRe^{ic}=0 \qquad{c\in[0,2\pi]}$$
$$K_2=\lim_{r\to0^+}\int_{2\pi}^0 f(re^{it})ire^{it}dt
=\lim_{r\to0^+}2\pi f(re^{ic})ire^{ic}=0 \qquad{c\in[0,2\pi]}$$
$$K_3=\int^\infty_0 f(te^{i0})dt=\int^\infty_0\frac{e^{i0}t^a}{t^2+1}dt=I$$
$$K_4=\int_\infty^0 f(te^{i2\pi})dt=-\int^\infty_0\frac{e^{2\pi ia}t^a}{t^2+1}dt=-e^{2\pi ia}I$$
For $K_1,K_2$, please respectively note the asymptotics $f(z)\sim z^{a}$ for small $|z|$ and $f(z)=O(z^{a-2})$ for large $|z|$.
Therefore,
$$I-e^{2\pi ia}I=\pi(e^{\pi ia/2}-e^{3\pi ia/2})$$
$$\implies I=\pi\frac{e^{\pi ia/2}-e^{3\pi ia/2}}{1-e^{2\pi ia}}
=\pi\frac{e^{-\pi ia/2}-e^{\pi ia/2}}{e^{-\pi i a}-e^{\pi ia}}
=\pi\frac{\sin(\pi a/2)}{\sin(\pi a)}
=\frac{\pi}2\sec\left(\frac{\pi a}2\right)
$$
Let $T=\tan(\pi a/2)$, $S=\sec(\pi a/2)$.
$$I^{(4)}(a)=\frac{\pi}2\frac{\pi^4(T^4+18S^2T^2+5S^4)}{16}$$
Hence,
$$J=I^{(4)}(0)=\frac{\pi}2\frac{\pi^4(0+0+5\cdot 1)}{16}=\color{red}{\frac{5\pi^5}{32}}$$
The tedious differentiation is done by calculator. :)
Best Answer
Integrating $$ \int_\gamma\frac{\log\left(z^2+4\right)}{\left(z^2+1\right)^2}\,\mathrm{d}z\tag1 $$ along the contour
gives $2\pi i$ times the residue at $z=i$.
The integral along the curved pieces vanish as the radius of the large semi-circle grows to $\infty$.
The integral along the downward line along the right side of the imaginary axis to $2i$ (in red) is $$ -i\int_2^\infty\frac{\log\left(x^2-4\right)+\pi i}{\left(x^2-1\right)^2}\,\mathrm{d}x\tag2 $$ The integral along the upward line along the left side of the imaginary axis from $2i$ (in green) is $$ i\int_2^\infty\frac{\log\left(x^2-4\right)-\pi i}{\left(x^2-1\right)^2}\,\mathrm{d}x\tag3 $$ For $z=ix$ and $x\gt2$, we have one of $\log\left(z^2+4\right)=\log\left(x^2-4\right)\pm\pi i$. Integrating $\frac1{z-2i}+\frac1{z+2i}$ clockwise around $2i$ decreases $\log\left(z^2+4\right)$ by $2\pi i$. Thus, on the right side of the branch cut, we have $\log\left(x^2-4\right)+\pi i$, and on the left side, we have $\log\left(x^2-4\right)-\pi i$.
The sum of the integrals in $(2)$ and $(3)$ is $$ 2\pi\int_2^\infty\frac1{(x^2-1)^2}\,\mathrm{d}x=\frac\pi6(4-3\log(3))\tag4 $$ The integral along the real axis (in blue) is $$ 2\int_0^\infty\frac{\log(x^2+4)}{(x^2+1)^2}\,\mathrm{d}x\tag5 $$ Furthermore, $$ 2\pi i\operatorname*{Res}_{z=i}\left(\frac{\log(z^2+4)}{(z^2+1)^2}\right)=\frac\pi6(2+3\log(3))\tag6 $$ Subtracting $(4)$ from $(6)$ and dividing by $2$ gives $$ \int_0^\infty\frac{\log(x^2+4)}{(x^2+1)^2}\,\mathrm{d}x=\frac\pi2\log(3)-\frac\pi6\tag7 $$