Skip to main content

Posts

Showing posts with the label author: Satvik Saha

A Random Slice of Pi

A very belated Happy Pi Day to all! Traditionally, this day is celebrated by finding clever and whimsical ways of approximating $\pi$, from using series' such as $$ \frac{\pi}{4} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \dots $$ to using out of control cars . One of my favourite employs randomness: take a unit square, and mark off a quarter-circle inside it with unit radius. Now, select a bunch of points uniformly randomly from the square. As you keep sampling more and more points, the fraction of points inside the quarter-circle will approach $\pi / 4$. The ratio of the number of red dots to the total number of dots converges to $\pi / 4$. Indeed, $\pi / 4$ is precisely the area of the quarter-circle. Why does this work? This is all thanks to a very useful result in probability, known as the  Weak Law of Large Numbers . When you generate the $i$th point $\mathbf{x}_i$, consider the indicator function  $\mathbb{1}_S(\mathbf{x}_i)$, which gives $1$ when $\mathbf{x}_i$ li...

Co-planar points on the twisted cubic

Here's a fun problem from a course on Curves and Surfaces. Consider the following curve, called the twisted cubic. \[ \gamma\colon \mathbb{R} \to \mathbb{R}^3,\qquad \gamma(t) = (t, t^2, t^3). \] Show that no four distinct points on this curve can lie on the same plane. Method 1 - The scalar triple product The scalar triple product  is a good tool to have at one's disposal (thanks to Satbhav Voleti for sharing this solution); given three vectors $\boldsymbol{u}, \boldsymbol{v}, \boldsymbol{w}$, their scalar triple product $\boldsymbol{u}\cdot(\boldsymbol{v}\times \boldsymbol{w})$ represents the volume of the parallelepiped whose legs are these vectors. Now if these three vectors all lie in the same plane, the corresponding parallelepiped is completely flat with zero volume, thus the scalar triple product is also zero. Coming back to our problem, suppose that the four distinct points on the twisted cubic $P_i = (t_i, t_i^2, t_i^3)$, $i = 0, 1, 2, 3$, all lie on the same plane. ...

Simulating Bertrand's Paradox

One of the most famous elementary problems in probability is Bertrand's Paradox . This stems from the seemingly simple question: what is the probability that the length of a random chord in a circle exceeds the length of the side of its inscribed equilateral triangle? To put the lengths into perspective, the side of an equilateral triangle inscribed in a circle of radius $r$ has length $\sqrt{3}r$. The YouTube channel Numberphile, in collaboration with Grant Sanderson from 3blue1brown, released an excellent video discussing this very problem. Don't forget to watch the extra footage ! I won't dwell on the mathematical details here; the video does a great job of explaining the problem with gorgeous visuals. Instead, an enthusiastic programmer's first instinct screams "let's code it"; and python is more than up to the task. Putting the usual caveats of generating (pseudo)randomness using computers aside, the numpy.random  module is a good place ...

Monotonic functions and the first derivative

A couple of days ago, Rohan Didmishe shared this problem with us: show that the function defined by \[ f\colon \mathbb{R} \to \mathbb{R}, \qquad f(x) = \begin{cases} x + x^2\sin(1 / x), &\text{ if }x \neq 0, \\ 0, &\text{ if } x = 0. \end{cases} \] is not monotonic (increasing or decreasing) in any interval $(-\delta, \delta)$ around zero. Graphing this function (say, using Desmos ) shows that it oscllates rapidly, curving up and down with increasing frequency the closer its gets to zero. This is due to the $x^2\sin(1 / x)$ term; the $x$ added in front 'tilts' the curve upwards. The first thing to look at is the derivative of $f$. Using $\lim_{x \to 0} x\sin(1 / x) = 0$ and the chain rule, we can compute \[ f'(x) = \begin{cases} 1 + 2x\sin(1 / x) - \cos(1 / x), &\text{ if }x \neq 0, \\ 1, &\text{ if } x = 0. \end{cases} \] Specifcally, $f'(0) = 1$ which seems to tell us that $f$ is increasing at $0$ ... or doe...