Coordinate geometry and circles

 (This is Glen.)

As you may have noticed from my previous posts, my go-to method for approaching geometry problems is bashing, normally with coordinates. Anyone who's tried to bash a problem (especially with coordinates) would have probably found out the hard way that circles generally lead to trouble, but years of bashing have led me to devise some tricks to get around this. I'll be writing about them below, along with, as far as possible, some examples which I remember bashing. I'm not typing out solutions for the sake of my sanity, and besides, I think there is value in actually working through the algebra. Instead, I'm just going to sketch an approach which I think is the most efficient.

Introduction

Bashing apologia

Before I get lynched by the Synthetic Mafia, I should probably provide some justification for this post. Why bash? As a cynical member of the Synthetic Mafia might tell you, it's what immoral people do when they fail in thinking about a problem geometrically. It lets you solve a problem without truly grasping what it's about; it's cheating. I'd like to provide some counterarguments to this mindset.

At this year's IMO, I was talking to Dylan and he asked me why I liked bashing so much. I replied, "It's the first time in your life that you see algebra and geometry talking to each other." Bashing, in essence, is the following process: a geometry problem has certain conditions, which may be translated into algebraic equations. You want to prove some other statement, which may also be translated into an algebraic equations. You then want to rearrange your known equations to prove the new equation. You've converted a problem about geometry to a problem about algebra. Sure, maybe this new problem isn't as nice-looking, but it also gives you a new way to look at the original problem. For example, given a certain set of geometric conditions, what is the set of things we can prove from it? This doesn't really make sense geometrically, but it does algebraically. Suppose we have a bunch of equations of the form Pi(x1,,xn)=0P_i(x_1,\ldots, x_n) = 0, where the PiP_i are polynomials. What is the set of polynomial equations that you can deduce must hold? Well, you can add equations together, multiply them by arbitary polynomials, and — less obviously — if P2Q=0P^2Q = 0, then PQ=0PQ = 0. Applying these operations, you end up with the radical of the ideal generated by your starting polynomials. Ideas like this and more are what you'd encounter in a first course in algebraic geometry; this is one of the myriad ways in higher math in which algebra and geometry (or topology) are intrinsically related.

But maybe you care more about Olympiad geometry. Even in this context, thinking algebraically lets you extend geometric concepts to configurations to which they otherwise don't make sense. For example, where do two concentric circles intersect? What's the length of the tangent line connecting nested circles? What's the cross ratio of points that aren't concyclic or collinear? Algebra provides answers to classical problems: Why can't we trisect an angle with a ruler and compass? (In fact, what is the set of points we can draw with a ruler and compass?) Here's an interesting one: Why can't you deduce Pappus' Theorem from Desargues' Theorem? One might say that an algebraic approach to a problem circumvents having to understand it geometrically, but on the flipside, can one truly understand geometry without algebra?

Let's step away from philosophy and move to a more practical standpoint. Bashing isn't just some mindless method that works without you having to think; on the contrary, it requires skill, and one might even call it an art. I don't just mean the skill needed to perform algebraic manipulations quickly and accurately, but also the skill required in conceiving a bash. The chance of success and time taken (if successful) can vary greatly depending on how a bash is set up, and the route one takes to compute the necessary points and relations. I remember talking to someone who graded IMO 2024/4, who said that there were two main successful approaches to complex-bashing it. One approach took the unit circle to be the incircle, and the other took it to be the circumcircle. The resulting bash for one method was several times longer than the other. (Which is which? I'll leave you to figure that out.) Finding an optimal bashing route is a puzzle in itself: Given a certain set of operations (intersecting lines, dropping perpendiculars, etc.), which route to a solution has the least algebraic complexity? This can be tricky to determine, and very much appeals to the combinatorial part of my brain. Bashing shouldn't be a source of shame, unless your bash is five times longer than it needs to be. (This is the purpose of this post, to help you avoid this tragic scenario.)

Bashing introduction

