A train of length \(l_{1}\) and a lorry of length \(l_{2}\) are heading for a level crossing at speeds \(u_{1}\) and \(u_{2}\) respectively. Initially the front of the train and the front of the lorry are at distances \(d_{1}\) and \(d_{2}\) from the crossing. Find conditions on \(u_{1}\) and \(u_{2}\) under which a collision will occur. On a diagram with \(u_{1}\) and \(u_{2}\) measured along the \(x\) and \(y\) axes respectively, shade in the region which represents collision. Hence show that if \(u_{1}\) and \(u_{2}\) are two independent random variables, both uniformly distributed on \((0,V)\), then the probability of a collision in the case when initially the back of the train is nearer to the crossing than the front of the lorry is \[ \frac{l_{1}l_{2}+l_{2}d_{1}+l_{1}d_{2}}{2d_{2}\left(l_{2}+d_{2}\right)}. \] Find the probability of a collision in each of the other two possible cases.
My two friends, who shall remain nameless, but whom I shall refer to as \(P\) and \(Q\), both told me this afternoon that there is a body in my fridge. I'm not sure what to make of this, because \(P\) tells the truth with a probability of only \(p\), while \(Q\) (independently) tells the truth with probability \(q\). I haven't looked in the fridge for some time, so if you had asked me this morning, I would have said that there was just as likely to be a body in it as not. Clearly, in view of what \(P\) and \(Q\) told me, I must revise this estimate. Explain carefully why my new estimate of the probability of there being a body in the fridge should be \[ \frac{pq}{1-p-q+2pq}. \] I have now been to look in the fridge, and there is indeed a body in it; perhaps more than one. It seems to me that only my enemy \(A\), or my enemy \(B\), or (with a bit of luck) both \(A\) and \(B\) could be in my fridge, and this morning I would have judged these three possibilities to be equally likely. But tonight I asked \(P\) and \(Q\) separately whether or not \(A\) was in the fridge, and they each said that he was. What should be my new estimate of the probability that both \(A\) and \(B\) are in my fridge? Of course, I tell the truth always.
Solution: \begin{align*} \mathbb{P}(\text{body in fridge} | \text{P and Q say so}) &= \frac{\mathbb{P}(\text{body in fridge and P and Q say so})}{\mathbb{P}(\text{P and Q say so})} \\ &= \frac{\frac12 pq}{\mathbb{P}(\text{body in fridge and P and Q say so})+\mathbb{P}(\text{no body in fridge and P and Q say so})} \\ &= \frac{\frac12 pq}{\frac12 pq + \frac12(1-p)(1-q)} \\ &= \frac{pq}{pq + 1-p-q+pq} \\ &= \frac{pq}{1-p-q+2pq} \end{align*} \begin{align*} \mathbb{P}(\text{A and B in fridge} | \text{P and Q say A is in fridge}) &= \frac{\mathbb{P}(\text{A and B in fridge and P and Q say A is in fridge}) }{\mathbb{P}( \text{P and Q say A is in fridge}) } \\ &= \frac{\frac13pq}{\frac13pq+\frac13pq+\frac13(1-p)(1-q)} \\ &= \frac{pq}{1-p-q+3pq} \end{align*}
Find the set of positive integers \(n\) for which \(n\) does not divide \((n-1)!.\) Justify your answer. [Note that small values of \(n\) may require special consideration.]
Solution: Claim: \(n \not \mid (n-1)!\) if and only if \(n\) is prime or \(4\) Proof: \((\Leftarrow)\)
Let \({\displaystyle I_{m,n}=\int\cos^{m}x\sin nx\,\mathrm{d}x,}\) where \(m\) and \(n\) are non-negative integers. Prove that for \(m,n\geqslant1,\) \[ (m+n)I_{m,n}=-\cos^{m}x\cos nx+mI_{m-1,n-1}. \]
Solution: Let \({\displaystyle I_{m,n}=\int\cos^{m}x\sin nx\,\mathrm{d}x,}\) Then \begin{align*} && I_{m,n} &= \int\cos^{m}x\sin nx\,\mathrm{d}x \\ &&&= \left [ -\frac1n \cos^m x \cos n x \right] - \frac{m}{n} \int \sin^{m-1} x \cos x \cos n x \d x \\ &&&= \left [ -\frac1n \cos^m x \cos n x \right] + \frac{m}{n} \int \sin^{m-1} x (\cos (n-1)x -\sin x \sin nx) \d x\\ &&&= \left [ -\frac1n \cos^m x \cos n x \right] + \frac{m}{n} \int \sin^{m-1} x \cos (n-1)x \d x-\frac{m}{n} I_{m,n} \\ &&&= \left [ -\frac1n \cos^m x \cos n x \right] + \frac{m}{n} I_{m-1,n-1} -\frac{m}{n} I_{m,n} \\ \Rightarrow && nI_{m,n} &= -\cos^m x \cos n x + mI_{m-1,n-1} -mI_{m,n}\\ \Rightarrow && (m+n)I_{m,n} &= -\cos^m x \cos n x + mI_{m-1,n-1} \end{align*}
Solution:
Solution: The initial volume of water in \(A\) is: \begin{align*} \pi \int_0^4 x^2 \, \d y &= \pi \int_0^4 y \d y \\ &= \pi [ \frac{y^2}{2}]_0^4 \\ &= 8\pi \end{align*} We assume that no water is in the tube as it is `thin'. Therefore we must have: \begin{align*} && 8\pi &= \pi \int_0^{h-1} x^2 \d y +\pi \int_0^{h} x^2 \d y \\ &&&= \pi \int_0^{h-1} y \d y +\pi \int_0^{h} \l \sinh \frac{x}{2}\r^2 \d y \\ &&&= \pi \left [\frac{y^2}{2} \right]_0^{h-1} + \pi \int_0^h \frac{-1+\cosh y}{2}\d y \\ &&&= \pi \frac{(h-1)^2}{2} + \pi \left [ -\frac{y}{2} +\frac{\sinh y}{2}\right]_0^h \\ &&&= \pi \frac{(h-1)^2}{2} -\pi \frac{h}{2} + \pi \frac{\sinh h}{2} \\ \Rightarrow && 0 &= h^2-2h+1-h+\sinh h -16 \\ &&&= h^2 -3h+\sinh h - 15 \\ \Rightarrow && 15 &= h^2 -3h+\sinh h \end{align*}
A secret message consists of the numbers \(1,3,7,23,24,37,39,43,43,43,45,47\) arranged in some order as \(a_{1},a_{2},\ldots,a_{12}.\) The message is encoded as \(b_{1},b_{2},\ldots,b_{12}\) with \(0\leqslant b_{j}\leqslant49\) and \begin{alignat*}{1} b_{2j} & \equiv a_{2j}+n_{0}+j\pmod{50},\\ b_{2j+1} & \equiv a_{2j+1}+n_{1}+j\pmod{50}, \end{alignat*} for some integers \(n_{0}\) and \(n_{1}.\) If the coded message is \(35,27,2,36,15,35,8,40,40,37,24,48,\) find the original message, explaining your method carefully.
Solution: Considering the odd numbers, we have \begin{array}{l|rrrrrr} b_{2j+1} & 35 & 2 & 15 & 8 & 40 & 24 \\ a_{2j+1}+n_1 & 35 & 1 & 13 & 5 & 36 & 19 \end{array} Considering the even numbers, we have \begin{array}{l|rrrrrr} b_{2j} & 27& 36 & 35 & 40 & 37 & 48 \\ a_{2j}+n_0 & 27 & 35 & 33 & 37 & 33 & 43 \end{array} There are three numbers in the original sequence which are repeated (\(43\)). By the pigeonhole principle, one of the odds or evens must have at least two of them. We can see that the even numbers have some number repeated twice (\(33\)). Therefore these must be the \(43\)s. Therefore \(n_0 = -10\) \begin{array}{l|rrrrrr} b_{2j} & 27& 36 & 35 & 40 & 37 & 48 \\ a_{2j}+n_0 & 27 & 35 & 33 & 37 & 33 & 43 \\ a_{2j} & 37 & 45 & 43 & 47 & 43 & 3 \end{array} This leaves the remaining numbers to be decoded from the original sequence as \(1,7,23,24,39,43\). Two of these numbers are consecutive (\(23\) and \(24\)), and two numbers in our sequence are \(35\) and \(36\). Therefore \(n_1\) must be \(12\). \begin{array}{l|rrrrrr} b_{2j+1} & 35 & 2 & 15 & 8 & 40 & 24 \\ a_{2j+1}+n_1 & 35 & 1 & 13 & 5 & 36 & 19 \\ a_{2j+1} & 23 & 39 & 1 &43 & 24& 7 \end{array} Therefore the original sequence was: \(23, 37, 39, 45, 1, 43, 43, 47, 24, 43, 7, 3\)
The functions \(x(t)\) and \(y(t)\) satisfy the simultaneous differential equations \begin{alignat*}{1} \dfrac{\mathrm{d}x}{\mathrm{d}t}+2x-5y & =0\\ \frac{\mathrm{d}y}{\mathrm{d}t}+ax-2y & =2\cos t, \end{alignat*} subject to \(x=0,\) \(\dfrac{\mathrm{d}y}{\mathrm{d}t}=0\) at \(t=0.\) Solve these equations for \(x\) and \(y\) in the case when \(a=1\). Without solving the equations explicitly, state briefly how the form of the solutions for \(x\) and \(y\) if \(a>1\) would differ from the form when \(a=1.\)
Solution: Letting \(\mathbf{x} =\begin{pmatrix} x(t) \\ y(t) \end{pmatrix}\) and \(\mathbf{A} = \begin{pmatrix} -2 & 5 \\ -a & 2 \end{pmatrix}\) then our differential equation is \(\mathbf{x}' = \mathbf{Ax} + \begin{pmatrix} 0 \\2 \cos t \end{pmatrix}\). Looking at the eigenvalues of \(\mathbf{A}\), we find: \begin{align*} && \det \begin{pmatrix} -2-\lambda & 5 \\ -a & 2 -\lambda \end{pmatrix} &= (\lambda^2-4)+5a\\ &&&= \lambda^2 +5a-4 \end{align*} Therefore if \(a = 1\), \(\lambda = \pm i\). In which case we should expect the complementary solutions to be of the form \(\mathbf{x} = \begin{pmatrix} A \sin t + B \cos t \\ C \sin t + D \cos t \end{pmatrix}\). The first equation tells us that \((A-5D+B)\cos t + (-B+5C)\sin t=0\) so the complementary solution is:\(\mathbf{x} = \begin{pmatrix} 5(D-C) \sin t + 5C \cos t \\ C \sin t + D \cos t \end{pmatrix}\). Looking for a particular integral, we should expect to try something like \(\mathbf{x} = \begin{pmatrix} Et\cos t+Ft\sin t\\ Gt\cos t+Ht \sin t\end{pmatrix}\) and we find
Prove that \[ \tan^{-1}t=t-\frac{t^{3}}{3}+\frac{t^{5}}{5}-\cdots+\frac{(-1)^{n}t^{2n+1}}{2n+1}+(-1)^{n+1}\int_{0}^{t}\frac{x^{2n+2}}{1+x^{2}}\,\mathrm{d}x. \] Hence show that, if \(0\leqslant t\leqslant1,\) then \[ \frac{t^{2n+3}}{2(2n+3)}\leqslant\left|\tan^{-1}t-\sum_{r=0}^{n}\frac{(-1)^{r}t^{2r+1}}{2r+1}\right|\leqslant\frac{t^{2n+3}}{2n+3}. \] Show that, as \(n\rightarrow\infty,\) \[ 4\sum_{r=0}^{n}\frac{(-1)^{r}}{(2r+1)}\rightarrow\pi, \] but that the error in approximating \(\pi\) by \({\displaystyle 4\sum_{r=0}^{n}\frac{(-1)^{r}}{(2r+1)}}\) is at least \(10^{-2}\) if \(n\) is less than or equal to \(98\).
Solution: We start by noticing that \(\displaystyle \tan^{-1} t = \int_0^t \frac{1}{1+x^2} \d x\). Consider the geometric series \(1-x^2+(-x^2)^2+ \cdots + (-x^2)^n = \frac{1-(-x^2)^{n+1}}{1+x^2}\). Therefore, \((1+x^2)(1-x^2+(-x^2)^2+ \cdots + (-x^2)^n) = 1-(-x^2)^{n+1}\) or \(1 = (1+x^2)(1-x^2+x^4-\cdots+(-1)^nx^{2n}) +(-1)^{n+1}x^{2n+2}\) \begin{align*} \tan^{-1} t &= \int_0^t \frac{1}{1+x^2} \d x \\ &= \int_0^t \frac{(1+x^2)(1-x^2+x^4-\cdots+(-1)^nx^{2n}) +(-1)^{n+1}x^{2n+2}}{x^2+1} \d x \\ &= \int_0^t (1-x^2+x^4-\cdots+(-1)^nx^{2n})\d x + \int_0^t \frac{(-1)^{n+1}x^{2n+2}}{x^2+1} \d x \\ &= t - \frac{t^3}{3}+\frac{t^5}{5}-\cdots + (-1)^n \frac{t^{2n+1}}{2n+1}+\int_0^t \frac{(-1)^{n+1}x^{2n+2}}{x^2+1} \d x \\ &= \sum_{r=0}^n \frac{(-1)^r t^{2r+1}}{2r+1} + \int_0^t \frac{(-1)^{n+1}x^{2n+2}}{x^2+1} \d x \\ \end{align*} Therefore we can say (for \(0 \leq t \leq 1\)) \begin{align*} \left | \tan^{-1} t - \sum_{r=0}^n \frac{(-1)^r t^{2r+1}}{2r+1} \right | &= \left | \int_0^t \frac{(-1)^{n+1}x^{2n+2}}{x^2+1} \d x \right | \\ &\leq \left | \int_0^t x^{2n+2} \d x \right | \\ &= \frac{t^{2n+3}}{2n+3} \\ \\ \left | \tan^{-1} t - \sum_{r=0}^n \frac{(-1)^r t^{2r+1}}{2r+1} \right | &= \left | \int_0^t \frac{(-1)^{n+1}x^{2n+2}}{x^2+1} \d x \right | \\ &\geq \left | \int_0^t \frac{(-1)^{n+1}x^{2n+2}}{1+1} \d x \right | \\ &= \frac{t^{2n+3}}{2(2n+3)} \\ \end{align*} Since \(\tan^{-1} 1 = \frac{\pi}{4}\) we must have that: \begin{align*} \lim_{n \to \infty} \left | \frac{\pi}{4} - \sum_{r=0}^{n}\frac{(-1)^{r}}{(2r+1)} \right | \to 0 \Rightarrow \lim_{n \to \infty} 4\sum_{r=0}^{n}\frac{(-1)^{r}}{(2r+1)} \to \pi \end{align*} However, \begin{align*} && \left | 4\sum_{r=0}^{n}\frac{(-1)^{r}}{(2r+1)} - \pi \right | &\geq 4 \frac{1}{2(2n+3)} \\ && &= \frac{2}{2n+3} \\ \\ && \frac{2}{2n+3} \geq 10^{-2} \\ \Leftrightarrow && 200 \geq 2n+3 \\ \Leftrightarrow && 197 \geq 2n \\ \Leftrightarrow && 98.5 \geq n \\ \end{align*} Therefore we need more than \(98\) terms to get two decimal places of accuracy. Not great!
Show that, if the lengths of the diagonals of a parallelogram are specified, then the parallogram has maximum area when the diagonals are perpendicular. Show also that the area of a parallelogram is less than or equal to half the square of the length of its longer diagonal. The set \(A\) of points \((x,y)\) is given by \begin{alignat*}{1} \left|a_{1}x+b_{1}y-c_{1}\right| & \leqslant\delta,\\ \left|a_{2}x+b_{2}y-c_{2}\right| & \leqslant\delta, \end{alignat*} with \(a_{1}b_{2}\neq a_{2}b_{1}.\) Sketch this set and show that it is possible to find \((x_{1},y_{1}),(x_{2},y_{2})\in A\) with \[ (x_{1}-x_{2})^{2}+(y_{1}-y_{2})^{2}\geqslant\frac{8\delta^{2}}{\left|a_{1}b_{2}-a_{2}b_{1}\right|}. \]
Solution: In a parallelogram the diagonals meet at their mid points. Fixing one diagonal, we can look at the two triangles formed by the other diagonal. Suppose the angle between them is \(\theta\). Then the area of the triangles will be \(\frac12 \frac{l_1}{2} \frac{l_2}2 \sin \theta+\frac12 \frac{l_1}{2} \frac{l_2}2 \sin (\pi -\theta) = \frac{l_1l_2}{4} \sin \theta\). This will be true on both sides. Therefore we can maximise this area by setting \(\theta = \frac{\pi}{2}\).