Jekyll2021-02-27T19:00:01+00:00https://www.flyingcoloursmaths.co.uk/feed.xmlFlying Colours MathsFlying Colours Maths helps make sense of maths at A-level and beyond.Ask Uncle Colin - A Tangential Proof2021-02-24T00:00:00+00:002021-02-24T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/ask-uncle-colin-a-tangential-proof<blockquote>
<p>Dear Uncle Colin,</p>
<p>I have figured out a construction of a tangent line to a circle, but haven’t been able to prove that it works. Can you help? Here’s the protocol:</p>
<ul>
<li>Pick two points on the circle, A and B</li>
<li>Draw a circle centred on B, passing through A</li>
<li>This circle also intersects the original circle at C.</li>
<li>Draw a circle centred on A, passing through C.</li>
<li>This circle also intersects the second circle at D.</li>
<li>Line CD is a tangent to the original circle.</li>
</ul>
<p>- Everyone Understands Circles Like I Do</p>
</blockquote>
<p>Hi, EUCLID, and thanks for your message!</p>
<p><a href="images/tangent.png">Here’s the construction</a>, for everyone following along at home.</p>
<p>My reasoning would be:</p>
<ul>
<li>Let angle AOC be $2x$</li>
<li>Then angle BAC = $x$, because AC is perpendicular to OB and OB bisects angle AOC</li>
<li>Also, angle AOD is $90º - 2x$</li>
<li>Triangle ACD is isosceles (because AC and AD are radii of the same circle), and has AB as a line of symmetry (CD is a chord of a circle with centre B, which passes through A)</li>
<li>So angle BAD is $x$ by symmetry</li>
<li>Angle OAD is $\br{90º-2x} + (x) + (x) = 90º$</li>
<li>So AD is perpendicular to a radius of the original circle, and is therefore a tangent.</li>
</ul>
<p><a href="images/tangent2.png">Here’s what it looks like</a>.</p>
<p>Hope that helps!</p>
<p>- Uncle Colin</p>Dear Uncle Colin, I have figured out a construction of a tangent line to a circle, but haven’t been able to prove that it works. Can you help? Here’s the protocol: Pick two points on the circle, A and B Draw a circle centred on B, passing through A This circle also intersects the original circle at C. Draw a circle centred on A, passing through C. This circle also intersects the second circle at D. Line CD is a tangent to the original circle. - Everyone Understands Circles Like I DoResistors2021-02-22T00:00:00+00:002021-02-22T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/resistors<p>Somewhat embarrassingly, I got this wrong at first:</p>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">This is a beauty! What single resistor is equivalent to this resistor combination? (teachers of physics and A-level students only). If you know the answer, please don’t spoil for those who don’t - I’ll post the answer in a couple of days :) <a href="https://t.co/djmoEwURQW">pic.twitter.com/djmoEwURQW</a></p>— Dr Melville (<span class="citation" data-cites="PhysQuiz">@PhysQuiz</span>) <a href="https://twitter.com/PhysQuiz/status/1235671882839584768?ref_src=twsrc%5Etfw">March 5, 2020</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>(Dammit, Jim, I’m a mathematician, not a physicist.)</p>
<p>Have a go at it yourself, if you’re so inclined; after the line come spoilers.</p>
<hr />
<h3 id="kirchhoff-and-ohm">Kirchhoff and Ohm</h3>
<p>In the bad old days, I used to help out at a Physics homework centre – the work they were doing was largely mechanics, and it gave me a chance to develop some Ninja skills. For electronics problems like this, I ended up with a model that generally worked for me. I’ll share it with you, but I think this is the kind of problem where coming up with your own analogy is more powerful that borrowing someone else’s.</p>
<ul>
<li><strong>Potential</strong> ($V$) is a value that belongs to the junctions between sections of wire. It’s high next to one end of the battery and low at the other. (I tend to think of a circuit a bit like a waterfall, with potential as the height above the ground. It doesn’t make the sums work, but ‘height’ has the same sort of effect as potential does.)</li>
<li><strong>Current</strong> ($I$) is a value that belongs to the bits of wire between junctions, and is a flow: what goes into a junction must equal what comes out. This is Kirchhoff’s law.</li>
<li><strong>Resistance</strong> ($R$) links the difference in potential between two junctions and the current flowing in the wire joining them, and satisfies $V=IR$. This is Ohm’s law.</li>
</ul>
<p>These three things are enough to figure out the problem – and most of the resistance/current/potential problems that cross my path.</p>
<h3 id="this-problem">This problem</h3>
<p>We’re not given a value for the potential difference, so let’s suppose the left-hand junction of this system has a potential of $V$ and the right-hand junction $0$. Also let’s suppose that there’s a current of $I_0$ flowing in from the left end and out at the right end (what goes in must come out. Kirchhoff said that.)</p>
<p>There are two other junctions: let’s call the potential at the junction between the first two resistors $V_{12}$ and the potential at the junction between the second pair $V_{23}$.</p>
<p><em>However</em>, the ends of two resistor-less wires must each be equal, so $V_{23}=V_1$ and $V_{12} = 0$. This makes everything much simpler!</p>
<p>The potential difference across each resistor is $V$, so the current across each resistor is $\frac{V}{R_i}$.</p>
<p>The total current arriving at the right-hand end is therefore $I_0 = V\left(\frac{1}{R_1} + \frac{1}{R_2} + \frac{1}{R_3}\right)$.</p>
<p>Now all we need to do is find the equivalent resistor! We know $R_e = \frac{V}{I_0}$, and we just worked out $I_0$.</p>
<p>$\frac{V}{I_0} = \frac{1}{\frac{1}{R_1} +\frac{1}{R_2} + \frac{1}{R_3}} = \frac{R_1 R_2 R_3}{R_1 + R_2 + R_3}$.</p>
<h3 id="where-i-went-wrong">Where I went wrong</h3>
<p>I made the mistake of assuming the current would only flow left to right – I think the nugget to this problem is realising that the current flows right to left through the middle resistor.</p>
<p>Now I’ve seen the error, it’s obvious, but I couldn’t see it for looking at first.</p>
<hr />
<p>Did you do it the same way? I’d love to hear about your approaches.</p>Somewhat embarrassingly, I got this wrong at first:Ask Uncle Colin: A Thirteenth Root2021-02-17T00:00:00+00:002021-02-17T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/ask-uncle-colin-a-thirteenth-root<blockquote>
<p>Dear Uncle Colin,</p>
<p>What’s the 13th root of 21,982,145,917,308,330,487,013,369? I know it’s an integer.</p>
<p>- Extremely Large Exponent, Perhaps Having A Nice Thirteenth…</p>
</blockquote>
<p>Hi, ELEPHANT, and thanks for your message!</p>
<p>Thirteenth roots are a staple of mental arithmetic contests (<a href="http://myreckonings.com/wordpress/2011/10/05/the-13th-root-of-a-100-digit-number-part-i/">I’m told</a> ), but despite this being apparently a big number, it’s not <em>that</em> big.</p>
<p>It’s a 26-digit number, so it’s smaller than $10^{26}$, which is $100^{13}$ – so the root we’re after is smaller than 100.</p>
<h3 id="the-last-digit">The last digit</h3>
<p>Any odd number raised to the fourth power ends in a 1. As a result, any odd number raised to the twelfth power also ends in a 1, and any odd number raised to the 13th power ends in the same digit as the result. In our case, the number we want ends in a 9.</p>
<h3 id="whoosh"><em>whoosh</em></h3>
<p>Hello, sensei, I’ve been expecting you.</p>
<p>“Curse your fiendish trap! The base ten log of this number is about 25.3, or (26 - 0.7) and a thirteenth of that is 2 - 0.05. Also, $\log(9)$ is 0.95 or so; the root is about 90 and exactly 89.”</p>
<p>Thank you, sensei.</p>
<h3 id="but-we-dont-need-logs">But we don’t need logs</h3>
<p>Thinking modulo 100, and knowing the root ends in a 9, $(10a - 1)^{13}$ is congruent to $(130a - 1)\pmod {100}$, or even $(30a -1)$. I need to solve $30a \equiv 70 \pmod{100}$, and $a=9$ is an obvious answer (and the only one for $a < 10$).</p>
<p>So, $a = 9$ and the root is $90 - 1 = 89$.</p>
<p>Hope that helps!</p>
<p>- Uncle Colin</p>Dear Uncle Colin, What’s the 13th root of 21,982,145,917,308,330,487,013,369? I know it’s an integer. - Extremely Large Exponent, Perhaps Having A Nice Thirteenth…Reflecting on a MAT question2021-02-15T00:00:00+00:002021-02-15T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/reflecting-on-a-mat-question<p>In preparing for a problem-solving session, I came across this lovely problem from the MAT:</p>
<blockquote>
<p>The reflection of point $(1,0)$ in the line $y=mx$ has the coordinates:</p>
<p>A: $\left( \frac{m^2+1}{m^2-1}, \frac{m}{m^2-1}\right)$ B: $(1,m)$ C: $(1-m,m)$ D: $\left( \frac{1-m^2}{1+m^2}, \frac{2m}{1+m^2}\right)$ E: $(1-m^2, m)$</p>
</blockquote>
<p>You might want to have a little think about how you’d approach the question, and I’ll run through three options below the line. Spoilers ahead!</p>
<hr />
<h3 id="elimination-method">Elimination method</h3>
<p>Given a multiple choice question, I quite often try to remove impossible answers before I do anything else. Considering simple cases is a valid strategy!</p>
<p>So, what if $m=0$? The point remains in place. That eliminates option A, which maps to $(-1,0)$.</p>
<p>Another simple case: what if $m$ is very big and positive? Then the reflection will lie near to $(-1,0)$, with a small positive $y$ coordinate. In one stroke, that rules out B, C and E, leaving only D as a possibility!</p>
<p>That’s a perfectly acceptable way to tackle a question in a multiple choice exam. But it’s not the nicest way to tackle it. Let’s look at two alternatives.</p>
<h3 id="matrices">Matrices</h3>
<p>If you know your matrix transformations, this is fairly straightforward: if a line of reflection has the equation $y = x\tan(\theta)$, then the matrix corresponding to it is $\mattwotwo {\cos(2\theta)}{\sin(2\theta)}{-\sin(2\theta)}{\cos(2\theta)}$.</p>
<p>Applying that to $\begin{pmatrix} 1 \\ 0\end{pmatrix}$ gives $\colvectwo {\cos(2\theta)}{-\sin(2\theta)}$.</p>
<p>(Again, D is the only option that can possibly match that for all $\theta$, but suppose we don’t know the answer already.)</p>
<p>Now, we have $m = \tan(\theta)$, and I’m going to go via $\tan(2\theta) = \frac{2m}{1-m^2}$, although other options are available.</p>
<p>Thinking about a triangle with legs of $2m$ and $1-m^2$, the hypotenuse has to be $1 + m^2$, which I’ll leave as a short exercise – and the form of option D drops straight out.</p>
<h3 id="circle-theorems">Circle theorems</h3>
<p>“Greetings, sensei.”</p>
<p>“The point is on the unit circle centred on the origin. The line of reflection contains a diameter of the circle. The chord through the point perpendicular to that diameter has the crossing point as its midpoint, so the image of the point also lies on the circle.”</p>
<p>“This would be easier with a diaplease don’t impale me on that very sharp pencil.”</p>
<p>“The only one of the options that can possibly form a Pythagorean triple is D. It turns out you can use that to generate all such triples.”</p>
<p>“Thank you, sensei.”</p>
<hr />
<p>Did you have another approach? Please let me know in the comments!</p>In preparing for a problem-solving session, I came across this lovely problem from the MAT:Ask Uncle Colin: Adjusting a sketch2021-02-10T00:00:00+00:002021-02-10T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/ask-uncle-colin-adjusting-a-sketch<blockquote>
<p>Dear Uncle Colin,</p>
<p>Suppose I’ve drawn a triangle with an angle of 30º and an opposite side of 5cm. Is there a simple way to <em>estimate</em> what the opposite side would be if the angle was, say, 40º?</p>
<p>Some Kindof Estimated Trigonometric Calculation Help</p>
</blockquote>
<p>Hi, SKETCH, and thanks for your message! The short answer is yes, but it’s a bit fiddly: for middling values of $\theta$ (say, between about 30º and 60º), adding a degree to the angle extends the opposite side by about 3.5º.</p>
<p>However, these percentages compound. Five degrees corresponds to about a 20% change, and ten degrees to about 40%. For your example, the adjusted side length would be about 7cm using this heuristic; doing it properly gives 7.27cm. That strikes me as good enough for a sketch!</p>
<p>For small values of $\theta$, changing $\theta$ by $k$% changes the opposite side by about $k$% as well – going from 10º to 15º is a 50% increase; your 5cm side would become 7.5cm if you did it approximately, or 7.6cm if you did it accurately.</p>
<p>Angles close to 90º are harder. It helps to work with the complement of the angles (by which I mean $90º - \theta$) instead of the angles themselves. Increasing the complement by a factor of $p$ <em>decreases</em> the opposite side by a factor of $p$: to go from 75º to 80º, the complement goes from 15º to 10º, and you would multiply your side length by 15/10.</p>
<h3 id="the-gory-detail">The gory detail</h3>
<p>If you don’t care about the justification of it, look away now.</p>
<p>For small values, it’s reasonable to use the approximation $\tan(x) \approx x$, when $x$ is in radians. This also means $\frac{\tan(x)}{\tan(y)} \approx \frac{x}{y}$, no matter the units.</p>
<p>Similarly for values a little below $\piby 2$ radians, $\tan(x) = \cot\left(\piby2 - x\right)$.</p>
<p>If we call $\widetilde{x} = \piby 2 - x$, then $\frac{tan(x)}{\tan(y)} = \frac{\cot(\widetilde{x})}{\cot(\widetilde{y})} = \frac{\tan(\widetilde{y})}{\tan(\widetilde(x))} \approx \frac{\widetilde{y}}{\widetilde{x}}$. This can be converted to degrees as $\frac{\tan(x)}{\tan(y)} \approx \frac{90º - y}{90º - x}$.</p>
<p>The middle bit is the interesting bit. The Mathematical Ninja notes that the derivative of $\ln(tan(x))$ is $\tan(x) + \cot(x)$, which is in the neighbourhood of 2 for middling values of $x$ ((In fact, it’s between 2 and 2.3 for $\piby 6 < x < \piby 3$)) .</p>
<p>If I’m looking at $z = \ln(tan(x + \epsilon))$, the Taylor series gives $z \approx \ln(\tan(x)) + \epsilon (\tan(x) + \cot(x))$.</p>
<p>Taking $\tan(x) + \cot(x)$ to be 2 ((you can adjust the number to 2.1 or 2.2 if you want to give a slightly better approximation on average)) gives $\ln(\tan(x+\epsilon)) \approx \ln(\tan(x)) + 2\epsilon$</p>
<p>Taking $e^{everything}$ gives $\tan(x+\delta) \approx \tan(x) \cdot e^{2\epsilon}$.</p>
<p>Now, we can approximate $e^{2\epsilon}$ as $1 + 2\epsilon$ for small $\epsilon$, so increasing the angle by $\epsilon$ increases its tangent by about $200\epsilon$%.</p>
<p>If $\epsilon = 1º = \piby 180$ radians, $200\epsilon$ is a very small smidge less than 3.5. (The rate is between 3.5 and 4% per degree almost everywhere in that middle range).</p>
<p>Hope that helps!</p>
<p>- Uncle Colin</p>Dear Uncle Colin, Suppose I’ve drawn a triangle with an angle of 30º and an opposite side of 5cm. Is there a simple way to estimate what the opposite side would be if the angle was, say, 40º? Some Kindof Estimated Trigonometric Calculation Help“Given”2021-02-08T00:00:00+00:002021-02-08T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/given<p>I feel like I spend a lot of time explaining the difference between $P(A | B)$, $P(B | A)$ and $P(A \cap B)$, so I figured it would be good to have an article I can point people at to explain properly.</p>
<p>Let’s imagine we’re at an animal shelter where there are many animals of all descriptions. I’m going to pick an animal at random; my events are $A$: the animal I pick has four legs; and $B$: the animal I pick is a cat.</p>
<h3 id="cap-means-both-things-are-true">$\cap$ means both things are true</h3>
<p>$P(A \cap B)$ is the probability that the animal I pick is a four-legged cat. That’s the simplest to understand: it’s just the number of four-legged cats out of all of the animals in the shelter.</p>
<h3 id="ab-means-a-given-b">$A|B$ means “$A$ given $B$”</h3>
<p>“Given” is a word that seems to cause confusion. It simply means, “if you know the second thing is true, what’s the probability of the first?”</p>
<p>In this context, $P(A|B)$ means “the probability of my selected animal having four legs, given that it’s a cat.” That is to say, I’ve picked out a cat from the list; how likely is it to have four legs? Obviously, this depends on the shelter, but in general, you’d expect that to be quite a high probability: $P(A|B)$ would be quite close to 1 here.</p>
<p>By contrast, $P(B|A)$ means “the probability of my animal being a cat, given that it has four legs.” That is to say, I’ve picked out a quadruped from the list. How likely is it to be a cat? Again, it depends on the shelter, but you’d expect several dogs, guinea pigs, rats, lizards and alpacas ((Probably not alpacas)) as well - $P(B|A)$ would be rather small.</p>
<h3 id="the-key-point">The key point</h3>
<p>The key thing is that “given [a condition]” means you have to ignore everything that doesn’t satisfy your condition. For example, in $P(A|B)$, you don’t <em>care</em> about the other animals, only about the cats. You’re only interested in the proportion of four-legged cats out of all of the cats.</p>I feel like I spend a lot of time explaining the difference between $P(A | B)$, $P(B | A)$ and $P(A \cap B)$, so I figured it would be good to have an article I can point people at to explain properly.Ask Uncle Colin: The Turning Points of a Cubic2021-02-03T00:00:00+00:002021-02-03T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/ask-uncle-colin-the-turning-points-of-a-cubic<blockquote>
<p>Dear Uncle Colin,</p>
<p>How can I find the turning points of a cubic (for example, $y = x^3 - x$) without calculus?</p>
<p>- Calculus Unnecessary (But It’s Clever)</p>
</blockquote>
<p>Hi, CUBIC, and thanks for your message. This one gave me a proper ‘oo’ when I realised how it worked!</p>
<p>The key insight here is to translate the cubic vertically until it just grazes the $x$-axis, use the fact that this gives you a repeated root to solve for $x$, and translate it back to solve for $y$.</p>
<p>In this example, translating the curve vertically upwards by $k$ gives a graph $y = x^3 - x + k$. This has a double root, so we can write it as $y= (x-a)^2(x-b)$ for some values of $a$ and $b$.</p>
<p>Expanding, it’s $y = x^3 - (2a+b)x^2 + (a^2 + 2ab)x - a^2b$.</p>
<p>Matching coefficients, $2a+b = 0$, $a^2 + 2ab = - 1$ and $-a^2 b = k.</p>
<p>The first of those gives $b = -2a$; substituting into the other two gives $-3a^2 = -1$ and $-2a^3 = k$.</p>
<p>The two possibilities for $a$ (which is the $x$-value we’re after) are $\pm \frac{1}{\sqrt{3}}$, and the corresponding values of $k$ are $\mp \frac{2}{3\sqrt{3}}$.</p>
<p>The turning points are therefore at $\left( \frac{1}{\sqrt{3}}, -\frac{2}{3\sqrt{3}}\right)$ and $\left( -\frac{1}{\sqrt{3}}, \frac{2}{3\sqrt{3}}\right)$.</p>
<p>Take that, Newton!</p>
<p>Hope that helps,</p>
<p>- Uncle Colin</p>Dear Uncle Colin, How can I find the turning points of a cubic (for example, $y = x^3 - x$) without calculus? - Calculus Unnecessary (But It’s Clever)Dictionary of Mathematical Eponymy: Zhao Youqin’s Method2021-02-01T00:00:00+00:002021-02-01T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/dictionary-of-mathematical-eponymy-zhao-youqins-method<p>Many of the entries in the Dictionary of Mathematical Eponymy have been 20th century eponyms - that’s been a deliberate choice: partly because I wanted to tread ground that was relatively new for me, partly because I wanted to find at least a few things named after women and - a few notable exceptions aside - women have only recently been allowed the opportunity to be in positions where things can be named after them.</p>
<p>Today, though, we’re going back to China around the start of the 14th century, where Zhao Youqin came up with a clever method for estimating $\pi$.</p>
<h3 id="what-is-zhao-youqins-method">What is Zhao Youqin’s method?</h3>
<p>Zhao Youqin came up with an iterative process for estimating the perimeter of a regular polygon, which can be inscribed in a circle. Suppose the radius of the circle is 1, and the $n$-gon inside it has a side length of $2L$.</p>
<ul>
<li>Take the perpendicular bisector of one of the sides (this passes through the centre of the circle).</li>
<li>The segment of this line between the centre of the circle and the edge of the polygon is $d = \sqrt{1 - L^2}$.</li>
<li>The segment between the edge of the polygon and the circumference of the circle has length $e = 1-d$, so $e = 1 - \sqrt{1-L^2}$.</li>
<li>For reasons of later simplicity, I’m going to call the distance from the point where the bisector meets the circumference to an adjacent vertex of the $n$-gon, $2L_2$. Now, $(2L_2)^2 = L^2 + e^2$, and $e^2 = 2 - 2\sqrt{1-L^2} -L^2$. That means $(2L_2)^2 = 2 - 2\sqrt{1-L^2}$.</li>
<li>But $L_2$ is the side length of a regular $2n$-gon - so if we know the perimeter of an $n$-gon, we can explicitly calculate the perimeter of a $2n$-gon. If we do this multiple times, we can calculate the perimeter of something that’s practically a circle.</li>
</ul>
<h3 id="why-is-this-important">Why is this important?</h3>
<p>Zhao Youqin used this iterative method with twelve steps to find the perimeter of a 16,384-gon, and hence an approximation of $\pi$ correct to six decimal places (finding a value very close to $\frac{355}{113}$, an excellent approximation.) He also determined that the approximations $3$, and $\frac{157}{50}$ were too small, $\frac{22}{7}$ too large.</p>
<p>I think it’s important because it’s a cool numerical method that’s 700 years old.</p>
<h3 id="who-was-zhao-youqin">Who was Zhao Youqin?</h3>
<p>Zhao Youqin (approx 1271-1335) was a Daoist philosopher, astronomer and mathematician who lived around the time of Kublai Khan’s conquest of China. He was especially well-renowned as an expert in optics.</p>Many of the entries in the Dictionary of Mathematical Eponymy have been 20th century eponyms - that’s been a deliberate choice: partly because I wanted to tread ground that was relatively new for me, partly because I wanted to find at least a few things named after women and - a few notable exceptions aside - women have only recently been allowed the opportunity to be in positions where things can be named after them.Ask Uncle Colin: A Four-Rooted Quartic2021-01-27T00:00:00+00:002021-01-27T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/ask-uncle-colin-a-four-rooted-quartic<blockquote>
<p>Dear Uncle Colin,</p>
<p>The remainder theorem of my textbook wants me to find the set of values of $k$ such that $3x^4 + 4x^3 - 12x^2 + k = 0$ has four distinct real roots, and I don’t know where to start!</p>
<p>- Quite Ugly Algebraic Relation: Targeting Its Constant</p>
</blockquote>
<p>Hi, QUARTIC, and thanks for your message!</p>
<p>I know this is in the remainder theorem part, but it’s really a calculus question. So far as I can tell, anyway. The trick is to find the stationary points so you can sketch the graph (for arbitrary $k$) and see where the axis needs to go to get four solutions.</p>
<p>Considering the function $f(x) = 3x^4 + 4x^3 - 12x^2 + k$, you can differentiate to get $f’(x) = 12x^3 + 12x^2 - 24x$, or $f’(x) = 12x(x+2)(x-1)$. Clearly, there are stationary points when $x$ is -2, 0 or 1.</p>
<p>We <em>could</em> differentiate again and justify that they’re a minimum, a maximum and a minimum in that order, but the graph of $y=f(x)$ is a positive quartic, so it behaves much like a positive quadratic and has to go down, up, down, up.</p>
<p>Alternatively, we can find the values of the function at these points: the relevant points on the graph are $(-2, k-32)$, $(0,k)$ and $(1, k-5)$ and note that the middle one is higher up than the others.</p>
<p>To have four solutions, the graph must meet the $x$-axis between the upper minimum at $(1,k-5)$ and the maximum at $(0,k)$. That means $0 < k < 5$.</p>
<p>Hope that helps!</p>
<p>- Uncle Colin</p>Dear Uncle Colin, The remainder theorem of my textbook wants me to find the set of values of $k$ such that $3x^4 + 4x^3 - 12x^2 + k = 0$ has four distinct real roots, and I don’t know where to start! - Quite Ugly Algebraic Relation: Targeting Its ConstantA puzzle on a square2021-01-25T00:00:00+00:002021-01-25T00:00:00+00:00https://www.flyingcoloursmaths.co.uk/a-puzzle-on-a-square<p>I had cause to revisit an old @edsouthall tweet:</p>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Random Walk Problem #1<br />Tricky… <a href="https://t.co/RfHA0ntSCg">pic.twitter.com/RfHA0ntSCg</a></p>— Ed Southall (<span class="citation" data-cites="edsouthall">@edsouthall</span>) <a href="https://twitter.com/edsouthall/status/733780754040299520?ref_src=twsrc%5Etfw">May 20, 2016</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>It’s a nice puzzle. Try it yourself! Spoilers below the line.</p>
<p>As a clarification: the square drawn must have the starting point as its top left corner.</p>
<hr />
<h3 id="my-approach">My approach</h3>
<p>Given that you’re at one corner of the square, you always have two moves that will keep you on the square. The probability of every one of the eight moves remaining on the square is $\left( \frac{1}{2}\right)^8 = \frac{1}{256}$. But we also need to make sure we cover all four edges. How do we do that, given that we stay on track?</p>
<p>Up to rotation/reflection, there are only six possible states we can be in (after we’ve made at least one move). I’m going to adopt a convention of a * showing where the dot is, and a - showing the edges drawn so far.</p>
<p>There’s one four-edge state ($D$), which is an absorbing state: once you’re there, you stay there.</p>
<p>There are two three-edge states: —* ($C$, where you’re in an end spot) and –*- ($c$, where you’re in one of the middle spots).</p>
<p>—* moves to the four-edge state and to –*- with equal probability; –*- stays put and moves to —* with equal probability.</p>
<p>There are two two-edge states: –* ($B$) and -*- ($b$). –* moves to —* and to -*- with equal probability; -*- always moves to –-*.</p>
<p>And there is one one-edge state: -* ($A$) is equally likely to become –* and to remain in place.</p>
<p>What I <em>did</em> was to meticulously catalogue where I could be after each move and spot that in 63 of the 128 possible cases, I ended up in state $D$. But that’s oddly unsatisfying.</p>
<h3 id="transition-matrices">Transition matrices</h3>
<p>But hang on a second! Going from one state to another with specified probabilities… that’s how the googles work! I can write down a matrix of probabilities like this:</p>
<p>$\bb{M} = \begin{pmatrix} h & 0 & 0 & 0 & 0 & 0 \\ h & 0 & 1 & 0 & 0 & 0 \\ 0 & h & 0 & 0 & 0 & 0 \\ 0 & h & 0 & 0 & h & 0 \\ 0 & 0 & 0 & h & h & 0 \\ 0 & 0 & 0 & h & 0 & 1 \end{pmatrix}$,</p>
<p>with $h = \frac{1}{2}$. Each column represents the probability of ending up in state $A$, $B$, $b$, $C$, $c$ or $D$ from each of those positions in the same order. (For example, the fourth column shows that if you’re in position $C$, you have equal probabilities of reaching positions $c$ and $D$.)</p>
<p>We start after one move in position $A$, which I can represent as $\bb{A} = (1,0,0,0,0,0)^T$.</p>
<p>The probabilities of the states after seven further moves are given by $\bb{M}^7 \bb{A} = \frac{1}{128}\begin{pmatrix} 1 \\ 15 \\ 7 \\ 9 \\ 3 \\ 63 \end{pmatrix}$. We’ve a $\frac{63}{128}$ chance of ending up in state $D$.</p>
<h3 id="oeis">OEIS</h3>
<p>Of course, I can also make use of the OEIS. My scrappy notes show that the number of paths ending in state $D$ (starting after four moves) follow the pattern 1, 3, 10, 25, 63….</p>
<p><a href="https://oeis.org/A005674">That turns out to be listed</a> and has the explicit formula $a(n)= 2^{n-1} + 2^{\floor{n/2}} + 2^{\floor{(n+1)/2}} - F(n+3)$, where $F(n)$ is the $n$th Fibonacci number.</p>
<p><em>Why</em> this should be the case, I don’t know.</p>
<h3 id="eds-follow-up">Ed’s follow-up</h3>
<p>After seeing my answer, Ed noted that $\frac{63}{128}$ is very close to a half and asked if that pointed towards a short-cut. Looking at the OEIS formula, I suspect not - it’s just a coincidence that it happened to pass so closely.</p>
<h3 id="finishing-up">Finishing up</h3>
<p>As @ImMisterAl pointed out on Twitter, I didn’t actually answer the question asked: the probability of ending up with this pattern is $\frac{1}{256}\times\frac{63}{128} = \frac{63}{32,786}$, or about $\frac{1}{520}$.</p>
<hr />
<p>I’d welcome any other insights you might have!</p>
<p>* Edited 2021-01-25 to fix formatting and answer the question.</p>I had cause to revisit an old @edsouthall tweet: