Hint: A tangent of a circle is a line that touches the circle exactly at one point. In the question it is given that the circles are exactly having two common tangents. This is only possible when the two circles are intersecting at two distinct points as shown below.
Two circles will be intersecting if the distance between the centers of two circles will be less than or equal to the sum of their radii. Using this logic we will derive a relation between the radii of the given two circles and find the number of values of $n$.
Formula used:
1. The standard equation of the circle is $(x-h)^2+(y-k)^2=r^2$, where $(h,k)$ is the center of the circle and $r$ is the radius of the circle.
2. The general equation of the circle is $x^2+y^2+2gx+2fy+c=0$ with center at $(-g,-f)$ and the radius is $\sqrt{g^2+f^2-c}$.
3. Distance between two points $(x_1, y_1)$ and $(x_2,y_2)$ is $\sqrt{(x_2 - x_1)^2+(y_2 -y_1)^2}$.
Complete step by step solution:
The given circle equations are $x^2+y^2=9$ and $x^2+y^2-8x-6y+n^2=0, \, n \in Z$.
Let’s take the first circle $x^2+y^2=9$ and let the radius of this circle be $r_1$ and center be $C_1$.
Comparing this circle with standard equation of the circle i.e., $(x-h)^2+(y-k)^2=r^2$ we will get,
$(x-0)^2+(y-0)^2=3^2$, here $h=0,k=0$ and $r=3$
Then we get, Center $(C_1)$ $=(0,0)$ .......................... (i)
and the radius $r_1= 3$ ....................(1)
Let’s take the second circle $x^2+y^2-8x-6y+n^2=0$, and let $r_2$ be the radius and $C_2$ be the center of this circle.
Comparing this equation with the general equation of the circle that is $x^2+y^2+2gx+2fy+c=0$, we get
$x^2+y^2+2(-4)x+2(-3)y+(n^2)=0$, here $g=-4, h=-4$ and $c=n^2$
The center coordinates are $C_2=(4,3)$ ...............................(ii)
and the radius $r_2=\sqrt{(-4)^2+(-3)^2-n^2}$
$\Rightarrow r_2 = \sqrt{4^2+3^2-n^2}$
$\Rightarrow r_2= \sqrt{16+9-n^2}$
On simplification,
We get $ r_2= \sqrt{25-n^2}$ ........................ (2)
The value inside the square root must be greater than zero because radius is a measure of distance which is always positive.
$\Rightarrow \sqrt{25-n^2}>0$
$25>n^2$
This implies that
$n^2<5^2$
This will give us the condition
$-5$<$n$<$5$ ................................ (3)
Note that the above condition on $n$ is to satisfy the circle equation $x^2+y^2-8x-6y+n^2=0$.
Now, the given question says that the circles have exactly two common tangents. This means that the sum of their radii should be less than the distance between the centers of two circles.
Let $d$ be the distance between the centers of two circles.
So, from equations (i) $C_1= (0,0)$ and (ii) $C_2=(4,3)$ we can find $d$ value using distance formula
$d=\sqrt{(4-0)^2+(3-0)^2}$
$\Rightarrow d=\sqrt{16+9}$
On simplifying the value inside the square root, we get
$d=\sqrt{25}$
This implies that
$d=5$ -(4)
To get the required condition,
$r_1+r_2>d$
substituting $r_1$, $r_2$ and $d$ values from equation (1), (2) and (4)
$3+ \sqrt{25-n^2}> 5$
$\Rightarrow \sqrt{25-n^2}>2$
Squaring on both sides, we get
$25-n^2>4$
On simplification,
$-n^2>-21$
$\Rightarrow n^2<21$
This implies that $-\sqrt{21} < n < \sqrt{21}$
The value of $\sqrt{21}$ is approximately $4.58$.
$-4.58 < n < +4.58$ and given $n \in Z$.
This means, $n$ will only take integer values.
$-4 \le n \le +4$. ($n$ can be any integer value in between $-4$ and $+4$ including them).
Therefore, all the possible $n$ values are
$n= -4,-3,-2,-1,0,1,2,3,4$.
We got $9$ possible $n$ values under the given conditions.
$\therefore$ If the two circles $x^{2}+y^{2}=9$ and $x^{2}+y^{2}-8x-6y+n^2=0, n \in Z$ have exactly two common tangents, then the number of possible values of $n$ is $9$. So, option (C) is correct.
Note:
1. If two circles are intersecting exactly at one point, they will have three common tangents. In this case the distance between the centers of two circles will be exactly equal to the sum of their radii.
2. If two circles are not intersecting, they will have four common tangents.