Find the equation of a circle whose diameter is the chord of another circle I am studying maths as a hobby and have just come to the last end-of-chapter question on parabolas and circles.
The straight line through the point $A(-a,0)$ at an angle $\theta$ to the positive direction of the x-axis meets the circle $x^2+y^2=a^2$ at P, distinct from A. The circle on AP as diameter is denoted by C.
i) By finding the equation of C, or otherwise, show that if C touches the y-axis, then $\cos2\theta=2-\sqrt 5$
ii) C meets the x-axis at M, distinct from A, and the tangents to C at A and M meet at Q. Find the coordinates of Q in terms of $\theta$ and show that as $\theta$ varies, Q always lies on the curve $y^2x +(x+a)^3=0$.
I really don't know how to begin here. To find the equation of C I am thinking I need two points so I can use the equation: $$x^2+y^2+2gx+2fy+c=0$$
But I only have one definite point, at A. The value of y at B is unknown. I could call P (x,y) but this is too vague.
This is my visualisation of the situation for the first part:

I can see that $\angle ABP$ is a right angle.
 A: 
Instead of solving equations of circle and straight line, using a bit of geometry make things easier. You do not need to use equation of the circle for any of the two questions if you do not want to.
$AP$ is a chord of the circle centered at $O$. So perpendicular $OT$ from $O$ to $AP$ bisects $AP$ and $T$ is the center of the new circle $C$.
Then $AT = OA \cos\theta = a \cos\theta$
So, $AP = 2 a \cos\theta$
$PH = AP \sin\theta = 2 a \cos\theta \sin\theta = a \sin2\theta$
$OH = OA - AH = a - AP \cos\theta = a - 2 a \cos^2\theta = - a \cos2\theta$
So coordinates of $P$ is $(a \cos2\theta, a \sin 2\theta)$
As $T$ is the midpoint of $AP$, coordinates of $T$,
$ \left (\frac{-a + a \cos2\theta}{2}, \frac{a\sin2\theta}{2}\right)$
If the circle $C$ touches y-axis, $AT = TB$ as both are radii of circle $C$.
Solving it, you  will get the value of $\cos2\theta$.
For the second part, you know center $T$ and radius so you can use the equation of circle $C$, then find tangents and intersection point. But I prefer the following -
Points $A$ and $M$ are both on x-axis and  tangents at those points would meet at a point which is on the vertical line going through the center of the circle, $T$. Can you see why?
Also, the tangent at point $A$ is perpendicular to $AP$ and as we know the slope of $AP$, we can find the equation of tangent at $A$ and its intersection $Q$ with the vertical line through center $T$.
Then show that $Q$ satisfies the equation of the given curve.
Can you take it from here? If you get stuck, please let me know.
A: Equation of $AP$ is given by:
$$ y = (x+a)\tan\theta$$
Now find the coordinates of the points of intersection of this line with the given circle.
$$ x^2 + y^2 = a^2$$
$$ x^2 + (x+a)^2\tan^2\theta = a^2$$
$$ x^2 \sec^2\theta + 2a\tan^2\theta x + a^2(\tan^2\theta-1) = 0$$
This is a quadratic whose roots are the abscissae of $A$ and $P$. And we already know that the abscissa of $A$ is $-a$, we can easily find the other root using Vieta's formulae.
$$ P_x = \frac{a^2(\tan^2\theta-1)}{-a\sec^2\theta} = a(\cos^2\theta - \sin^2\theta) =a\cos2\theta$$
From the equation of the line,
$$ P_y = a(1+\cos2\theta)\tan\theta = a\sin2\theta$$
Now you know the coordinates of both $A$ and $P$. Thus you can write the equation of circle $C$, which will be:
$$ (x-A_x)(x-P_x) + (y-A_y)(y-P_y) = 0$$
$$ (x+a)(x-a\cos2\theta) + y(y-a\sin2\theta) = 0$$
Since this circle touches the y-axis, its intersection with the line $x=0$ must have a unique root.
$$ a(-a\cos2\theta) + y(y-a\sin2\theta) = 0$$
$$ y^2 -ya\sin2\theta - a^2\cos2\theta=0$$
Equating the discriminant of this quadratic to zero,
$$ a^2\sin^22\theta+4a^2\cos2\theta=0 $$
$$ 1-\cos^22\theta + 4\cos2\theta=0$$
$$  \color{red}{\boxed{ \color{black}{ \cos2\theta = 2 - \sqrt{5}}}}$$

For the second part of the question,
Tangents at $A$ and $M$ meet at $Q$. Thus, it is clear that the line $AM$ is the chord of contact of the point $Q$ with respect to the circle. Let $Q$ be some $(h,k)$
The circle's equation is (from above)
$$ (x+a)(x-a\cos2\theta) + y(y-a\sin2\theta) = 0$$
$$ x^2 + y^2 + 2ax\sin^2\theta - 2ay\sin\theta\cos\theta - a^2\cos2\theta = 0 $$
Equation of chord of contact is given by $T=0$
$$ hx + ky +a\sin^2\theta (x+h) - a\sin\theta\cos\theta (y+k)- a^2\cos2\theta = 0$$
$$ x(h+a\sin^2\theta) + y(k-a\sin\theta\cos\theta) + ha\sin^2\theta - ka\sin\theta\cos\theta - a^2\cos2\theta = 0$$
This is the equation of $AM$. But we know that $AM$ is nothing but the x-axis. Therefore, this equation must be equivalent to $y=0$
On equating the coefficient of $x$ and the constant term to zero, we get:
$$ h+a\sin^2\theta = 0$$
$$ ha\sin^2\theta - ka\sin\theta\cos\theta - a^2\cos2\theta = 0$$
Solve for $h$ and $k$
$$ h = -a\sin^2\theta $$
$$ k = -a \frac{\sin^4\theta - 2\sin^2\theta + 1}{\sin\theta\cos\theta} = -a \frac{(1-\sin^2\theta)^2}{\sin\theta\cos\theta} = -a\frac{\cos^3\theta}{\sin\theta} $$
Now you have the coordinates of $Q$ in terms of $\theta$
$$ \color{red}{\boxed{\color{black}{Q \equiv \left(-a\sin^2\theta, -a\frac{\cos^3\theta}{\sin\theta} \right)}}}$$
It is easy to show that $Q$ always lies on the curve $y^2x +(x+a)^3=0$. Just plug in the values of $h$ and $k$ into the locus and verify if the equation is correct.

