Part of the Oxford MAT Livestream

These are the solutions for the Algebra worksheet. For several questions there are two alternative solutions below. How many alternative solutions can you find before looking at the answers below?

Here's a copy of what was written during the livestream.

### Warm-up

- Solve the simultaneous equations \(x+4y=1\) and \(2x-y=3\).
- We can rearrange the first equation for \(x\) and substitute into the second equation; \(x=1-4y\) so \(2(1-4y)-y=3\) which is a linear equation for \(y\) with solution \(y=-1/9\). Then from the equation \(x=1-4y\) we have \(x=13/9\).

- Solve \(x^2+2x+xy+y^2=5\) and \(x+y=2\).
- We can rearrange the second equation for \(y=2-x\) and substitute into the first equation to get \(x^2+2x+x(2-x)+(2-x)^2=5\) which rearranges to \(x^2-1=0\) so \(x=1\) or \(x=-1\). We can then use \(y=2-x\) to find the corresponding values of \(y\). The solution is that \((x,y)\) is \((1,1)\) or \((-1,3)\).

- Solve \(x^2+y=1\) and \(x+y^2=1\).
- We can rearrange the first equation for \(y=1-x^2\) and substitute into the second equation to get \(x+1-2x^2+x^4=1\) which is true if \(x^4-2x^2+x=0\). This is true if \(x=0\) (which gives us the solution \(x=0\) and \(y=1\)), or if \(x^3-2x+1=0\). I can see that \(x=1\) is a solution of this cubic, and then it factorises as \((x-1)(x^2+x-1)=0\). The other roots are \(x=\frac{1}{2}\left(-1\pm\sqrt{5}\right)\). Substituting these back into the equation \(y=1-x^2\) we have four solutions for \((x,y)\); \[(0,1)\quad\text{or}\quad (1,0)\quad\text{or}\quad \left(\frac{-1+\sqrt{5}}{2},\frac{-1+\sqrt{5}}{2}\right)\quad\text{or}\quad \left(\frac{-1-\sqrt{5}}{2},\frac{-1-\sqrt{5}}{2}\right).\]

- For which values of \(x\) is it true that \(x^2+4x+3>0\)?
- Thinking about the shape of \(y=x^2+4x+3\), we should look for any points where \(y=0\) because if there are two roots then the function will be negative in between those roots. We have \(x^2+4x+3=0\) when \(x=-1\) or \(x=-3\), so \(x^2+4x+3>0\) if \(x>-1\) or if \(x<-3\).

- Expand \((2x+3y)^3\)
- We can use the binomial theorem here to get \((2x)^3+3(2x)^2(3y)+3(2x)(3y)^2+(3y)^3\) which is \(8x^3+36x^2y+54xy^2+27y^3\).

- Given \(-2<a<1\), what can you say about \(a^2\)?
- \(a^2\) could be as small as zero, because \(a\) could be zero. It definitely can't be negative, so that's a lower bound on \(a^2\). On the other hand, \(a^2\) could be almost as large as \(4\), but not equal to 4 or any larger. So the most that we can say is that \(0\leq a^2<4\).

- Given \(a<b\) and \(c<d\), what (if anything) can you say about the relationship between \(ac\) and \(bd\)? What (if anything) can you say if you're also told that \(a>0\) and \(c>0\)?
- In the first case, there's nothing we can say about the relationship between \(ac\) and \(bd\); those could be any two numbers.
- In the second case, we can say something! We have \(c<d\) and then because \(a>0\) we can multiply each side by \(a\) to get \(ac<ad\). Separately, we can start with \(a<b\) and multiply by \(d\) to get \(ad<bd\) since \(d>0\) (because \(d>c\) and \(c>0\)). Combining these two results, we have \(ac<bd\).

- I'm going to flip five fair coins (each is heads or tails with equal probability, and each is independent of the others). What's the probability that I get exactly three heads?
- There are \(2^5=32\) possible sequences of heads/tails that I could get when I flip five coins. Exactly three of the coins are heads (and two are tails) in some of these sequences; if I think about choosing different combinations of coins to be the ones that come up heads then I can see that the number of sequences with exactly three heads is precisely \(\binom{5}{3}=10\). So the probability is \(\frac{10}{32}=\frac{5}{16}\).

- Check that the binomial probabilities \(\displaystyle \binom{n}{r}p^rq^{n-r}\) for \(0\leq r \leq n\) add up to 1.
- Let's write down that sum. \[\binom{n}{0}p^0q^n+\binom{n}{1}p^1q^{n-1}+\binom{n}{2}p^2q^{n-2}+\dots+\binom{n}{n}p^nq^0.\] This is precisely the binomal expansion of \((p+q)^n\) and since \(p+q=1\) this sum is exactly one.

