# A question on the deformation retract

I want to show that the subspace $A\cup B$ where $A=\{(x,y);(x-1)^{2}+y^{2}=1\}$ and $B=\{(x,y);(x+1)^{2}+y^{2}=1\}$ is a deformation retract of $X=\{(x,y);x^{2}+y^{2}\leq 4\}-\{(1,0),(-1,0)\}$. For this, I define the function $H:X\times I\to X$ as follows:
$H((x,y),t)=\begin{cases} t\frac{(x-1,y)}{\sqrt{(x-1)^2+y^2}}+(1-t)(x,y),&\text{ if }x>0\\ {(0,0)}, &\text{ if }x=0\\ t\frac{(x+1,y)}{\sqrt{(x+1)^2+y^2}}+(1-t)(x,y),&\text{ if }x<0 \end{cases}$

Is it true?

-
Your function looks discontinuous at $x=0$ when $t\ne0$? You're probably better off moving points outside the two circles vertically, while the ones on the insides move radially. –  Harald Hanche-Olsen Jan 27 '13 at 12:55
@HaraldHanche-Olsen Why $H$ is not continuous at $0$? –  aliakbar Jan 27 '13 at 13:07
Because $x-1$ when $x\ge0$, $x+1$ when $x<0$ is discontinuous. Everything else in your expression is continuous. –  Harald Hanche-Olsen Jan 27 '13 at 13:48
@HaraldHanche-Olsen I edit the function $H$. Is $H$ continuous now? –  aliakbar Jan 27 '13 at 14:40
No. Your problem is that you try to move points towards the two circles by going radially to/from the centers, but you switch abruptly between them at $x=0$. You can't correct a jump discontinuity by changing the function definition at a single point. Did you not understand my first comment on what to do? Drawing a picture would help greatly. –  Harald Hanche-Olsen Jan 27 '13 at 14:44