So I was calculating $\psi\left(\frac{1}{3}\right)$, I started with
$$\psi(s+1)=-\gamma+\sum_{n=1}^{\infty}\frac{1}{n}-\frac{1}{n+s}$$ putting $s=-\frac{2}{3}$ and do a variable shift,
$$\psi\left(\frac{1}{3}\right)=-\gamma+\sum_{n=0}^{\infty}\frac{1}{n+1}-\frac{3}{3n+1}$$
$$=-\gamma+\sum_{n=0}^{\infty}\left(\int_0^{1} x^n dx-\int_0^1 3x^{3n}dx\right)$$
If I switch the sum and integral
$$-\gamma+\int_0^{1}\left(\frac{1}{1-x}-\frac{3}{1-x^3}\right)dx$$
I got $-\gamma-\frac{\pi}{2\sqrt{3}}-\frac{\log(3)}{2}$. Which is not the correct answer. why? I checked on wolfram alpha and I did calculate the integral right. I used the same method to calculate $\psi\left(\frac{1}{2}\right)$ and got $-\gamma-\log(2)$ which is also incorrect. So I guess it is the summation and integration switching that is invalid. Can someone explain why is that?
To interchange integral and sum, some assumptions are needed. The standard assumptions are that either the integrands should be non-negative, or the $L^1$ norms of the integrands should be summable. Neither condition is met in this case.