- I've got six cards that have the numbers one to six on them. I'm going to shuffle them and then deal them out from left to right.What's the probability that the cards alternate between odd and even numbers (either starting with an odd number or an even number, then switching between odd and even for each subsequent card)?
- We could consider what happens as we deal out the cards one at a time. It doesn't matter if the first card is even or odd, but then the probability the second card is the opposite parity is \(\frac{3}{5}\). If that continues the pattern, then we've got one odd number and one even number dealt out and four cards to go. The probability that the next one continues the pattern is \(\frac{2}{4}\), then if we continue to think about the probability that each card fits the pattern we have the probabilities \(\frac{2}{3}\) then \(\frac{1}{2}\) then \(\frac{1}{1}\). Multiplying all these probabilities together, because we want all these events to happen one after the other, we get a probability of \(\frac{1}{10}\).
- Alternatively, consider trying to count how many of the \(6!=720\) possible shuffles have the alternating property. There are some that start with an even number and some that start with an odd number. Consider the ones that start with an even number; we must have the \(2\) and \(4\) and \(6\) cards as the first and third and fifth cards dealt, and there are \(3!=6\) ways to do this. Similarly, there are \(6\) permutations for the odd cards, so \(6\times 6 =36\) shuffles match this pattern. Separately, there are \(36\) shuffles that start with an odd number and then alternate, for a total of \(72\) out of a possible \(720\). That's a probability of \(\frac{72}{720}=\frac{1}{10}\).

- What's the probability that the first three cards I deal out are all prime numbers?
- Consider dealing out the cards one at a time. The probability that the first card is prime is \(\frac{3}{6}\) then if that happens the probability that the next is prime is \(\frac{2}{5}\), then if that happens too, the probability that the third card is prime is \(\frac{1}{4}\). Then it doesn't matter what order the last three cards come out in. Multiplying gives a probability of \(\frac{1}{20}\).
- Alternatively, consider how many of the \(720\) possible shuffles have three primes at the start. There are exactly three prime cards, so we would have all possible shuffles with \(2\), \(3\), and \(5\) as the first three cards. There are \(3!\times3!\) ways this could happen, allowing for the permutations of those three prime cards and the permutations of the other three cards. That gives a probability of \(\frac{36}{720}=\frac{1}{20}\).

- What's the probability that the first two cards I deal out are both prime numbers?
- Consider dealing out the cards one at a time. The probability that the first card is prime is \(\frac{3}{6}\) then if that happens the probability that the next is prime is \(\frac{2}{5}\). Then it doesn't matter what order the last four cards come out in. Multiplying gives a probability of \(\frac{1}{5}\).
- Alternatively, consider how many of the \(720\) possible shuffles have two primes at the start. There are three possibilities for what those two primes are, and then once we've picked which primes appear in the first two cards, there are \(2!\times 4!\) shuffles with those two cards as the first two. Allowing for the three distinct choices of which primes appear, we have \(3\times 48\) shuffles out of \(720\), which is a probability of \(\frac{144}{720}=\frac{1}{5}\).

- What's the probability that the first five cards I deal out are all prime numbers?
- It's zero, because there aren't enough cards with prime numbers.
- Alternatively, consider how many of the \(720\) possible shuffles... just joking!

### MAT questions

#### MAT 2014 Q1A

- We can rearrange the inequality to \(x^4-8x^2-9<0\).
- This is a quadratic in \(x^2\), which we can factorise to get \((x^2-9)(x^2+1)<0\).
- The second bracket is always positive. The first bracket is negative if \(x^2<9\), which happens precisely when \(-3<x<3\).
- The answer is (a).

#### MAT 2013 Q1D

- We can rearrange the given equation to \(x^4=y^2+2y+1\).
- So \((x^2)^2=(y+1)^2\) and we have \(x^2=y+1\) or \(x^2=-y-1\).
- Those are two parabolas, both of which pass through \((0,-1)\).
- The answer is (b).

#### MAT 2014 Q1G

- If we write \((1+xy+y^2)^n=(1+(xy+y^2))^n\) then we can use the binomial theorem to expand that as \[1+(xy+y^2)+\binom{n}{2}(xy+y^2)^2+\binom{n}{3}(xy+y^2)^3+\dots+(xy+y^2)^n.\] We're interested in the \(\displaystyle\binom{n}{4}(xy+y^2)^4\) term here, because that's the one which includes the \(x^3y^5\) term, because \(x^3y^5=(xy)^3(y^2)^1\)
- Expanding \((xy+y^2)^4\) with the binomial theorem, the coefficient of \((xy)^3(y^2)^1\) is \(\displaystyle\binom{4}{3}\).
- So the coefficient we're looking for is \(\displaystyle \binom{4}{3}\binom{n}{4}=4\binom{n}{4}\).
- The answer is (d).

