# Maths hacks

August 18, 2016 — February 1, 2023

## 1 Handy inequalities

Young’s inequality for products:

If \(a \geq 0\) and \(b \geq 0\) are nonnegative real numbers and if \(p>1\) and \(q>1\) are real numbers such that \(\frac{1}{p}+\frac{1}{q}=1\), then \[ a b \leq \frac{a^p}{p}+\frac{b^q}{q} . \] Equality holds if and only if \(a^p=b^q\). \(a=b=2\) arises a lot in statistics.

My favourite generalisation: If \(0 \leq p_i \leq 1\) with \(\sum_i p_i=1\) then \[ \prod_i a_i^{p_i} \leq \sum_i p_i a_i \] Equality holds if and only if all the \(a_i\)s with non-zero \(p_i\)s are equal.

## 2 exp, sinh, cos etc

Avoid having to integrate by parts twice

Suppose \(f (x)\) and \(g (x)\) are functions that are each proportional to their second derivative. These include exponential, circular, and hyperbolic functions. Then the integral of \(f (x) g (x)\) can be computed in closed form with a moderate amount of work. There’s a formula that can compute all these related integrals in one fell swoop. (Pease 1959) Suppose \[ f^{\prime \prime}(x)=h f (x) \] and \[ g^{\prime \prime}(x)=k g (x) \] for constants \(h\) and \(k\). … Then \[ \int f (x) g (x) d x=\frac{1}{h-k}\left(f^{\prime}(x) g (x)-f (x) g^{\prime}(x)\right)+C \text {.} \]

## 3 Maclaurin integration

consider the integral \[ \int e^{x^2} d x \] The most common approach to evaluating this integral is to expand it as a power series and integrate term-by-term, which yields \[ C+x+\frac{x^3}{3}+\frac{x^5}{10}+\frac{x^7}{42}+\frac{x^9}{216}+\cdots \] as the antiderivative, with \(C\) as the constant of integration. Maclaurin Integration is an alternative solution by series (although not a power series, since it involves the function itself in the solution) that eliminates the nuisance of calculation completely.

…the formula is simply: \[ \int f(x) d x=-\sum_{u=0}^{\infty}\left(\frac{d^u}{d x^u}(x f(x)) \sum_{n=0}^{\infty} \frac{(1-x)^{n+u+1}}{\prod_{v=1}^{u+1}(n+v)}\right)+C, \] where \(C\) is the constant of integration.…

This formula is valid only if: 1. \(f(x)\) is defined on the domain \((0,2)\), 2. \(f(x)\) is continuous on \((0,2)\), and 3. \(x f(x)\) has derivatives of all orders on \((0,2)\).

## 4 References

*The American Mathematical Monthly*.