Circle and line intersections
Circle and line intersections
Circle and line intersections · count,x₁,y₁,[x₂],[y₂]
- 213 bytes
- COMP mode
Worked examples
Example 1
A circular boundary has equation x²+y²=25, and a straight path follows y=3. Which option gives all points where the path crosses the boundary? Give exact coordinates.
Answer
Standard solution (without a calculator)
- Substitute the line: Every common point has y=3, so x²+3²=25.
- Solve for x: x²=25−9=16, giving x=−4 or x=4.
- Form both points: Pair each x with y=3 to obtain (−4,3) and (4,3). Each gives x²+y²=16+9=25.
- Select the answer: There are two distinct intersections, so option B is correct. The coordinates are exact; no rounding is needed.
Example 2
A circle has equation (x−1)²+(y+2)²=9. Prove that the straight line x=4 is tangent to the circle and find the exact coordinates of the point of contact.
Answer
Standard solution (without a calculator)
- Read the circle: The centre is O(1,−2) and the radius is r=√9=3.
- Compare distance and radius: The perpendicular distance from O to the vertical line x=4 is |1−4|=3=r. Therefore the line is tangent.
- Find the contact point: Substitute x=4: (4−1)²+(y+2)²=9, hence 9+(y+2)²=9 and y=−2.
- Conclude: The only common point is (4,−2), the foot of the perpendicular from O. All values are exact.
Example 3
A circle C is given by 2x²+2y²−4x+8y−8=0 and a straight line L by 3x+4y+27=0. Write C in centre-radius form, then determine with exact working whether C and L intersect.
Answer
Standard solution (without a calculator)
- Normalize the equation: Divide by 2 to get x²+y²−2x+4y−4=0.
- Complete the square: (x−1)²−1+(y+2)²−4−4=0, so (x−1)²+(y+2)²=9. Thus O=(1,−2) and r=3.
- Find the distance: d=|3(1)+4(−2)+27|/√(3²+4²)=|3−8+27|/5=22/5.
- Classify: 22/5>3 because 22>15. The whole line lies outside the circle, so there is no intersection.
When to use it
Compare the distance from a circle centre to Ax+By+C=0 with the radius, then locate the intersection points. The circle may be supplied in centre form or as D(x²+y²)+Xx+Yy+M=0.
Enter the circle and line
- At D?, enter 0 for centre form; D is reset to 0, so a blank EXE also selects it. Then X? = centre h, Y? = centre k, M? = r², not r. For general form enter nonzero D, then the coefficients X, Y and M in D(x²+y²)+Xx+Yy+M=0.
- Finally enter A?, B?, C? for Ax+By+C=0. For y=3 use 0,1,−3; for x=4 use 1,0,−4. Coordinates and radius must use the same length unit; r² uses its square.
Read the intersection count
- A first result of 2 is followed by x₁,y₁,x₂,y₂; 1 is followed by x₁,y₁ only. Press EXE at each Disp pause. Pair consecutive x and y values; the two-point order need not be increasing x.
- A single 0 means no intersection. A single −1 means a nonpositive squared radius or A=B=0; it is not an intersection coordinate.
Question types
- Original HKDSE Mathematics Compulsory Part practice: substitute a horizontal or vertical line, prove tangency, or compare a general circle with a line.
Before you start
- Use COMP / Deg and an empty P1 with 213 bytes available; P1–P4 share 680 bytes. No trigonometry is used. A, B, C, D, X, Y, M and Ans are overwritten or updated.
- The general circle must have equal x² and y² coefficients and no xy term. Divide or rearrange the equation first if necessary; r² must be strictly positive.
- The line must have A²+B²>0. The program treats an infinite line, not a segment or ray; check any endpoint restrictions yourself.
- Only the first D input has a safe blank default. Re-enter X,Y,M,A,B,C every run, including zeros; blank EXE retains stored values that the previous run may have changed.
- Near tangency, the program sets its working M to zero if |M|<10⁻¹²C² after scaling. A very small positive or negative separation can therefore be classified as tangency. Use exact algebra for a proof.
- Extreme magnitudes and subtraction of nearly equal quantities can lose precision or cause Math ERROR. Internal precision is about 15 digits and the LCD shows about 10; displayed decimals are approximations.
Checking access…