kill(all)$

van=facebook.com/LearningCalculus$

area1(r,R,x):=-(4*x^2*R^2*arctan(-(sqrt(-R+x+r)*sqrt(R-x+r)*sqrt(R+x-r)*sqrt(R+x+r))/(R^2+x^2-r^2))+sqrt(-R+x+r)*sqrt(R-x+r)*sqrt(R+x-r)*sqrt(R+x+r)*(R^2+x^2-r^2))/(4*x^2);

area2(r,R,x):=(4*r^2*x^2*arctan(-(sqrt(-R+x+r)*sqrt(R-x+r)*sqrt(R+x-r)*sqrt(R+x+r))/(R^2-x^2-r^2))+sqrt(-R+x+r)*sqrt(R-x+r)*sqrt(R+x-r)*sqrt(R+x+r)*(R^2-x^2-r^2))/(4*x^2);

area1(r,R,x)+area2(r,R,x);

q:fullratsimp(area1(r,R,x)+area2(r,R,x));