#### MAT 2016 Q2

(i) We should try to work out \(A(B(x))\) and \(B(A(x))\). For the first one, we're taking the output of \(B(x)\) and plugging it in as the input to \(A\). This gives \(2(3x+2)+1\) which is \(6x+5\). We can also calculate \(B(A(x))=3(2x+1)+2=6x+5\). So these are equal.

(ii) Let's work out \(A^2(x)\) and \(A^3(x)\) and look for a pattern. We have \(A^2(x)=2(2x+1)+1=4x+3\) and \(A^3(x)=2(4x+3)+1=8x+7\). So it looks like the coefficient of \(x\) doubles each time, and the constant coefficient is one less. I can write that general pattern as \(A^n(x)=2^nx+2^n-1\). Let's check that; it's true when \(n=1\) or \(n=2\) or \(n=3\) because we've already worked out those. In general, if \(A^n(x)=2^nx+2^n-1\) for some value of \(n\) and then we try to work out the next one, we would have \(A^{n+1}(x)=2(2^nx+2^n-1)+1=2^{n+1}x+2^{n+1}-1\). So our pattern would then work for the next value of \(n\) too.

Alternatively, \[A^n(x)=2A^{n-1}(x)+1=2^2A^{n-2}(x)+2+1=\dots=2^nx+2^{n-1}+2^{n-2}+2^{n-3}+\dots+2+1\] and we can sum the geometric series to get the same answer.

(iii) The coefficient of \(x\) gives us information about how many times \(A\) and \(B\) have been applied. Each application of \(A\) doubles the coefficient of \(x\) and each application of \(B\) triples the coefficient of \(x\). If we factorise \(108=2^23^3\) then we can see that \(A\) has been applied twice and \(B\) has been applied three times. Any sequence of two \(A\)'s and three \(B\)'s will give us a function of the form \(108x+c\), and there are \(\binom{5}{3}=10\) ways to do this.

(iv) In fact, all ten of these give the same function \(F(x)\), because we proved in part (i) that \(A(B(x))=B(A(x))\) for any \(x\). So we can swap around the applications of \(A\) and the applications of \(B\) and we'll get the same answer! So there's only one possible value of \(c\). To find out what it actually is, I'll calculate the function with my favourite sequence of two \(A\)'s and three \(B\)'s, which is \(B(A(B(A(B(x)))))\). I can calculate this; it's \(108x+107\). So \(c=107\) is the only possibility.

(v) I'm now suspicious that whenever I apply a sequence of \(A\)'s and \(B\)'s, I always get a function where the constant term is one less than the coefficient of \(x\). I can prove this by checking what happens if I apply \(A(x)\) or \(B(x)\) to \(kx+(k-1)\). If I apply \(A\), I get \(2kx+2k-1\). If I apply \(B\) instead, I get \(3kx+3k-1\). So whatever I do, the constant term will always be one less than the coefficient of \(x\). If I'd spotted this earlier, I wouldn't have needed to work out \(B(A(B(A(B(x)))))\). Ah well.

In this part of the question, we're asked about a sum of \(k\) of these functions. The constant term of this sum will be \(k\) less than the coefficient of \(x\), so \(k=214-92=122\). But that means that there are over \(100\) terms on the left-hand side, and each of the has a constant term that's at least one, so their sum can't have a constant term of 92. So there's no way to make this equation work.

Alternatively (suggested in the livestream chat), note that the integers are all positive, so in each term on the left, \(A\) and \(B\) have each been applied at least once, so the coefficient of \(x\) must be a multiple of \(6\). But \(214\) isn't a multiple of six. So no solutions.

### Reflection

- For the probability questions in the warm-up, there are at least two ways to think about the problem; we can think about a series of events happening one after another, or we can think about the possibilities for the end result of the whole process.
- When solving simultaneous equations, it's important not to substitute an equation into itself, or you'll probably get something that rearranges to \(0=0\). When I'm working on paper I like to keep track of which equations I've used, so that I can make sure that I don't use the same equation twice (or said differently, so that I can make sure that I use all the equations I've been given).
- In the long question above, there is no specific part of the question that tells us to prove that the constant term is one less than the coefficient of \(x\) for any function made by applying \(A\)'s and \(B\)'s, but the whole question got easier for me once I'd spotted that. We could perhaps have noticed that \(A(-1)=-1\) and \(B(-1)=-1\). So the number \(-1\) is a fixed point of these functions, and any combination of them will also have \(F(-1)=-1\).