## Archive of posts with tag “calculus”

### Defend our earth against aliens’ bullets!

The aliens intiated their attack to the earth! They shoot bullets with mass $m$ and speed $v$ from a far-awar planet. To defend, humans built a field $U=\alpha/r$ that can repel the bullets. What regions are safe? The answer turns out to be the interior of a circular paraboloid.

- Categories: physics
- Tags: calculus, classical mechanics, kepler problem, from zhihu

### 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

### 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

### 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

### Thoughts on a middle school thermal physics problem

To heat an object with hot water, if we divide the water into more parts and use each part to heat the object one after another, the final temperature will be higher. If the number of parts tends to infinity, then the final temperature will tend to the limit $T+\mathrm e^{-\frac C{C_0}}\left(T_0-T\right)$, where $T$ is the initial temperature of the object, $T_0$ is the temperature of the hot water, $C$ is the heat capacity of the object, and $C_0$ is the heat capacity of the hot water.

- Categories: physics
- Tags: calculus, number sequence, from zhihu

### 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.

### Simulating a mechanical system using rpg_core.js

Continuing my last work of simulating a mechanical system using RGSS3, I made a new version using rpg_core.js, the game scripting system shipped with RPG Maker MV. This version is live on web!

- Categories: physics
- Tags: javascript, rgss, hamiltonian, calculus, ode

### Simulating a mechanical system using RGSS3

Hamiltonian mechanics gives us a good way to simulate mechanical systems as long as we can get its Hamiltonian and its initial conditions. I implemented this simulation in RGSS3, the game scripting system shipped with RPG Maker VX Ace.

### The concentration change of gas in reversible reactions

A reversible elementary reaction takes place inside a closed, highly thermally conductive container of constant volume, whose reactants are all gases. Given the reaction equations and the reaction rate constants, a natural question to ask is how the concentration of each gas changes w.r.t. time. In this article, I will answer this question by proposing a general approach to solve it.

- Categories: chemistry
- Tags: calculus, ode, chemical reaction, long paper