• # Paper 2, Section I, $2 A$

(a) For a differential equation of the form $\frac{\mathrm{d} y}{\mathrm{~d} x}=f(y)$, explain how $f^{\prime}(y)$ can be used to determine the stability of any equilibrium solutions and justify your answer.

(b) Find the equilibrium solutions of the differential equation

$\frac{\mathrm{d} y}{\mathrm{~d} x}=y^{3}-y^{2}-2 y$

and determine their stability. Sketch representative solution curves in the $(x, y)$-plane.

comment
• # Paper 2, Section I, A

(a) Consider the homogeneous $k$ th-order difference equation

$a_{k} y_{n+k}+a_{k-1} y_{n+k-1}+\ldots+a_{2} y_{n+2}+a_{1} y_{n+1}+a_{0} y_{n}=0$

where the coefficients $a_{k}, \ldots, a_{0}$ are constants. Show that for $\lambda \neq 0$ the sequence $y_{n}=\lambda^{n}$ is a solution if and only if $p(\lambda)=0$, where

$p(\lambda)=a_{k} \lambda^{k}+a_{k-1} \lambda^{k-1}+\ldots+a_{2} \lambda^{2}+a_{1} \lambda+a_{0}$

State the general solution of $(*)$ if $k=3$ and $p(\lambda)=(\lambda-\mu)^{3}$ for some constant $\mu$.

(b) Find an inhomogeneous difference equation that has the general solution

$y_{n}=a 2^{n}-n, \quad a \in \mathbb{R}$

comment
• # Paper 2, Section II, $7 \mathrm{~A}$

(a) Define the Wronskian $W$ of two solutions $y_{1}(x)$ and $y_{2}(x)$ of the differential equation

$y^{\prime \prime}+p(x) y^{\prime}+q(x) y=0$

and state a necessary and sufficient condition for $y_{1}(x)$ and $y_{2}(x)$ to be linearly independent. Show that $W(x)$ satisfies the differential equation

$W^{\prime}(x)=-p(x) W(x)$

(b) By evaluating the Wronskian, or otherwise, find functions $p(x)$ and $q(x)$ such that $(*)$ has solutions $y_{1}(x)=1+\cos x$ and $y_{2}(x)=\sin x$. What is the value of $W(\pi) ?$ Is there a unique solution to the differential equation for $0 \leqslant x<\infty$ with initial conditions $y(0)=0, y^{\prime}(0)=1$ ? Why or why not?

(c) Write down a third-order differential equation with constant coefficients, such that $y_{1}(x)=1+\cos x$ and $y_{2}(x)=\sin x$ are both solutions. Is the solution to this equation for $0 \leqslant x<\infty$ with initial conditions $y(0)=y^{\prime \prime}(0)=0, y^{\prime}(0)=1$ unique? Why or why not?

comment
• # Paper 2, Section II, A

(a) A surface in $\mathbb{R}^{3}$ is defined by the equation $f(x, y, z)=c$, where $c$ is a constant. Show that the partial derivatives on this surface satisfy

$\left.\left.\left.\frac{\partial x}{\partial y}\right|_{z} \frac{\partial y}{\partial z}\right|_{x} \frac{\partial z}{\partial x}\right|_{y}=-1$

(b) Now let $f(x, y, z)=x^{2}-y^{4}+2 a y^{2}+z^{2}$, where $a$ is a constant.

(i) Find expressions for the three partial derivatives $\left.\frac{\partial x}{\partial y}\right|_{z},\left.\frac{\partial y}{\partial z}\right|_{x}$ and $\left.\frac{\partial z}{\partial x}\right|_{y}$ on the surface $f(x, y, z)=c$, and verify the identity $(*)$.

(ii) Find the rate of change of $f$ in the radial direction at the point $(x, 0, z)$.

(iii) Find and classify the stationary points of $f$.

(iv) Sketch contour plots of $f$ in the $(x, y)$-plane for the cases $a=1$ and $a=-1$.

comment
• # Paper 2, Section II, A

(a) Find the general real solution of the system of first-order differential equations

\begin{aligned} &\dot{x}=x+\mu y \\ &\dot{y}=-\mu x+y, \end{aligned}

where $\mu$ is a real constant.

(b) Find the fixed points of the non-linear system of first-order differential equations

\begin{aligned} &\dot{x}=x+y \\ &\dot{y}=-x+y-2 x^{2} y \end{aligned}

and determine their nature. Sketch the phase portrait indicating the direction of motion along trajectories.

comment
• # Paper 2, Section II, A

(a) The circumference $y$ of an ellipse with semi-axes 1 and $x$ is given by

$y(x)=\int_{0}^{2 \pi} \sqrt{\sin ^{2} \theta+x^{2} \cos ^{2} \theta} \mathrm{d} \theta .$

Setting $t=1-x^{2}$, find the first three terms in a series expansion of $(*)$ around $t=0$.

(b) Euler proved that $y$ also satisfies the differential equation

$x\left(1-x^{2}\right) y^{\prime \prime}-\left(1+x^{2}\right) y^{\prime}+x y=0 .$

Use the substitution $t=1-x^{2}$ for $x \geqslant 0$ to find a differential equation for $u(t)$, where $u(t)=y(x)$. Show that this differential equation has regular singular points at $t=0$ and $t=1$.

Show that the indicial equation at $t=0$ has a repeated root, and find the recurrence relation for the coefficients of the corresponding power-series solution. State the form of a second, independent solution.

Verify that the power-series solution is consistent with your answer in (a).

comment

• # Paper 2, Section I, F

What does it mean to say that events $A_{1}, \ldots, A_{n}$ are (i) pairwise independent, (ii) independent?

Consider pairwise disjoint events $B_{1}, B_{2}, B_{3}$ and $C$, with

$\mathbb{P}\left(B_{1}\right)=\mathbb{P}\left(B_{2}\right)=\mathbb{P}\left(B_{3}\right)=p \text { and } \mathbb{P}(C)=q, \text { where } 3 p+q \leqslant 1$

Let $0 \leqslant q \leqslant 1 / 16$. Prove that the events $B_{1} \cup C, B_{2} \cup C$ and $B_{3} \cup C$ are pairwise independent if and only if

$p=-q+\sqrt{q} .$

Prove or disprove that there exist $p>0$ and $q>0$ such that these three events are independent.

comment
• # Paper 2, Section I, F

Let $X$ be a random variable taking non-negative integer values and let $Y$ be a random variable taking real values.

(a) Define the probability-generating function $G_{X}(s)$. Calculate it explicitly for a Poisson random variable with mean $\lambda>0$.

(b) Define the moment-generating function $M_{Y}(t)$. Calculate it explicitly for a normal random variable $\mathrm{N}(0,1)$.

(c) By considering a random sum of independent copies of $Y$, prove that, for general $X$ and $Y, G_{X}\left(M_{Y}(t)\right)$ is the moment-generating function of some random variable.

comment
• # Paper 2, Section II, F

A circular island has a volcano at its central point. During an eruption, lava flows from the mouth of the volcano and covers a sector with random angle $\Phi$ (measured in radians), whose line of symmetry makes a random angle $\Theta$ with some fixed compass bearing.

The variables $\Theta$ and $\Phi$ are independent. The probability density function of $\Theta$ is constant on $(0,2 \pi)$ and the probability density function of $\Phi$ is of the form $A(\pi-\phi / 2)$ where $0<\phi<2 \pi$, and $A$ is a constant.

(a) Find the value of $A$. Calculate the expected value and the variance of the sector angle $\Phi$. Explain briefly how you would simulate the random variable $\Phi$ using a uniformly distributed random variable $U$.

(b) $H_{1}$ and $H_{2}$ are two houses on the island which are collinear with the mouth of the volcano, but on different sides of it. Find

(i) the probability that $H_{1}$ is hit by the lava;

(ii) the probability that both $H_{1}$ and $H_{2}$ are hit by the lava;

(iii) the probability that $H_{2}$ is not hit by the lava given that $H_{1}$ is hit.

comment
• # Paper 2, Section II, F

I was given a clockwork orange for my birthday. Initially, I place it at the centre of my dining table, which happens to be exactly 20 units long. One minute after I place it on the table it moves one unit towards the left end of the table or one unit towards the right, each with probability 1/2. It continues in this manner at one minute intervals, with the direction of each move being independent of what has gone before, until it reaches either end of the table where it promptly falls off. If it falls off the left end it will break my Ming vase. If it falls off the right end it will land in a bucket of sand leaving the vase intact.

(a) Derive the difference equation for the probability that the Ming vase will survive, in terms of the current distance $k$ from the orange to the left end, where $k=1, \ldots, 19$.

(b) Derive the corresponding difference equation for the expected time when the orange falls off the table.

(c) Write down the general formula for the solution of each of the difference equations from (a) and (b). [No proof is required.]

(d) Based on parts (a)-(c), calculate the probability that the Ming vase will survive if, instead of placing the orange at the centre of the table, I place it initially 3 units from the right end of the table. Calculate the expected time until the orange falls off.

(e) Suppose I place the orange 3 units from the left end of the table. Calculate the probability that the orange will fall off the right end before it reaches a distance 1 unit from the left end of the table.

comment
• # Paper 2, Section II, F

(a) State Markov's inequality.

(b) Let $r$ be a given positive integer. You toss an unbiased coin repeatedly until the first head appears, which occurs on the $H_{1}$ th toss. Next, I toss the same coin until I get my first tail, which occurs on my $T_{1}$ th toss. Then you continue until you get your second head with a further $H_{2}$ tosses; then I continue with a further $T_{2}$ tosses until my second tail. We continue for $r$ turns like this, and generate a sequence $H_{1}, T_{1}, H_{2}, T_{2}, \ldots, H_{r}$, $T_{r}$ of random variables. The total number of tosses made is $Y_{r}$. (For example, for $r=2$, a sequence of outcomes $t t h|t| t t t h \mid h h t$ gives $H_{1}=3, T_{1}=1, H_{2}=4, T_{2}=3$ and $Y_{2}=11$.)

Find the probability-generating functions of the random variables $H_{j}$ and $T_{j}$. Hence or otherwise obtain the mean values $\mathbb{E} H_{j}$ and $\mathbb{E} T_{j}$.

Obtain the probability-generating function of the random variable $Y_{r}$, and find the mean value $\mathbb{E} Y_{r}$.

Prove that, for $n \geqslant 2 r$,

$\mathbb{P}\left(Y_{r}=n\right)=\frac{1}{2^{n}}\left(\begin{array}{c} n-1 \\ 2 r-1 \end{array}\right)$

For $r=1$, calculate $\mathbb{P}\left(Y_{1} \geqslant 5\right)$, and confirm that it satisfies Markov's inequality.

comment
• # Paper 2, Section II, F

(a) Let $B_{1}, \ldots, B_{n}$ be pairwise disjoint events such that their union $B_{1} \cup B_{2} \cup \ldots \cup B_{n}$ gives the whole set of outcomes, with $\mathbb{P}\left(B_{i}\right)>0$ for $1 \leqslant i \leqslant n$. Prove that for any event $A$ with $\mathbb{P}(A)>0$ and for any $i$

$\mathbb{P}\left(B_{i} \mid A\right)=\frac{\mathbb{P}\left(A \mid B_{i}\right) \mathbb{P}\left(B_{i}\right)}{\sum_{1 \leqslant j \leqslant n} \mathbb{P}\left(A \mid B_{j}\right) \mathbb{P}\left(B_{j}\right)}$

(b) A prince is equally likely to sleep on any number of mattresses from six to eight; on half the nights a pea is placed beneath the lowest mattress. With only six mattresses his sleep is always disturbed by the presence of a pea; with seven a pea, if present, is unnoticed in one night out of five; and with eight his sleep is undisturbed despite an offending pea in two nights out of five.

What is the probability that, on a given night, the prince's sleep was undisturbed?

On the morning of his wedding day, he announces that he has just spent the most peaceful and undisturbed of nights. What is the expected number of mattresses on which he slept the previous night?

comment