If you're completely unfamiliar with bashing, here's a short set of notes I wrote back in the day: tinyurl.com/synthsucks. (There are some minor things that I would like to change, but that's a task for another day. I might redo it in the form of a blog post at some point.) Section 3 overlaps somewhat with what I'm going to write about below, so you can skip that.

I'll be focusing on coord geom in this post because it's the system I'm most familiar with, and also because I'm hoping that this post will convince you that coord geom isn't as incompatible with circles as traditional wisdom dictates. In fact, I'd go so far as to say that with the methods below, using coord geom for some circle questions might work out better than complex, which has a better circle formula at the expense of expresssions generally being a little more...complex (ba dum tss). Speaking of which, I suspect some of what I write will also be applicable to complex numbers, though I can't say for certain.

Anyway, that's enough waffling. Let's begin.

Getting rid of the circle

Well, duh. The circle does not spark joy, so you try to reframe the question in such a way that it's no longer there. Here's an example:

(APMO 2016/3) Let ABAB and ACAC be two distinct rays not lying on the same line, and let ω\omega be a circle with center OO that is tangent to ray ACAC at EE and ray ABAB at FF. Let RR be a point on segment EFEF. The line through OO parallel to EFEF intersects line ABAB at PP. Let NN be the intersection of lines PRPR and ACAC, and let MM be the intersection of line ABAB and the line through RR parallel to ACAC. Prove that line MNMN is tangent to ω\omega.

I failed this back in the day (sigh). I tried to set ω\omega to be the unit circle but things got out of hand; letting RR be a variable point on EFEF ended up being quite yuck. I was mad at myself when I realised that a simpler approach existed: if you view AEF\triangle AEF as the "main triangle", every point can be constructed just with parallel and perpendicular lines. Here's a walkthrough:

  • Set A(0,1),E(a,0),F(a,0),R(b,0)A(0,1),E(a,0),F(-a,0),R(b,0).
  • Solve for OO: the intersection of the line through EE perpendicular to AEAE and the yy-axis. (Of course, it also lies on the line through FF perpendicular to AFAF, but why use that when you have the yy-axis?) Alternatively, use the fact that AEOFAEOF is cyclic and take the power of point at the origin.
  • Solve for P,M,NP,M,N as defined in the question.
  • Check that d(O,MN)=OEd(O,MN) = OE, e.g. using the distance formula.

This one requires some more thinking:

(CWMI 2017/3) In triangle ABCABC, let DD be a point on BCBC. Let I1I_1 and I2I_2 be the incenters of triangles ABDABD and ACDACD respectively. Let O1O_1 and O2O_2 be the circumcenters of triangles AI1DAI_1D and AI2DAI_2D respectively. Let lines I1O2I_1O_2 and I2O1I_2O_1 meet at PP. Show that PDBCPD\perp BC.

One might be tempted to look at the four circles in the question and run away screaming. However, there are a couple of key observations: Firstly, I1DI2=90\angle I_1DI_2 = 90^{\circ}. Secondly, if we start with I1,I2,O1,O2I_1,I_2,O_1,O_2, then AA is now useless to the problem, and we don't need to find BB and CC exactly; we just need (the gradient of) BCBC. This gives us the following approach:

  • Set D(0,0),I1(a,0),I2(0,b)D(0,0),I_1(a,0),I_2(0,b).
  • Then, O1O_1 has to lie on the perpendicular bisector of I1DI_1D, i.e. x=a2x=\frac{a}2. So let O1(a2,c)O_1\left(\frac{a}2,c\right), and likewise let O2(d,b2)O_2\left(d,\frac{b}2\right).
  • Compute PP as in the question.
  • Line ADAD is the line through DD perpendicular to O1O2O_1O_2; compute its gradient.
  • BCBC is the reflection of ADAD across either axis, so its gradient is the negative of gradient ADAD.
  • Check that PDBCPD\perp BC.

And a final example:

(CHKMO 2014/4) Let ABC\triangle ABC be a scalene triangle, and let DD and EE be points on ABAB and ACAC respectively such that the circumcircles of triangles ACD\triangle ACD and ABE\triangle ABE are tangent to BCBC. Let FF be the intersection point of BCBC and DEDE. Prove that AFAF is perpendicular to the Euler line of ABC\triangle ABC.

This turned out to be not very easy to do synthetically (some of the other people who participated in this are very good at geometry but couldn't solve it under contest conditions), but pretty easy to bash. Here's what I did in the contest:

  • Set A(0,1),B(a,0),C(b,0)A(0,1),B(a,0),C(b,0).
  • Compute the circumcentre OO of ACD\triangle ACD: it lies on the perpendicular bisector of ACAC and the line through CC perpendicular to BCBC (i.e. x=bx=b).
  • Solve for the midpoint of ADAD: drop a perpendicular from the OO to ABAB. In fact, you only need to solve for the xx-coordinate.
  • Reflect AA across midpoint ADAD to get DD.
  • Compute FF', the intersection of BCBC and the line through AA perpendicular to the Euler line (I'd memorised this, but you could easily compute the circumcentre and orthocentre of ABC\triangle ABC).
  • Check that gradient DFDF' is symmetric across a,ba,b.

After we get to DD, the obvious way to proceed is to write down what EE is (by symmetry), then compute FF, and then gradient AFAF. That's not bad, but taking a phantom point FF' instead lets you exploit symmetry even more. You might also want to think about why we only needed one of the coordinates for midpoint ADAD.

Actually, this solution somewhat subconsciously uses the next idea I'm going to write about.

Intersecting a line with a circle (again)

Circles are scary because you have to solve quadratic equations. But what if you...didn't? If you want to intersect a line with a circle and you already know one of the intersection points, this turns out to be fine. (The same goes for the second intersection of two circles; indeed, if you take the difference of their equations, you get the equation of their radical axis, which you can intersect with either circle to get the second intersection.)

Dropping a perpendicular

The first way to do this is to drop a perpendicular from the centre of the circle to the line, and then reflect the known intersection across it. For the intermediate step, you don't even need to find both coordinates: suppose the line is y=mx+cy=mx+c, the known point has xx-coordinate aa, and the foot of the perpendicular has xx-coordinate bb. Then all you have to do is to compute x=2bax=2b-a and plug it into the equation of the line to find yy.

Vieta

The other way to think about it is: you have a quadratic equation (by substituting the equation of the line into the equation of the circle), to which you know one root. The other root can then be found by either one of Vieta's formulas: suppose we have ax2+bx+c=0ax^2 + bx + c = 0 and we know rr is a root. Then, we just need to compute bar-\frac{b}a - r or car\frac{c}{ar}. The latter works better if you already have a nice factorisation of a,ca,c, otherwise the former might be better to compute.

I think both approaches are in general roughly comparable in complexity, so it's really a matter of preference and/or context.

Here's a problem for which I used these ideas:

(ISL 2015 G3) Let ABCABC be a triangle with C=90\angle{C} = 90^{\circ}, and let HH be the foot of the altitude from CC. A point DD is chosen inside the triangle CBHCBH so that CHCH bisects ADAD. Let PP be the intersection point of the lines BDBD and CHCH. Let ω\omega be the semicircle with diameter BDBD that meets the segment CBCB at an interior point. A line through PP is tangent to ω\omega at QQ. Prove that the lines CQCQ and ADAD meet on ω\omega.

This appeared as NTST 2016/5 (i.e. Day 1 Q1), and I thought my hopes of making the IMO team were over until I realised that it was more bashable than it seemed initially. The way the question is phrased (why use semicircles instead of circles?) suggests some horrible configuration issue. Configuration issues mean choosing a root, which means having to actually solve a quadratic equation, which means square roots. Indeed, if we tried to bash the points in the order they are given, we'd run into some trouble at the step in which we construct QQ.

However, if we remember that intersecting lines with circles is okay as long as we know one of the intersections, there's a way to redraw the diagram to avoid such issues: Let's say we have A,B,C,H,D,PA,B,C,H,D,P as in the question. Then, instead of proceeding to find QQ, we can intersect ADAD with ω\omega (again) at XX, and then intersect CXCX with ω\omega (again) to get QQ'. We're left with showing that PQPQ' is tangent to ω\omega, which is something we can do with just lines and gradients.

Here's what I did during the NTST (at least, as far as I can recall):

  • Set A(1,0),C(0,a),B(a2,0)A(-1,0),C(0,a),B(a^2,0), so H(0,0)H(0,0).
  • Then, the locus of DD is the line x=1x=1, so set D(1,b)D(1,b).
  • Solve for PP by intersecting BDBD with the yy-axis.
  • The equation for ω\omega is (xa2)(x1)+y(yb)=0(x-a^2)(x-1) + y(y-b) = 0 (it's the locus of points ZZ such that ZDZBZD\perp ZB).
  • Using Vieta, solve for XX, the second intersection of ADAD with ω\omega.
  • Using Vieta again, solve for QQ', the second intersection of CXCX with ω\omega.
  • Let RR be the foot of perpendicular from QQ onto BDBD. Then (P,R;B,D)=1(P,R;B,D)=-1, so DRRB=DPPB=1a2\frac{DR}{RB} = -\frac{DP}{PB} = \frac{1}{a^2}, which lets us compute RR directly from the coordinates of BB and DD.
  • Check that QRBDQ'R\perp BD.

In this case, I used the Vieta approach because the equation of the circle ω\omega was nice, but I'm sure the other way would have been fine as well. I'm not sure how much better (if at all) the final trick with the harmonics is compared to just showing that CQCQ' is perpendicular to the line through QQ' and midpoint BDBD; it's probably just a slight improvement. I suppose it's preferable because you use QQ' only once instead of twice, and we know that gradient QRQ'R has to cancel to something nice (since gradient BDBD is nice). A final note: it's tempting (given the  C=90\angle{C} = 90^{\circ} condition) to just set CC to be the origin, but then everything becomes worse (just think about H,D,PH,D,P). Be careful when setting up coordinates!

This method ends up being useful in setting up extra points on the circumcircle, which we'll see below.

Points on circumcircles

In my usual setup for triangles (setting the vertices to be A(0,1),B(a,0),C(b,0)A(0,1),B(a,0),C(b,0)), the circumcentre and circumcircle turn out to be fairly nice: we have O(a+b2,1+ab2)O\left(\frac{a+b}2,\frac{1+ab}2\right) and the circumcircle is (xa+b2)2+(y1+ab2)2=(a2+1)(b2+1)4\left(x - \frac{a+b}2\right)^2 + \left(y - \frac{1+ab}2\right)^2 = \frac{(a^2+1)(b^2+1)}4 (verify this!). But what if we want to construct an arbitrary point PP on the circumcircle?

Variable line

One way to do this is to use the trick above. Let APAP be the line y=mx+1y=mx+1, and then intersect it again with the circumcircle to get PP. Here's a problem for which I used this trick:

(SMO Open 2019/1) In the acute-angled triangle ABCABC with circumcircle ω\omega and orthocenter HH, points DD and EE are the feet of the perpendiculars from AA onto BCBC and from BB onto ACAC respecively. Let PP be a point on the minor arc BCBC of ω\omega . Points MM and NN are the  feet of the perpendiculars from PP onto lines BCBC and ACAC respectively. Let PHPH and MNMN intersect at RR. Prove that DMR=MDR\angle DMR=\angle MDR.

I bashed this while invigilating the paper. Apparently this is a well-known lemma about the Simson line, but it wasn't well-known to me. Here's a walkthrough:

  • Set up A,B,C,PA,B,C,P as described above. Then D(0,0)D(0,0).
  • Solve for HH (or pull it out from memory).
  • Find RR', the midpoint of PHPH
  • Find the xx-coordinate of NN by intersecting ACAC with the line through PP perpendicular to ACAC.
  • Intersect MRMR' and ACAC and find the xx-coordinate.
  • Check that these two are equal.

I'm not entirely sure what the fastest way to finish up would be, but this seems like the least evil way to check that RM,ACR'M,AC and the line through PP perpendicular to ACAC are concurrent.

tt-formula

As anyone who knows how to complex bash would tell you, you could just set the circumcentre to be the unit circle. This works great in complex numbers, but...not so well in coordinates. The temptation would be to set things as (cosα,sinα)(\cos \alpha, \sin \alpha) and so on, but that's bad in general: you lose one of the major benefits of coord geom, which is being able to work with polynomials. (When you work with polynomials, if two things are equal, they will look equal. When trigonometric functions are involved, you might have to apply identities.) If you want to do that, you might as well just trigo-bash directly, which can probably be done with nicer expressions than doing a trigo-coord hybrid.

Instead, a nice trick would be to use the tt-formulas: we can let points be (1a21+a2,2a1+a2)\left(\frac{1-a^2}{1+a^2},\frac{2a}{1+a^2}\right) and so on, and we're back in polynomial-land. The example that stands out to me is:

(ISL 2018 G7) Let OO be the circumcentre, and Ω\Omega be the circumcircle of an acute-angled triangle ABCABC. Let PP be an arbitrary point on Ω\Omega, distinct from AA, BB, CC, and their antipodes in Ω\Omega. Denote the circumcentres of the triangles AOPAOP, BOPBOP, and COPCOP by OAO_A, OBO_B, and OCO_C, respectively. The lines A\ell_A, B\ell_B, C\ell_C perpendicular to BCBC, CACA, and ABAB pass through OAO_A, OBO_B, and OCO_C, respectively. Prove that the circumcircle of triangle formed by A\ell_A, B\ell_B, and C\ell_C is tangent to the line OPOP.

I remember test-solving this while preparing for June training in 2019, and it took me 15 minutes, which is many times shorter than one would expect a G7 to take. Apparently, the synthetic solution wasn't especially hard either (though certainly harder than the bash), so I'm not sure what this was doing as a G7. Get your act together, 2018 PSC.

  • Let O(0,0),P(1,0),A(1a21+a2,2a1+a2)O(0,0), P(1,0), A\left(\frac{1-a^2}{1+a^2},\frac{2a}{1+a^2}\right), and B,CB,C similarly.
  • The magic of tt-formula gives OA(12,a2)O_A\left(\frac12,\frac{a}2\right).
  • Find gradient BCBC, and so gradient A\ell_A.
  • To get rid of all the 12\frac12s in the xx-coordinate, translate all points left by 12\frac12.
  • Find the equation for A\ell_A (and so B,C\ell_B,\ell_C by symmetry) and so XAX_A.
  • Notice that the numerator of the yy-coordinate of XAX_A is symmetric across a,b,ca,b,c. Translate the diagram horizontally so that the xx-coordinate of XAX_A is divisible by this polynomial.
  • Apply a suitable homothety to get rid of this factor. How does this relate to our tt-formulas?

I was so annoyed by this problem that I bothered to write a solution on AoPS, if you want more details. Evan Chen has also posted a complex bash but my solution is faster.

The tt-formula trick also happens to be one of the better ways to deal with incircles.

Incentres

Incircles are kind of annoying because we can't do angle bisectors (well, not more than one if you don't want to have square roots).

Incircles as the unit circle

The conventional wisdom from complex bashing is to set the incircle as the unit circle, and this generally works for coordinates as well. Here's a picture, because I don't want to type everything out.

Sure, you have to solve for the last vertex of the triangle, but that's not quite so bad, is it? By the way, the exact same setup works for excentres as well.

The following is a pretty standard harmonic question, but I can't really think of anything else.

(CHKMO 2018/3) The incircle of ABC\triangle{ABC}, with incentre II, meets BC,CABC, CA, and ABAB at D,ED,E, and FF, respectively. The line EFEF cuts the lines BI,CI,BCBI,CI, BC, and DIDI at K,L,MK,L,M, and QQ, respectively. The line through the midpoint of CLCL and MM meets CKCK at PP.

(a) Determine BKC\angle{BKC}

(b) Show that the lines PQPQ and CLCL are parallel.

 Here's an outline:

  • Set up as above (with AA being the last vertex which we don't actually have to solve for).
  • Find the equation of EFEF.
  • Solve for K=EFBIK = EF\cap BI.
  • (Spoiler for part (a)) Check that BKKCBK\perp KC.
  • Solve for M=EFBCM=EF\cap BC (or note that (M,D;B,C)=1(M,D;B,C)=-1 but who needs harmonics really) and for Q=EFDIQ = EF\cap DI.
  • Find the midpoint of CLCL, and hence the gradient of MPMP.
  • Let PP' be on CKCK such that PQCLP'Q\parallel CL. Solve for PP'.
  • Find gradient MPMP', and hence get P=PP=P'.

Incentres as an orthocentre

A trick people don't really know about is to let the excentres be the "main triangle", and then the incentre becomes the orthocentre, and then ABC\triangle ABC is its pedal triangle. This makes the circumcentre become the nine-point centre, which is still pretty nice. This method is good when the question also includes an excentre (or better, all three). Here's an example:

(ISL 2016 G7) Let II be the incentre of a non-equilateral triangle ABCABC, IAI_A be the AA-excentre, IAI'_A be the reflection of IAI_A in BCBC, and A\ell_A be the reflection of line AIAAI'_A in AIAI. Define points IBI_B, IBI'_B and line B\ell_B analogously. Let PP be the intersection point of A\ell_A and B\ell_B.

(a) Prove that PP lies on line OIOI where OO is the circumcentre of triangle ABCABC.

(b) Let one of the tangents from PP to the incircle of triangle ABCABC meet the circumcircle at points XX and YY. Show that XIY=120\angle XIY = 120^{\circ}.

Some backstory: IMO 2016 Day 1 was GCN, so we were expecting Day 2 to be something like NAG. I figured that my best chance of being able to solve a Q6 geometry problem was to just go all-in and bash it, and so I went into Day 2 planning to do that if I solved the first two problems. As it turned out, Q6 ended up being combi, which was a pleasant surprise that worked out well for me. But after the shortlist came out, I did try to bash this to see what would have happened if G7 had come out instead of C7. (I think I'd have managed to get through part (a) but I'm not sure if I would have finished (b) in time.) Warning: this bash is pretty long.

Part (a) is fairly standard, if very tedious:

  • Let IA(a,0),IB(b,0),IC(0,1)I_A(a,0),I_B(b,0),I_C(0,1), so I(0,ab),C(0,0)I(0,-ab),C(0,0) and A(b(ab+1)b2+1,b(ba)b2+1)A\left(\frac{b(ab+1)}{b^2+1},\frac{b(b-a)}{b^2+1}\right) and BB is similar. OIOI is now the Euler line.
  • Reflect IAI_A across BCBC, and then across AIAI to get IAI_A'' (this sounds simple, but in reality is pretty bad).
  • Intersect AIAAI_A'' (i.e. A\ell_A) with the Euler line to get PP'.
  • Check that PP' is symmetric across a,ba,b, so P=PP=P'. This solves (a).

I can't remember if this is exactly what I did. I might have instead intersected CICCI_C'' with the Euler line to get PP'' and checked that this is collinear with AA and IAI_A''. (Finding PP in this way is actually pretty nice — I just tried.)

Part (b), on the other hand, requires some ingenuity. Notice that the denominators of PP can be written as (3ab+1)2+(a+b)2(3ab+1)^2 + (a+b)^2, which is very suspicious (it's closely related to distances of points on OIOI!). Moreover, once we get to this point, all we really need to care about are P,O,IP,O,I (which are collinear!) as well as the circumcircle and the incircle. We also know that OI2=R(R2r)OI^2 = R(R-2r), so the inradius can be expressed in terms of RR and OIOI. On the other hand, given OIOI and RR, there are only finitely many PP which can satisfy (b), so we need PP to depend on OIOI and RR somehow. Now, if we take the difference between the xx-coordinate of PP and the xx-coordinate of OO (which is a+b4\frac{a+b}4), the numerator looks suspiciously like the numerator of R2R^2...

Combining all the above information, you can notice that OIOP=R2OI \cdot OP = R^2 (lengths directed). (This took me quite a while to notice when I first did it.) Now, we can do (b) by setting a new set of coordinates:

  • Let O(0,0),I(1,0),P(R2,0)O(0,0),I(1,0),P(R^2,0); let the circumcircle be x2+y2=R2x^2+y^2=R^2, and the incircle be (x1)2+y2=(R212R)2(x-1)^2+y^2 = \left(\frac{R^2-1}{2R}\right)^2. WLOG let X,YX,Y be above the xx-axis.
  • Let XYXY be tangent to the incircle at ZZ and drop a perpendicular from ZZ to meet xx-axis at ZZ'. Using PZZPIZ\triangle PZZ' \sim \triangle PIZ, find the gradient of XYXY and hence the equation for XYXY. This looks terrifying because there's a square root, but it vanishes in the next step.
  • Plug that into the equation for the circumcircle to get a quadratic. Let its roots be α,β\alpha,\beta.
  • In terms of α,β\alpha,\beta, find the gradient of XIXI, and so YIYI by symmetry (call these m,mm, m').
  • Using Vieta on α,β\alpha,\beta, prove that mm1+mm=3\frac{\lvert m-m' \rvert}{1 + mm'} = -\sqrt{3}.

Above, I wrote about what happens when you intersect a line with a circle and you already know one of the points. In situations like this when you know neither of the points but the question is symmetric across both of them, you don't have to solve for the points exactly. You can get around this by applying Vieta instead. (If the question wants you to choose a root by fixing a configuration, then this is probably not the way to go.)

By the way, Evan Chen has a pretty nice barycentric bash for this on AoPS. (The part (a) in particular is a lot better.) On the other hand, it's worth noting that we're done from OIOP=R2OI \cdot OP = R^2 immediately using his lemma, so in a way this coord geom approach gives more.

Incentres from barycentric coordinates

The formula for the incentre in barycentric coordinates is quite nice: it's (a:b:c)(a:b:c). So in theory, you can use the standard setup for triangles and then write down what the incentre is as a weighted average of the three vertices. This is of course not great because you get square roots. I have used this trick exactly once in my life and it was for this problem. (Presumably, it would have been better to just bash this directly with barycentric coordinates.) I'm not writing a walkthrough for this; you just plug in the formula for the incentre and bash gradients.

Power of a point

I somewhat alluded to this in the 2016 G7 solution, but I should probably make it explicit. If you have three points A,B,CA,B,C on a line y=mx+by = mx+b, say with xx-coordinates a,b,ca,b,c respectively, then the expression for ABACAB\cdot AC is actually not bad: it's (ab)(ac)(m2+1)(a-b)(a-c)(m^2+1). Note the lack of square roots.

This gives us a fairly decent way to deal with cyclic quadrilaterals while also getting the intersection of their diagonals for free: Let ABCDABCD be a cyclic quadrilateral and X=ACBDX = AC\cap BD. Then we can set X(0,0),A(a,0),C(b,0),B(1,c),D(acb2+1,abcb2+1)X(0,0),A(a,0),C(b,0),B(1,c),D\left(\frac{ac}{b^2+1},\frac{abc}{b^2+1}\right). One could modify this accordingly if one cared about, say, ABCDAB\cap CD instead of XX.

Antipodes

I'll start with the example.

(SMO Open 2014/1) The quadrilateral ABCDABCD is inscribed in a circle which has diameter BDBD. Points AA' and BB' are symmetric to AA and BB with respect to the lines BDBD and ACAC respectively. If the lines AC,BDA'C, BD intersect at PP and AC,BDAC,B'D intersect at QQ, prove that PQPQ is perpendicular to ACAC.

The temptation for this is, especially if you have vaguely learnt about complex bashing, to set the circle to be the unit circle and B,DB,D to be (±1,0)(\pm 1, 0). But then you'd either get square roots or have to use the tt-formula (which ends up working, but isn't optimal).

Instead, a better way to approach this would be to set A(a,0),B(0,1),C(b,0)A(a,0),B(0,1),C(b,0), and then D(a+b,ab)D(a+b,ab). Everything else follows nicely.

I still haven't forgiven myself for failing this in the contest.

Inversion

The last trick I'll talk about is inversion. The idea is simple: inversion converts circles into lines, so if you can do it in such a way that makes the circles disappear (or at least, more susceptible to one of the techniques above), then you can bash the new diagram. This was actually the motivation behind this whole post: this worked on not one, but two NTST problems this year.

Let's start with Day 1 Q3:

(ISL 2023 G6) Let ABCABC be an acute-angled triangle with circumcircle ω\omega. A circle Γ\Gamma is internally tangent to ω\omega at AA and also tangent to BCBC at DD. Let ABAB and ACAC intersect Γ\Gamma at PP and QQ respectively. Let MM and NN be points on line BCBC such that BB is the midpoint of DMDM and CC is the midpoint of DNDN. Lines MPMP and NQNQ meet at KK and intersect Γ\Gamma again at II and JJ respectively. The ray KAKA meets the circumcircle of triangle IJKIJK again at XKX\neq K

Prove that BXP=CXQ\angle BXP = \angle CXQ.

 Intuitively, you want to try to inverflect at AA, since there are two circles tangent there. But this turns out to be pretty yucky — your midpoint conditions become horrible symmedians, for example. But you could also realise that almost all the points lie on either Γ\Gamma or BCBC, which conveniently meet at DD. Inverting about DD, we get two parallel lines, and a lot of cyclic trapeziums, i.e. isosceles trapeziums. We then get most of the points for free:


Then, this is what I did:

  • Solve for the circumcentre OO of PMDIP'M'DI'. (The xx-coordinate is free.)
  • Notice that APAI=AJAQA'P'\cdot A'I' = A'J' \cdot A'Q', so A,D,KA',D,K' collinear.
  • Find KK' by dropping a perpendicular from OO to ADA'D and reflecting DD across it.
  • Let X(dy,y)X'(dy,y). Solve AXAK=AIAJA'X'\cdot A'K' = A'I'\cdot A'J' (directed lengths) to get y=12y=\frac12.
  • Realise that XX' is the centre of the parallelogram BCPQB'C'P'Q', so we're done, but also, there should be a synthetic solution.
  • Find a synthetic solution and sigh. (Here's one: AKAD=AIAJAKAPAIAK=AJAP=12\frac{A'K'}{A'D} = \frac{\frac{A'I'\cdot A'J'}{A'K'}}{\frac{A'P'\cdot A'I'}{A'K'}} = \frac{A'J'}{A'P'} = \frac12. I just realised that this is an application of Reim. I'm not good at synthetic, okay?)

So that was nice, if somewhat unsatisfying, because I felt stupid for not spotting the synthetic finish. (By the way, even without the observation that AA' lies on the radical axis, the longer route which goes through intersecting (PMDI)(P'M'DI') and (QNDJ)(Q'N'DJ') to find KK' works pretty nicely as well. Really, you can't go wrong because all the points are so nice.) I'm not sure why all the solutions on AoPS are so long but it makes me feel a little better about myself.

Anyway, this then appeared as Day 2 Q2:

(ISL 2023 G5) Let ABCABC be an acute-angled triangle with circumcircle ω\omega and circumcentre OO. Points DBD\neq B and ECE\neq C lie on ω\omega such that BDACBD\perp AC and CEABCE\perp AB. Let COCO meet ABAB at XX, and BOBO meet ACAC at YY.

Prove that the circumcircles of triangles BXDBXD and CYECYE have an intersection lie on line AOAO.

This time, inverflection actually gives something nice. The condition BDACBD\perp AC becomes ABAB being the diameter of (ACD)(ACD'), which is very much bashable.

  • Set A(0,1),B(a,0),C(b,0)A(0,1),B(a,0),C(b,0), so O(1,0)O'(-1,0).
  • Find the xx-coordinate of the centre of (ACD)(ACD'): this is the intersection of ABAB and the perpendicular bisector of ACAC.
  • Then, take 2xc2x-c to find DD'.
  • Find the centre of (AOB)(AO'B) by intersecting BCBC with midpoint ABAB.
  • Drop a perpendicular to ACAC and reflect AA across it to get XX'.
  • Solve for the centre of (CXD)(CX'D') (the xx-coordinate is free).
  • Put x=0x=0 into the equation of (CXD)(CX'D') to get a quadratic in yy (the radius of (CXD)(CX'D') can be obtained by calculating the distance from CC to the circumcentre).
  • Have faith that the answer is nice and guess the factorisation. The constant coefficient is fairly nice, so this isn't too hard. If it helps, you expect one of the factors to be symmetric across a,ba,b. Spoiler: by some magic, one root turns out to correspond to the orthocentre!

Of course, if you fail to guess, the quadratic formula should do the job. I was very amused when "invert and coord geom" worked for the second day in a row.

About the "have faith that the answer is nice" bit: this is actually a lot more than faith, if you have the algebraic intuition. When you get to this point, you'll realise that the quadratic you're solving isn't symmetric across a,ba,b. If this doesn't factorise nicely (i.e. if the discriminant isn't a perfect square), then you'd expect the roots to look like f(a,b)±g(a,b)f(a,b) \pm \sqrt{g(a,b)}, where f,gf,g are rational functions (ratios of polynomials). But then any "nice" quadratic (quadratics whose coefficients are polynomials) which has one of these roots as a root must also have the other root. (Think about polynomials with integer coefficients whose roots aren't rational — it's analogous.) That's a contradiction, since the other quadratic can't be the same quadratic (as it's not symmetric). So the only possible situation is that both polynomials factorise, and have a root in common.

Great, now I can finally bin my rough work for these two problems that has just been sitting in a pile in my room occupying space.

Conclusion

I hope I've demonstrated that bashing is more than just mindless computation: putting thought into optimising a bashing path goes a long way in making a bash shorter and hence less time-consuming and less prone to error. This can often be the difference between a successful bash and a waste of 3 hours in a contest. It can be hard to judge whether how feasible a bash is, and the only thing that really helps with that is experience. So: practise bashing. Try the problems above, using the walkthroughs above and/or using your own approaches. Get a feeling for what method is faster than another, and in what situations. Figure out when you'd expect certain things to cancel, or factorise. Learn how to recognise when something goes wrong, and how to troubleshoot it. Bash away, and above all, have fun.

Comments

Popular posts from this blog

SMO Open 2024 ??% Speedrun

Musings about the IMO