# [✓] Integrate a piecewise function?

GROUPS:
 I am trying to integrate a step function given in a book, but it doesn't work. Phi[x_]:= Piecewise[{{-Hg x, -g/2 <= x <= g/2}, {-g Hg/2, x >= g/2}, {g Hg/2, x < -g/2}}] I can plot it and give the same result as in book but the integration is not the same so my integration code is: Integrate[y1/ \[Pi] \[CapitalPhi][x]/((x1-x)^2+y1^2), {x, -Infinity, Infinity}, Assumptions -> x1 > 0 && y1 > 0](*here y1=y in book*) In book it only says for y>0, so I assume x>0 also because for just y>0 mathematica doesn't integrate. Thanks for your helpmy code and book page is attached Attachments: