## Archive of posts in category “math”

### Introducing bra–ket notation to math learners

Bra–ket notation is a good-looking notation! I am sad that it is not generally taught in math courses. Let me introduce it to you.

- Categories: math
- Tags: from zhihu, quantum mechanics

### This is what will happen after you get a haircut

Denote the length distribution of one’s hair to be $f(l,t)$, where $l$ is hair length, and $t$ is time. Considering that each hair may be lost naturally from time to time (there is a probability of $\lambda\,\mathrm dt$ for each hair to be lost within time range from $t$ to $t+\mathrm dt$) and then restart growing from zero length, how will the length distribution of hair evolve with time? It turns out that we may model it with a first-order PDE.

- Categories: math
- Tags: calculus, probability, pde

### The longest all-$1$ substring of a random bit string

Given your probability of breaking the combo at each note, what is the probability distribution of your max combo in the rhythm game chart? I considered the problem seriously!

- Categories: math
- Tags: long paper, rhythm game, algorithm, probability

### Solving ODE by recursive integration

By recursively integrating according to $x_{n+1}\!\left(t\right):=\int_{t_0}^tf\!\left(x_n\!\left(s\right),s\right)\,\mathrm ds+C$ from $x_0\!\left(t_0\right):=C$, we can get the solution of the ODE $x’\!\left(t\right)=f\!\left(x\!\left(t\right),t\right)$ with initial conditions $x\!\left(t_0\right)=C$ as the limit of the sequence of functions.

### Hölder means inequality

The Hölder mean of $\vec x$ with weights $\vec w$ and a parameter $p$ is defined as $M_{p,\vec w}\!\left(\vec x\right):=\left(\vec w\cdot\vec x^p\right)^{\frac 1p}$, and the value at $p=-\infty,0,+\infty$ are defined by the limits. We can prove using Jensen’s inquality that the Hölder mean increases as $p$ increases. This property can be used to prove HM-GM-AM-QM inequalities.

- Categories: math
- Tags: calculus, from zhihu

### A polynomial whose sum of coefficients is a factorial

The function $\left(1-z\right)^{n+1}\sum_{k=1}^\infty k^nz^k$ is a polynomial of degree $n$ w.r.t. $z$, and the sum of its coefficients is $n!$. This turns out to be properties of Eulerian numbers.

- Categories: math
- Tags: combinatorics, number sequence, from zhihu

### The point on the circle farthest to two lines

Suppose $P$ is a point on the circle $\odot C$. When is the sum of distances from $P$ to two edges of $\angle O$ extremal? It turns out to be related to angle bisectors (the intersections of $\odot C$ and the bisector of $\angle O$ or its adjacent supplementary angle are extremals), while the edge cases (at the intersections of $\odot C$ and edges of $\angle O$) are a little tricky: we need to use the bisectors to divide the plane into four quadrants, pick the two quadrants where the line intersecting $\odot C$ at $P$ lies, translate the region to make it center at $C$, and see whether $P$ is inside the translated region.

- Categories: math
- Tags: elementary geometry, trigonometry, from zhihu

### Solving linear homogeneous ODE with constant coefficients

By using power series, we can prove that the problem of solving linear homogeneous ODE with constant coefficients can be reduced to the problem of solving a polynomial with those coefficients. This article illustrates this point in detail, but it uses a very awful notation…

- Categories: math
- Tags: calculus, linear algebra, combinatorics, ode, long paper, from zhihu

### Drawing a heart using Joukowsky transformation

Joukowsky transformation of a circle centered at $\left(1,1\right)$ of radius $1$ is a curve resembling a heart.

### Generalization of Euler–Lagrange equation

We may generalize Euler–Lagrange equation to higher dimensional optimization problems: find a function defined inside a region to extremize a functional defined as an integral over that region, with the constraint that the value of the function is fixed on the boundary of the region.