Proof for $T=0$ being the chord of contact:
Keep in mind that this is for any conic (parabola/ellipse/hyperbola), and not just for circles.
For a general conic $ax^2 + 2hxy + by^2 + 2gx + 2fy + c = 0$,
At a point $(x_1,y_1)$, $T=0$ is written as $$ axx_1 + h(xy_1 + x_1y) + byy_1 + g(x+x_1) + f(y+y_1) + c = 0$$
I have already linked the proof for why this represents the equation of the tangent to the conic if $(x_1,y_1)$ lies on the conic, in the comments. We will use this result to prove that this represents the chord of contact of the point if $(x_1,y_1)$ lies outside the conic.
First, let me make it clear what I mean by chord of contact. Suppose there is a point $(x_1,y_1)$ outside the conic. Draw tangents to the conic from this point. There are clearly 2 such tangents possible. Let these 2 tangents touch the conic at the points $(x_2,y_2)$ and $(x_3,y_3)$ respectively.
Using the above property, the equation of the tangent to the conic at $(x_2,y_2)$ is given by:
$$axx_2 + h(xy_2 + x_2y) + byy_2 + g(x+x_2) + f(y+y_2) + c = 0 $$
Similarly, the equation of the tangent to the conic at $(x_3,y_3)$ is given by:
$$axx_3 + h(xy_3 + x_3y) + byy_3 + g(x+x_3) + f(y+y_3) + c = 0 $$
These 2 tangents intersect at $(x_1,y_1)$. This implies that $(x_1,y_1)$ lies on both these lines. Thus, we get:
$$\tag{1} ax_1x_2 + h(x_1y_2 + x_2y_1) + by_1y_2 + g(x_1+x_2) + f(y_1+y_2) + c = 0 $$
$$\tag{2} ax_1x_3 + h(x_1y_3 + x_3y_1) + by_1y_3 + g(x_1+x_3) + f(y_1+y_3) + c = 0 $$
Now, consider the linear equation
$$axx_1 + h(xy_1 + x_1y) + byy_1 + g(x+x_1) + f(y+y_1) + c = 0$$
From $(1)$ and $(2)$, $(x_2,y_2)$ and $(x_3,y_3)$ both lie on this line. But there exists a unique line passing through two given points. Therefore, this line must be the equation of the chord of contact, thus completing our proof.
Actually, $T=0$ represents another thing. For any point except the centre of the conic, it represents the polar of the point with respect to the conic. If you draw variable secants $PAB$ from a point $P$, then the locus of the point of intersection of the tangents to the conic at $A$ and $B$ is known as the polar of point $P$ with respect to the conic and the point $P$ is known as the pole of the polar with respect to the conic. You can prove this result by using a similar idea that I used to prove the chord of contact theorem.
There are several other notations as well for conics. These notations can be extremely useful in simplifying calculations in coordinate geometry problems like your question.
A: A simpler observation is to note that the coordinate of $P$ is $(a \cos 2\theta, a \sin 2\theta)$, since the central angle that $OP$ makes with the positive $x$-axis is twice the corresponding inscribed angle $\angle PAO$.
Moreover, because $\triangle AOP$ is isosceles, the midpoint $D = \frac{a}{2}(-1 + \cos 2\theta, \sin 2\theta)$ of $AP$ is the foot of the altitude $DO$, hence $\triangle AOD$ implies $AD = a \cos \theta$.
But since $BD = AD$, it follows that $$\frac{a}{2} (1 - \cos 2\theta) = a \cos \theta = a \sqrt{\frac{1 + \cos 2\theta}{2}}.$$  Letting $z = \cos 2\theta$, we obtain a quadratic in $z$ after cancelling $a$:
$$(1-z)^2 = 2 (1 + z),$$ or $$0 = z^2 - 4z - 1,$$ hence $\cos 2\theta \in \left\{ 2 \pm \sqrt{5} \right\}$.  Since only one of these roots has magnitude not exceeding $1$, we obtain $\cos 2\theta = 2 - \sqrt{5}$ as claimed.
A: The green circle is the given circle defined by you. Let $K$ be the center of a circle through $A$ and tangent to the $y-\text{axis}$ at $J$. This is not necessarily your circle $C$. Let these two circles meet at $A$ and $L$, and let $M$ be the midpoint of common chord $AL$.

Now, suppose point $J$ moves freely along the $y-\text{axis}$. As $J$ travels, point $K$ is equidistant from point $A$ and the $y-\text{axis}$. The locus of $K$ is the parabola having focus $A$ and the $y-\text{axis}$ as directrix. Locus of $K$:
$y^2=-2a(x+\frac{a}{2})$
Again with point $J$ traveling, point $L$ traces circle $O$, while $A$ is stationary, and $M$ is the midpoint of $AL$. The locus of $M$ is the circle having diameter $AO$. Locus of $M$:
$x(x+a) + y^2 = 0$
The center of your circle $C$ must lie on both of these loci. Solve the system of equations. That gives you the coordinates of the circle center (two solutions). The rest should fall into place from there.
