The formula for LegendreQ[2,z]
on this functions.wolfram.com page gives:
Expand[(1/2) (Log[1 + z] - Log[1 - z]) LegendreP[2, z] + Sum[((4 - 4 k - 1)/((2 k + 1) (2 - k))) LegendreP[2 - 2 k - 1, z], {k, 0, Floor[(2 - 1)/2]}]]
which can be evaluated to:
(3 z)/2 + 1/4 Log[1 - z] - 3/4 z^2 Log[1 - z] - 1/4 Log[1 + z] +
3/4 z^2 Log[1 + z]
whereas Expand[LegendreQ[2,z]]
directly evaluated gives:
-((3 z)/2) + 1/4 Log[1 - z] - 3/4 z^2 Log[1 - z] - 1/4 Log[1 + z] +
3/4 z^2 Log[1 + z]
I assumed that both results are the same, but Mathematica gives a different sign for the ((3 z)/2)
term?