Inequality
Table of Contents
from IPython.display import YouTubeVideo
YouTubeVideo('CO0JK3JwSu4', width = "560", height = "315")
from IPython.display import YouTubeVideo
YouTubeVideo('CO0JK3JwSu4?si=4rMfQ8lKFv7bdmOo&start=224', width = "560", height = "315")
Let $x_1, x_2, \cdots, x_n$ be positive numbers
Then,
$$ \begin{align*} G&\leq A\\ \\ (x_1 x_2 \cdots x_n)^\frac{1}{n} \; &\leq \; \frac{x_1+x_2+\cdots +x_n}{n}\\\\ \end{align*} $$with equality if and only if $\;x_1 = x_2 = \cdots = x_n$
Generalized AGM Inequality (GAGM)
where
$$ \begin{align*} x_i &\geq 0\\ \sum_i^n a_i &= 1\\ a_i &\geq 0 \end{align*} $$with equality iff $\;x_1=x_2=\cdots=x_n$
A function $f(x)$ is said to be convex if
where
When $n = 2$
Consider the function of $f(x)=-\log{x}$.
Show that $f(x)=-\log{x}$ is convex.
Prove the generalized AGM inequality.
Solution
Jensen's Inequality when $f(x)$ is convex:
$$ f\left( \sum_{i} a_i x_i \right) \leq \sum_{i} a_i f(x_i) $$where $a_i \geq 0$ and $\sum_{i} a_i = 1$.
Now, applying this to $f(x) = -\log(x)$:
Taking the exponential of both sides:
This represents the generalized arithmetic-geometric mean inequality.
Solution
Solution
Solution
Wrong Solution
Correct Solution
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0.1, 3, 100)
y = x**2 + 1/(x**2) + 4*x + 4/x
plt.plot(x, y, 'k', linewidth = 2)
plt.xlabel('x')
plt.ylabel('f(x)')
plt.grid(alpha = 0.2)
plt.xlim([0, 2])
plt.show()
from IPython.display import YouTubeVideo
YouTubeVideo('CO0JK3JwSu4?si=KAPH3MbaRd5PIkYN&start=1343', width = "560", height = "315")
Definition of harmonic mean
Proof
Show
$$\left(\frac{1}{x_1}+\cdots+\frac{1}{x_n}\right) (x_1+\cdots+ x_n)\geq n^2$$Solution
Solution
When two resistors are connected in parallel
If $n$ pieces of resistors are connected in parallel, the equvalent $R_{eq}$ is
We know that
from IPython.display import YouTubeVideo
YouTubeVideo('CO0JK3JwSu4?si=rtBxfPaigl43fmGl&start=1858', width = "560", height = "315")
with equality iff $\exists \; a $ such that $x_i = ay_i, \; \forall i$
Proof
With equalty when $x \parallel y$ or $\cos\theta = \pm 1$
Solution
Solution
$$
\begin{align*}
\text{Equality at} \quad \begin{bmatrix} 3\\-1\end{bmatrix}\; \parallel \; \begin{bmatrix} x\\y\end{bmatrix}
\;\implies \;x=3t&=6\\
y=-t&=-2\\
t&=2
\end{align*}
$$
Solution
from IPython.display import YouTubeVideo
YouTubeVideo('CO0JK3JwSu4?si=KSedRIr_l4UX6rHA&start=2451', width = "560", height = "315")
where
$$ \begin{align*} \frac{1}{p}+\frac{1}{q} &=1\\ p,q &>1\\ x,y &>0 \end{align*} $$Proof
Set
$$ \begin{align*} x_1=x^p \quad a_1=\frac{1}{p}\\ x_2=y^p \quad a_2=\frac{1}{q} \end{align*} $$Then
$$$$$$ \begin{align*} x_1^\frac{1}{p}x_2^\frac{1}{q} &\leq\frac{1}{p}x_1+\frac{1}{q}x_2\\\\ \implies \quad x\cdot y &\leq\frac{1}{p}x^p+\frac{1}{q}y^q\\\\ \text{equal at}&\;x^p=y^q \end{align*} $$Example
$$xy\leq\frac{x^2}{2}+\frac{y^2}{2}\;\;\text{(True?)}$$%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')