# Determine the coordinate of the point where line and circle collide/intersect - how to solve for x

I would like to determine the point $C$ in this image:

After the hours of research and refreshing some memories from school days, I've got:

Point: (xCoordinate, yCoordinate):

A (center): $(x_0,y_0)$

B: $(x_1,y_1)$

Plugging them into equation of circle

$$x^2 + \left(y_0 + \left( \frac{y_1-y_0}{x_1-x_0}\right) (x-x_0)\right)^2 = r^2$$

Now how can I solve for $x$? I would like to have the equation that starts with "$x=$".

-
Welcome to math.SE. You can find some good starting points on how to format mathematics on the site here. This AMS reference is very useful. If you need to format more advanced things, there are many excellent references on LaTeX on the internet, including StackExchange's own TeX.SE site. – Zev Chonoles Feb 22 '13 at 8:21

Because the point $C=(x,y)$ is lies on a line through $(x_0,y_0)$ and $(x_1,y_1)$, it is of the form $$(x,y)=(x_0+t(x_1-x_0),y_0+t(y_1-y_0))$$ for some real number $t$. In order for $C$ to lie on the circle, we must have that $$(t(x_1-x_0))^2+(t(y_1-y_0))^2=r^2,$$ and hence $$t=\frac{r}{\sqrt{(x_1-x_0)^2+(y_1-y_0)^2}}.$$ Thus, the $x$-coordinate of $C$ is $$x=x_0+\frac{r(x_1-x_0)}{\sqrt{(x_1-x_0)^2+(y_1-y_0)^2}}.$$
Hint: Assuming the coordinates of unknown point are $(X,Y)$, solve these two equations simultaneously: $$(Y-y_0)^2+(X-x_0)^2=r^2,~~~Y=\frac{y_1-y_0}{x_1-x_0}(X-x_0)-y_0$$