I would like to define a function from the output of a series calculation without having to copy and paste. My code is below. The first four lines work fine. It's the final line which doesn't work. I have to copy the output of the fourth line and paste it on the right side of the final line (where the % currently is located) to make it work but this is very cumbersome.
Series[1/Sqrt[(x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2] -
1/Sqrt[(x2 - x1)^2 + (y2 - y1 + b1)^2 + (z2 - z1)^2], {x1, 0,
1}, {x2, 0, 1}, {y1, b1, 1}, {y2, 0, 1}, {z1, 0, 1}, {z2, 0, 1}]
Simplify[%, Assumptions -> b1 > 0]
Normal[%]
InputForm[%]
h[x1_, y1_, z1_, x2_, y2_, z2_] :=%