Difficulty ensuring system has one solution

I am trying to find an $a$ s.t the system $$x^2+y^2+2x\leq 1\\ y=x+a$$ has a unique solution. Then I want to find this solution.

So it is clear that the line $y=x+a$ must be tangent to the circle $(x+1)^2+y^2=2$ insure the line meets the circle. However, I struggled with the plane geometry so I went with calculus.

So the derivative of the implicit function (which by geometry we can solve for $y$) must match the derivative of the line and the shapes must meet, say at $(x_0,y_0)$.

$$2x+2y\frac{dy}{dx}+2=0\Rightarrow \frac{dy}{dx}=\frac{x+1}{-y}$$ And this must equal the slope of the tangent line, 1, so we get $$\frac{x_0+1}{-y_0}=1\Rightarrow -y_0=x_0+1$$ And we also have that $y_0=x_0+a$ giving me at least an expression for $a$ in terms of $x_0$, $$-x_0-a=x_0+1\Rightarrow -2x_0-1=a$$ How do I finish it off and get a value for a? What information am I missing? I would also be ok with a more geometric approach.

It looks like you haven't used the fact that the point $(x_0,y_0)$ actually satisfies the inequality. In fact, since it is the unique point on the line satisfying the inequality, by continuity it will actually make it an equality. That is, you must have $x_0^2+y_0^2+2x_0=1$; you can then write $x_0$ and $y_0$ in terms of $a$ and solve for $a$.
Alternatively, it seems to me you're making this way more complicated than it needs to be. Just substitute $y=x+a$ into the inequality to get $$x^2+(x+a)^2+2x\leq 1$$ which can be rearranged to $$2x^2+(2a+2)x+(a^2-1)\leq 0.$$
If this has a unique solution, then $2x^2+(2a+2)x+(a^2-1)>0$ for all $x$ except a single $x$ where it is $0$; this will happen iff the discriminant of $2x^2+(2a+2)x+(a^2-1)$ is $0$. You then can just solve for $a$ when the discriminant is $0$.
• Actually, it's not really the IVT, it's just continuity: if $x_0^2+y_0^2+2x_0<1$, then changing $x_0$ by a small amount (and changing $y_0$ correspondingly) it will still be less than $1$, violating uniqueness. – Eric Wofsey Sep 15 '16 at 21:12