My solution is as folllowing.
This integration is hard to solve. I googled it, and found the result is 1/3*ln(1+sqrt(2)) + 1/15*(2+sqrt(2)) = 0.52140543..
please see the link below.
http://mathworld.wolfram.com/SquareLinePicking.html
http://www.stat.columbia.edu/~liam/teaching/4109-fall10/chapter4.pdf