Showing posts with label geometry. Show all posts
Showing posts with label geometry. Show all posts

Friday, 19 June 2015

Inverse trigonometric functions

A fast way to find inverse functions (only for simple functions)
Note that a function and its inverse undo each other. Say $f(x)=2x+1$. The function $f$ takes $x$ and multiplies it by $2$ and then adds $1$. To undo that, we go in reverse orders. We first subtract $1$ from $x$ and then we divide the whole thing by $2$, giving us $f^{-1}(x)=\frac{x-3}{2}$. Here's one more example. Say $f(x)=\sqrt{x+2}$. $f$ takes $x$, adds $2$ and then take the square root. To undo the square root, we square x; and then instead of adding $2$, we subtract $2$. So $f^{-1}(x)=x^2-2$. Last example: $f(x)=\frac{1}{x+4}-2$. $f$ takes $x$, adds $4$, inverses the sum and then minuses $2$. $f^{-1}$ adds 2, inverses the sum and lastly minuses $4$. $f^{-1}(x)=\frac{1}{x+2}-4$
[Here we are using the term "function" loosely. Formally, when one talks about a function, the domain and codomain should be specified. For simplicity, we only provide the expression of the function.]

Differentiating inverse functions
Consider a linear function $l(x)=mx+b$. Its inverse will be $l^{-1}(y)=\frac{1}{m}y-\frac{b}{m}$. We then have $l'(x)=m$ and $(l^{-1})'(y)=\frac{1}{m}$, the reciprocal. We can express this by $\frac{dx}{dy}=\frac{1}{\frac{dy}{dx}}$.

Flipping the graphs preserves tangency.

Since the line $y=mx+b$ is tangent to the curve on the left and flipping the drawing should preserve this tangency, the line $x=\frac{1}{m}y-\frac{b}{m}$ is the tangent line to $x=f^{-1}(y)$ at $(y_0,x_0)$ and its slope $\frac{1}{m}$ should be the derivative $(f^{-1})'(y_0)$. Since $m=f'(x_0)$, we conclude that $(f^{-1})'(y_0)=\frac{1}{f'(x_0)}=\frac{1}{f'(f^{-1}(y_0))}$, or equivalently $f'(x_0)=\frac{1}{(f^{-1})'(f(x_0))}$.

Examples:
Find the derivative of the inverse of this real function $f(x)=2x+\cos x$.
$f'(x)=2-\sin x$.
$(f^{-1})'(x)=\frac{1}{f'(f^{-1}(x))}=\frac{1}{2-\sin f^{-1}(x)}$.

Let $y=f(x)=x^7+4x-5$. Find $(f^{-1})'(-5)$.
Note that $y=-5$ corresponds to $x=0$. Also, $f'(x)=7x^6+4$, so $(f^{-1})'(-5)=\frac{1}{f'(0)}=\frac{1}{4}$.

Inverse trigonometric functions and their derivatives

Sine and arcsine
The sine function $f: \mathbb{R} \to [-1,1] \; f(x)=\sin x$ is not one-to-one, but if we restrict the domain to be $[-\frac{\pi}{2},\frac{\pi}{2}]$, $f$ becomes one-to-one.

We have $\sin^{-1}y=x \iff \sin x=y \quad \text{and} \quad -\frac{\pi}{2}\leq x \leq \frac{\pi}{2}$.
Then $f^{-1}: [-1,1] \to [-\frac{\pi}{2},\frac{\pi}{2}] \quad f^{-1}(x)=\sin^{-1}x$.

The cancellation equations for inverse functions become
$\sin^{-1}(\sin x)=x \quad -\frac{\pi}{2}\leq x \leq\frac{\pi}{2}$
$\sin(\sin^{-1} x)=x \quad -1 \leq x \leq 1$.

                  
$y=\sin x, -\frac{\pi}{2}\leq x \leq\frac{\pi}{2}$              $y=\sin^{-1} x, -1\leq x \leq 1$

Let $y=\sin^{-1}x$. Then $y'=\frac{1}{\cos y}$ from the formula we discussed earlier. Alternatively, one can differentiate $\sin y=x$ implicitly with respect to x to yield the same result. Now $\cos y \geq 0$ since $-\frac{\pi}{2} \leq y \leq \frac{\pi}{2}$. We have $\cos y=\sqrt{1-\sin^2{y}}=\sqrt{1-x^2}$, thus $\frac{d}{dx}(\sin^{-1}x)=\frac{1}{\sqrt{1-x^2}} \quad -1<x<1$.

Cosine and arccosine
The inverse cosine function is handled similarly. The restricted cosine function $f(x)=\cos x, 0\leq x\leq \pi$, is one-to-one and so has an inverse function.

                  
$y=\cos x, 0 \leq x \leq \pi$                     $y=\cos^{-1} x, -1\leq x \leq 1$

We have $\cos^{-1}y=x \iff \cos x=y \quad \text{and} \quad 0\leq x \leq \pi$
and $f^{-1}: [-1,1] \to [0,\pi] \quad f^{-1}(x)=\cos^{-1}x$. Its derivative is given by $\frac{d}{dx}(\cos^{-1}x)=-\frac{1}{\sqrt{1-x^2}} \quad -1<x<1$.

Tangent and arctangent
The tangent function can be made one-to-one by restricting its domain to $(-\frac{\pi}{2},\frac{\pi}{2})$.

We have $\tan^{-1}y=x \iff \tan x=y \quad \text{and} \quad -\frac{\pi}{2}\leq x \leq \frac{\pi}{2}$
and $f^{-1}: \mathbb{R} \to (-\frac{\pi}{2},\frac{\pi}{2}) \quad f^{-1}(x)=\tan^{-1}x$.
We know that $\lim\limits_{x \to \frac{\pi}{2}^-} \tan x=\infty$ and $\lim\limits_{x \to -\frac{\pi}{2}^+} \tan x=-\infty$, namely, $x=\pm \frac{\pi}{2}$ are vertical asymptotes of the graph of $\tan x$. The graph of $\tan^{-1}$ is obtained by reflecting the graph of the restricted tangent function about $y=x$, it follows that $y=\pm \frac{\pi}{2}$ are horizontal asymptotes of the graph of $\tan^{-1}$. We thus have $\lim\limits_{x \to \infty} \tan^{-1} x=\frac{\pi}{2}$ and $\lim\limits_{x \to -\infty} \tan^{-1} x=-\frac{\pi}{2}$.

                  
$y=\tan x, -\frac{\pi}{2}\leq x \leq\frac{\pi}{2}$                        $y=\tan^{-1} x, x \in \mathbb{R}$

The derivative of the arctangent function is $\frac{d}{dx}(\tan^{-1}x)=\frac{1}{1+x^2} \quad -1<x<1$.

Inverse Hyperbolic Function and Their Derivatives

Inverse function integration
Suppose $f$ is a continuous one-to-one function. Then $\int f^{-1}(x)dx=xf^{-1}(x)-\int f(u) d(u)=xf^{-1}(x)-F(f^{-1}(x)).$

Definite integral version
$\int_a^b f^{-1}(x)=[xf^{-1}(x)]_a^b-\int_{f^{-1}(a)}^{f^{-1}(b)} f(u) du=[xf^{-1}(x)]_a^b-F(f^{-1}(b))+F(f^{-1}(a))$

Examples:
$\begin{align} \int \arctan x \:dx &= x\arctan x-\int \tan u \:du \quad [u=\arctan x]\\
&=x\arctan x+\ln|\cos u|+C\\ &=x\arctan x-\frac{1}{2}\ln(1+x^2)+C \end{align}$
since $\ln|\cos u|=\frac{1}{2}\ln(\cos^2 u)=-\frac{1}{2}\ln(\sec^2 u)=-\frac{1}{2}\ln(1+x^2)$.

$\int \ln x \:dx=x\ln x-x+C$
$\int \arccos x \:dx=x\arccos x-\sin(\arccos x)+C$

Here's an interesting theorem.
If $f(a)=c$ and $f(b)=d$, we have $\int_c^d f^{-1}(y)dy\:\text{[blue region]}+\int_a^b f(x)dx\:\text{[grey region]}=bd-ac$.
Proof without words
Higher derivatives
Related

Reference:
Differentiating inverse functions
Inverse trigonometric functions and their derivatives

Thursday, 30 April 2015

Interesting proof of Heron's formula

Area of $\triangle ABC=\sqrt{s(s-a)(s-b)(s-c)}$, $s=\frac{1}{2}(a+b+c)$

$2s=2t+2(c-t)+2(b-t)$
$\begin{cases} s=b+c-t\:\:\:(1)\\2s=b+c+a\:\:\:(2)\end{cases}$
$(2)-(1), s=a+t \Rightarrow t=s-a$
$\text{From (1)}, s-b=c-t\:\text{and}\: s-c=b-t$

$\begin{cases}\tan \frac{A}{2}=\frac{R}{s-a} \\ \tan \frac{B}{2}=\frac{R}{s-b}\end{cases}\\
\Rightarrow \large \tan \frac{A}{2} \tan \frac{B}{2}=\frac{R^2}{(s-a)(s-b)}$

Similarly,
$\large{\tan \frac{A}{2} \tan \frac{C}{2}=\frac{R^2}{(s-a)(s-c)}\\
\tan \frac{B}{2} \tan \frac{C}{2}=\frac{R^2}{(s-b)(s-c)}}$

Adding all the three results,
$\large{\tan \frac{A}{2} \tan \frac{B}{2}+\tan \frac{A}{2} \tan \frac{C}{2}+\tan \frac{B}{2} \tan \frac{C}{2}\\
=R^2[\frac{1}{(s-a)(s-b)}+\frac{1}{(s-a)(s-c)}+\frac{1}{(s-b)(s-c)}]\\
=R^2[\frac{s-c+s-b+s-a}{(s-a)(s-b)(s-c)}]\\
=\frac{R^2s}{(s-a)(s-b)(s-c)}}$

Now, $A+B=\pi-C$.
$\frac{A}{2}+\frac{B}{2}=\frac{\pi}{2}-\frac{C}{2}\\
\large{\tan (\frac{A}{2}+\frac{B}{2})=\frac{1}{\tan \frac{C}{2}}\\
\frac{\tan \frac{A}{2}+\tan \frac{B}{2}}{1-\tan \frac{A}{2} \tan \frac{B}{2}}=\frac{1}{\tan \frac{C}{2}}\\
\tan \frac{A}{2} \tan \frac{C}{2}+\tan \frac{B}{2} \tan \frac{C}{2}=1-\tan \frac{A}{2} \tan \frac{B}{2}\\
\tan \frac{A}{2} \tan \frac{B}{2}+\tan \frac{A}{2} \tan \frac{C}{2}+\tan \frac{B}{2} \tan \frac{C}{2}=1}$
$\large{\therefore 1=\frac{R^2s}{(s-a)(s-b)(s-c)}\\
R=\sqrt{\frac{(s-a)(s-b)(s-c)}{s}}}$

Area of $\triangle ABC=\frac{1}{2}(aR+bR+cR)=sR=\sqrt{s(s-a)(s-b)(s-c)}\:\Box$

Saturday, 18 April 2015

Geometry of lines and planes II

Equation of a line through a line with position vector $\vec{a}$ parallel to $\vec{b}$



Vector form
$\vec{r}=\vec{a}+\lambda\vec{b},\lambda \in \mathbb{R}$

Cartesian form
$\vec{r}=(x,y,z), \vec{a}=(a_1,a_2,a_3), \vec{b}=(b_1,b_2,b_3)$
$(x,y,z)=(a_1+\lambda b_1,a_2+\lambda b_2,a_3+\lambda b_3)$
$\Rightarrow x=a_1+\lambda b_1, y=a_2+\lambda b_2, z=a_3+\lambda b_3$

If $b_1,b_2,b_3 \neq 0$, then eliminating $\lambda$ from these equations yields
$\frac{x-a_1}{b_1}=\frac{y-a_2}{b_2}=\frac{z-a_3}{b_3}(=\lambda)$

Example:
Equation of line through $(-2,0,5)$ parallel to $(1,2,-3)$
$\frac{x+2}{1}=\frac{y}{2}=\frac{z-5}{-3} \Rightarrow 3y=6x+12=10-2z$

Example:
Equation of line through $(1,2,3)$ parallel to $(-2,0,5)$
Note that $b_2=0$ in this case.
$x=1-2\lambda, y=2+0\lambda, z=3+5\lambda$
Eliminating $\lambda \Rightarrow y=2, \frac{1-x}{2}=\frac{z-3}{5}$
Thus, the equations are $y=2, 5x+2z=11$.

Remark: Both equations are needed to describe the line. Each equation on its own describes a plane. The required line is the intersection of these two planes.



Equation of a line through two points



$\vec{AB}=\vec{b}-\vec{a}$

Vector form
$\vec{r}=\vec{a}+\lambda(\vec{b}-\vec{a})=(1-\lambda)\vec{a}+\lambda\vec{b}, \lambda \in \mathbb{R}$

Cartesian form
$x=a_1+\lambda(b_1-a_1), y=a_2+\lambda(b_2-a_2), z=a_3+\lambda(b_3-a_3)$
or $\Large \frac{x-a_1}{b_1-a_1}=\frac{y-a_2}{b_2-a_2}=\frac{z-a_3}{b_3-a_3}$ if the denominators are non-zero.

Example:
Prove that medians of a triangle are concurrent.



Proof:
Let $\vec{a}$ be the position vector from the origin to A, $\vec{b}$ be the position vector from the origin to B, and so on.
Then $\vec{f}=\frac{1}{2}(\vec{a}+\vec{b}),\vec{e}=\frac{1}{2}(\vec{b}+\vec{c}),\vec{e}=\frac{1}{2}(\vec{a}+\vec{c})$
Any point on the line BE is given by $(1-\lambda)\vec{b}+\lambda\frac{1}{2}(\vec{a}+\vec{c})$.
Similarly, any point on AD is $(1-\mu)\vec{a}+\mu\frac{1}{2}(\vec{b}+\vec{c})$.
Since $G$ lies on both of these lines, we have $(1-\lambda)\vec{b}+\lambda\frac{1}{2}(\vec{a}+\vec{c})=(1-\mu)\vec{a}+\mu\frac{1}{2}(\vec{b}+\vec{c})$.
$\Rightarrow 1-\lambda=\frac{\mu}{2}$ and $\frac{\lambda}{2}=1-\mu$
$\Rightarrow \lambda=\mu=\frac{2}{3}$
Therefore $G=\frac{1}{3}(\vec{a}+\vec{b}+\vec{c})$.
Finally, check that G lies on CF.



Equation of plane through the origin and parallel to $\vec{a}$ and $\vec{b}$



$\vec{r}=\lambda\vec{a}+\mu\vec{b}, \lambda, \mu \in \mathbb{R}$



Equation of plane through C parallel to $\vec{a}$ and $\vec{b}$

A general plane can be specified by giving two vectors which lie on the plane and the position vector of a point lying on the plane.



$\vec{r}=\vec{OP}=\vec{OC}+\vec{CP}=\vec{c}+\lambda\vec{a}+\mu\vec{b}, \lambda, \mu \in \mathbb{R}$



Equation of plane through points $\vec{a},\vec{b},\vec{c}$

We can also specify a plane uniquely by giving 3 non-collinear points which lie on it.


$\vec{r}=\vec{a}+\lambda(\vec{b}-\vec{a})+\mu(\vec{c}-\vec{a})=(1-\lambda-\mu)\vec{a}+\lambda\vec{b}+\mu\vec{c}, \lambda, \mu \in \mathbb{R}$



Equation of plane in terms of normal to the plane


Projection of $OP$ onto $ON=\vec{r}\cdot\hat{n}=p$
Let $\hat{n}=(a,b,c), \vec{r}=(x,y,z)$
$ax+by+cz=p$

Key point:
One parameter is needed to write the equation of a line and two parameters are needed for that of a plane.

More

Friday, 17 April 2015

Geometry of lines and planes I

Distance of two points in 3 dimensions
$|P_1P_2|=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}$
$\begin{align}|P_1P_2|^2 &=|P_1B|^2+|BP_2|^2\\&=|P_1A|^2+|AB|^2+|BP_2|^2\\&=(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2\end{align}$

Direction cosine
$\vec{a}=\langle a_1,a_2,a_3 \rangle$
The angles $\alpha,\beta,\gamma$ in $[0,\pi]$ that $\vec{a}$ makes with $x,y,z$ axes respectively are direction angles of $\vec{a}$.
$\Large\cos \alpha=\frac{\vec{a}\cdot \hat{i}}{|\vec{a}||\hat{i}|}=\frac{\langle a_1,a_2,a_3 \rangle \cdot \langle 1,0,0 \rangle}{|\langle a_1,a_2,a_3 \rangle||\langle 1,0,0 \rangle|}=\frac{a_1}{|\vec{a}|}$
Similarly, $\large \cos \beta=\frac{a_2}{|\vec{a}|}$ and $\large \cos \gamma=\frac{a_3}{|\vec{a}|}$.
Thus, $\vec{a}=|\vec{a}|\langle \cos\alpha,\cos\beta,\cos\gamma \rangle$
Note also that $\cos^2\alpha+\cos^2\beta+\cos^2\gamma=\frac{1}{|\vec{a}|^2}(a_1^2+a_2^2+a_3^2)=1$

Dot product in component form
Cosine Law: $\begin{align} |\vec{a}-\vec{b}|^2&=|\vec{a}|^2+|\vec{b}|^2-2|\vec{a}||\vec{b}|\cos \theta\\ &=|\vec{a}|^2+|\vec{b}|^2-2\vec{a}\cdot\vec{b}\end{align}$
$\begin{align} \vec{a}\cdot \vec{b}&=|\vec{a}||\vec{b}|\cos \theta\\
&=\frac{1}{2}(|\vec{a}|^2+|\vec{b}|^2-|\vec{a}-\vec{b}|^2)\\&=\frac{1}{2}[a_1^2+a_2^2+a_3^2+b_1^2+b_2^2+b_3^2-(a_1-b_1)^2-(a_2-b_2)^2-(a_3-b_3)^2]\\&=a_1b_1+a_2b_2+a_3b_3 \end{align}$

Projections
scalar projection of $\vec{b}$ onto $\vec{a}$:
$\large \text{comp}_\vec{a} \vec{b}=|\vec{b}|\cos \theta=\frac{\vec{a}\cdot \vec{b}}{|\vec{a}|}=\frac{\vec{a}}{|\vec{a}|}\cdot \vec{b}$
vector projection of $\vec{b}$ onto $\vec{a}$:
$\large \text{proj}_\vec{a} \vec{b}=\frac{\vec{a}\cdot \vec{b}}{|\vec{a}|} \cdot \frac{\vec{a}}{|\vec{a}|}=\frac{\vec{a}\cdot \vec{b}}{|\vec{a}|^2} \vec{a}$

Scalar triple product
volume of a parallelepiped $V=Ah=|\vec{b}\times\vec{c}||\vec{a}|\cos \theta=|\vec{a}\cdot (\vec{b} \times \vec{c})|$
The base parallelogram can be determined by [$\vec{b}$ and $\vec{c}$] or [$\vec{a}$ and $\vec{b}$].
Also, because of the commutative property of dot products, we have $\vec{a}\cdot (\vec{b} \times \vec{c})=(\vec{a} \times \vec{b}) \cdot \vec{c}$.

symmetric equation, vector equation, scalar equation of the plane through a point with normal vector, linear equation

skew lines

More to know [later]
Orthogonal projection
$\large \text{ortho}_\vec{a} \vec{b}=\vec{b}-\text{proj}_\vec{a} \vec{b}$

Parallelogram Law
$|\vec{a}+\vec{b}|^2+|\vec{a}-\vec{b}|^2=2|\vec{a}|^2+2|\vec{b}|^2$
geometric meaning

Vector and chemistry
Bond angle 109.5

Vector triple product
$\vec{a}\times\vec{b}\times\vec{c}=(\vec{a}\cdot\vec{c})\vec{b}-(\vec{a}\cdot\vec{b})\vec{c}$
$\Rightarrow \vec{a}\times(\vec{b}\times\vec{c})+\vec{b}\times(\vec{c}\times\vec{a})+\vec{c}\times(\vec{a}\times\vec{b})=\vec{0}$

$(\vec{a}\times\vec{b})\cdot(\vec{c}\times\vec{d})=\begin{vmatrix}\vec{a}\cdot\vec{c} & \vec{b}\cdot\vec{c}\\ \vec{a}\cdot\vec{d} & \vec{b}\cdot\vec{d} \end{vmatrix}$

crystallography

Useful:
http://www.math.jhu.edu/~hhaosu/Teaching/0607FCalcIII/
http://www.math.jhu.edu/~hhaosu/Teaching/0607FCalcIII/06FMA261AHW02Sol.pdf
http://www.leadinglesson.com/problem-on-orthogonal-matrices

Thursday, 2 April 2015

Naming quadric surfaces

Non-degenerate real quadric surfaces
$\frac{x^2}{a^2}+\frac{y^2}{b^2}-z=0\\
z=\frac{x^2}{a^2}+\frac{y^2}{b^2}$
Consider the horizontal cross section (level curve) of z by setting $z=c$.
We have $\frac{x^2}{a^2}+\frac{y^2}{b^2}=c$, which is the equation for an ellipse.
Now consider the vertical cross section of z at $x=c$.
We get $z=\frac{c^2}{a^2}+\frac{y^2}{b^2}$ -- a constant plus $\frac{y^2}{b^2}$, which is the equation of a parabola. Similarly, the vertical cross section of z at $y=c$ is also a parabola.
We know that the figure is a elliptical paraboloid.

When we change b (denominator) to a, we have a circular paraboloid.

$\frac{x^2}{a^2}-\frac{y^2}{b^2}-z=0\\
z=\frac{x^2}{a^2}-\frac{y^2}{b^2}$
Horizontal cross section: $\frac{x^2}{a^2}-\frac{y^2}{b^2}=c\:\:[z=c]\Rightarrow$ hyperbola
Vertical cross section: $\frac{x^2}{a^2}- \text{constant}$ or $\text{constant} - \frac{y^2}{b^2} \Rightarrow$ parabola
Surface: Hyperbolic paraboloid

$\frac{x^2}{a^2}+\frac{y^2}{b^2}-\frac{z^2}{c^2}=1$
Horizontal cross section: $\frac{x^2}{a^2}+\frac{y^2}{b^2}=\frac{k^2}{c^2}+1\:\:[z=k] \Rightarrow$ ellipse
Vertical cross section: $\frac{x^2}{a^2}-\frac{z^2}{c^2}=1-\frac{m^2}{b^2}\:\:[y=m]$ or $\frac{y^2}{b^2}-\frac{z^2}{c^2}=1-\frac{n^2}{a^2}\:\:[x=n] \Rightarrow$ hyperbola
Surface: Elliptical hyperboloid of one sheet

$\frac{x^2}{a^2}+\frac{y^2}{b^2}-\frac{z^2}{c^2}=-1$
Horizontal cross section: $\frac{x^2}{a^2}+\frac{y^2}{b^2}=\frac{k^2}{c^2}-1\:\:[z=k] \Rightarrow$ generally ellipse
There are no horizontal cross sections when z is between -1 and 1. For simplicity, we can look at the equation $-x^2-y^2+z^2=1$. Suppose $z=0$. Then the left hand side is negative, but the right hand side is positive. There's no way to fix this, so the cross section simply doesn't exist!
Vertical cross section: $\frac{z^2}{c^2}-\frac{x^2}{a^2}=1+\frac{m^2}{b^2}\:\:[y=m]$ or $\frac{z^2}{c^2}-\frac{y^2}{b^2}=1+\frac{n^2}{a^2}\:\:[x=n] \Rightarrow$ hyperbola
Surface: Elliptical hyperboloid of two sheets

Here's a hint about telling the two kinds of hyperboloids apart: look at the cross sections x=0, y=0, and z=0 (respectively but not simultaneously). If they exist, then it's a hyperboloid of one sheet. If you end up with something negative equal to something positive, it's a hyperboloid of two sheets.

Degenerate quadric surfaces
$\frac{x^2}{a^2}+\frac{y^2}{b^2}-\frac{z^2}{c^2}=0$
Horizontal cross section: $\frac{x^2}{a^2}+\frac{y^2}{b^2}=\frac{k^2}{c^2}\:\:[z=k] \Rightarrow$ ellipse
Vertical cross section:
(1) $\frac{z^2}{c^2}-\frac{x^2}{a^2}=\frac{m^2}{b^2}\:\:[y=m]$ or $\frac{z^2}{c^2}-\frac{y^2}{b^2}=\frac{n^2}{a^2}\:\:[x=n] \Rightarrow$ hyperbola
(2) $\frac{x^2}{a^2}-\frac{z^2}{c^2}=0\:\:[y=0]$ or $\frac{y^2}{b^2}-\frac{z^2}{c^2}=0\:\:[x=0]$ $\iff (\frac{x}{a}-\frac{z}{c})(\frac{x}{a}+\frac{z}{c})=0$ or $(\frac{y}{b}-\frac{z}{c})(\frac{y}{b}+\frac{z}{c})=0 \Rightarrow$ pair of straight lines
Surface: Elliptic Cone

$\frac{x^2}{a^2}+\frac{y^2}{a^2}-\frac{z^2}{b^2}=0$ -- Special case of cone (Circular cone)
$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ -- Elliptic cylinder
$\frac{x^2}{a^2}+\frac{y^2}{a^2}=1$ -- Circular cylinder
$\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$ -- Hyperbolic cylinder

Useful website:
Quadric surfaces

Thursday, 29 January 2015

Interesting Graphs: Catenary


If a flexible string is suspended under gravity by its two ends, the shape resembles a chain (Latin catena). That's why the curve is called a catenary. The equation of a catenary in Cartesian coordinates: $y=a\cosh \frac{x}{a}$, where $a$ is a constant; $a$ depends on the mass per unit length and tension of the string. The derivation of equation for the curve can be found here.

Catenaries occur naturally, since they minimize the gravitational potential energy of a string or rope whose location is fixed at two ends, which is equivalent to minimizing the area under the string. But they are also optimal for architects when a flexible cable (or its equivalent) is subject to a uniform force (e.g., gravity or the weight of a bridge, etc.).

Catenoids
The catenoid is a surface of revolution of a catenary curve rotated around its directrix.



Claim: Catenoids are minimal surfaces that minimizes area for a given boundary.

Definition: A minimal surface is a surface $M$ with mean curvature $H=0$ at all points $p \in M$.

Mean curvature $\large H=\frac{Eg+Ge-2Ff}{2(EG-F^2)}$ [Proof: later]

Proof of the claim:

A catenoid can be parametrized by $$x(u,v)=(a\cosh v \cos u,a\cosh v \sin u,av).$$ We then evaluate the partial derivatives of $x$: $$x_u = (-a\cosh v \sin u,a\cosh v \cos u,0)\\
x_v = (-a\sinh v \cos u,a\sinh v \sin u,a)$$ We know that $$n=\frac{x_u \times x_v}{|x_u \times x_v|},$$ and so we have the coefficients of the first fundamental form: $$E=x_u \cdot x_u=a^2\cosh^2 u\\
F=x_u \cdot x_v=0\\
G=x_v \cdot x_v=a^2\cosh^2 u,$$ and the coefficients of the second fundamental form: $$e=n \cdot x_{uu}=-a\\
f=n \cdot x_{uv}=0\\
g=n \cdot x_{vv}=a.$$ Substituting the values to $H$, we have $$H=\frac{Eg+Ge-2Ff}{2(EG-F^2)}=0$$ Thus, catenoid is a minimal surface.

2nd method:
http://www.princeton.edu/~rvdb/WebGL/catenoid_explanation.html

Similarity of catenary and parabola
In the previous post, we have proved that $\cosh x=\frac{e^x+e^{-x}}{2}$, then we have $\cosh x=1+\frac{x^2}{2!}+\frac{x^4}{4!}+...$
For $x\approx 0$, $\cosh x \approx 1+\frac{x^2}{2}$.
RHS represents a parabola, so we conclude that for small $x$, a catenary can be approximated by a parabola.

A common misconception is that a parabola can be used to construct an arch. If we look at the function for a parabola, we see that the slope at any point is given by $2x$ and is changing linearly. On the other hand if we look at the function $\cosh x$, we see that the slope at any point is given by $\frac{e^x-e^{-x}}{2}$, which means the slope of a catenary curve is changing exponentially. In other words, the legs of an inverted catenary curve will be straighter at the base of the arch compared to an inverted parabola, giving the structure more horizontal support.

Applications
Real life examples of catenaries include the cables of a suspension bridge, a rope hanging between two posts, each strand of a spider web, and the Gateway Arch in St. Louis.

If you use physics to model the differential equation describing the effect of a uniform force on a flexible cable, its solution will be of the form $A\cosh ax$.

Reference:
http://www.ias.ac.in/resonance/Volumes/11/08/0081-0085.pdf
http://aleph0.clarku.edu/~djoyce/ma131/gallery.pdf
http://www.princeton.edu/~rvdb/WebGL/catenoid_explanation.html

Tuesday, 27 January 2015

Hyperbolic sines and cosines

We all know that the equation for a circle is $x^2+y^2=1$. What about that for a hyperbola? It is $x^2-y^2=1$. Since $\cosh t, \sinh t$ satisfy this equation, that is, $\cosh^2 t - \sinh^2 t=1$, they are called hyperbolic functions.

In this post, we will prove two results: $$\cosh a=\frac{e^a+e^{-a}}{2}\\ \sinh a=\frac{e^a-e^{-a}}{2}.$$

In the right figure, the area of the sector of the rectangular hyperbola $x^2-y^2=1$ bounded by the x-axis, ray, and hyperbola is $\dfrac{a}{2}$.

Proof:

Prerequisite knowledge:
Area of the sector of a parametric curve
Area of the sector bounded by two radii and the arc $P_0P$ of a parametric curve is given by $A=\frac{1}{2}\int_{t_0}^t [x(t)y'(t)-y(t)x'(t)]dt$ where the parametric values, $t_0$ and t relate to the endpoints, $P_0$ and P of the arc, respectively.

Now, we can find the area of the sector.
Since $\cosh^2 a-\sinh^2 a=1$, we have a parametric curve $x=\cosh a, y=\sinh a$.
Then $x'(a)=\sinh a, y'(a)=\cosh a$.
$x(a)y'(a)=\cosh^2 a, y(a)x'(a)=\sinh^2 a$
$A=\frac{1}{2}\int_0^a (\cosh^2 a-\sinh^2 a)da=\frac{1}{2}\int_0^a da=\frac{a}{2} \:\Box$


$\frac{a}{2}=\frac{1}{2}xy-\int_1^x y\:dx$
$a=x\sqrt{x^2-1}-2\int_1^x \sqrt{x^2-1}\:dx$
$2\int_1^x \sqrt{x^2-1}\:dx\\=2\int_0^{\sec^{-1} x} \sqrt{\sec^2 u-1} \tan u \sec u \:du\\=2\int_0^{\sec^{-1} x} \tan^2 u \sec u\:du\\=2\int_0^{\sec^{-1} x} \frac{\sin^2 u}{\cos^3 u}du\\=\int_0^{\sec^{-1} x} \sin u \: d(\cos^{-2} u)\\=\frac{\sin u}{\cos^2 u}|_0^{\sec^{-1} x}-\int_0^{\sec^{-1} x}\cos^{-2} u \cos u \: du \quad (*)\\=xy-\int_0^{\sec^{-1} x}\sec u\:du\\=xy-[\ln|\sec u+\tan u|]_0^{\sec^{-1} x}\\=xy-\ln|x+\sqrt{x^2-1}| \quad (**)$
$a=xy-xy+\ln|x+\sqrt{x^2-1}|=\ln|x+\sqrt{x^2-1}|$
$e^a=x+\sqrt{x^2-1}$
$e^{2a}=x^2+2x\sqrt{x^2-1}+x^2-1=2x(x+\sqrt{x^2-1})-1=2xe^a-1$
$e^{2a}+1=2xe^a$
$e^a+e^{-a}=2x \Rightarrow x \equiv \cosh a = \frac{e^a+e^{-a}}{2}$
$\sinh a \equiv y=\sqrt{(\frac{e^a+e^{-a}}{2})^2-1}=\sqrt{\frac{e^{2a}+2+e^{-2a}}{4}-1}=\sqrt{\frac{(e^a-e^{-a})^2}{4}}=\frac{e^a-e^{-a}}{2} \Box$

Explanations:
$(*) \frac{\sin u}{\cos^2 u}|_0^{\sec^{-1} x}=\sec u \tan u |_0^{\sec^{-1} x}$
$(**) \tan (\sec^{-1} x)=\:?\\ \sec^{-1} x=y\\ \sec y=x\\ \sec^2 y=x^2\\ 1+\tan^2 y=x^2\\ \tan^2 y=x^2-1\\ \
\therefore \tan (\sec^{-1} x)=\sqrt{x^2-1}$

Relationship to differential equation
In physics, one of the most important differential equation is $y^{\prime \prime}(x)+a^2y(x)=0$. The solution of this equation is $y=A \cos(ax)+B \sin(ax)$, where A and B are constants. (Verify it yourself: differentiate the expression twice.) From trying this yourself, you probably think that the solution to $y^{\prime \prime}(x) - a^2y(x)=0$ is $y=A \cosh(ax)+B \sinh(ax)$. In fact, it is the solution!

Application of hyperbolic trig functions
They are used in the field of engineering, and can be used to solve second order ordinary differential equations. Going beyond this, we can often find hyperbolic trig functions being used in architecture. In particular, the cosh function is used to trace out a curve called a catenary, which is formed from simply hanging a string from two equally high points. We will discuss more about catenary in another post.

References:
http://math.scu.edu/~dostrov/Hyperbolic_Functions.pdf
http://www.nabla.hr/CL-DefiniteIntAppl2.htm
http://www.mathed.soe.vt.edu/Undergraduates/EulersIdentity/HyperbolicTrig.pdf

Sunday, 18 January 2015

Interesting Graphs: Conics

Conic sections: intersection curves of a plane and a right circular conical surface



The four conic sections (hyperbola, parabola, ellipse, circle) are produced when the plane does NOT pass through the vertex. When the plane passes through the vertex, degenerate conics (two intersecting lines, a line, a point) will be produced.

Conics are generally given by a second degree equation: $Ax^2+Bxy+Cy^2+Dx+Ey+F=0$
$Δ>0$ hyperbola, pair of intersecting lines
$Δ<0$ ellipse, circle, point or no graph
$Δ=0$ parabola, line, pair of parallel lines or no graph

Demonstration:


Green: Hyperbola $Δ=5^2-4(2)(2)=9>0$
Orange: Ellipse $Δ=1^2-4(2)(2)=-15<0$
Blue: Circle $Δ=0^2-4(2)(2)=-16<0$
Purple: Parabola $Δ=4^2-4(2)(2)=0$

 

Hyperbola: the set of points in a plane whose distances from two fixed points (foci) in the plane have a constant difference.
Implicit form: $\dfrac{(x-h)^2}{a^2}-\dfrac{(y-k)^2}{b^2}=1$
Parametric form: $x=h+a\sec\theta$, $y=k+b\tan\theta$

 

Ellipse: the set of all points in a plane whose distances from two fixed points (foci) in the plane have a constant sum.
Implicit form: $\dfrac{(x-h)^2}{a^2}+\dfrac{(y-k)^2}{b^2}=1$
Parametric form: $x=h+a\cos\theta$, $y=k+b\sin\theta$

Ellipses and hyperbolas are called central conics because they have a centre of symmetry, while parabolas are non-central. For both ellipses and hyperbolas, a and b are the axis lengths. The larger one of a and b is the major axis while the smaller one is the minor axis.

Circle:
Implicit form: $(x-h)^2+(y-k)^2=r^2$
Parametric form: $x=h+r\cos\theta$, $y=k+r\sin\theta$

 

Parabola:
Implicit form: $x^2=4py$
Parametric form: $x=t$, $y=\dfrac{t^2}{4p}$

How to distinguish between non-degenerate and degenerate conics?
[pending]

Conics in matrix form
Each point $\vec{x}=(x,y)$ is considered to be a column vector with 1 as its third component, i.e. $\vec{x}=\begin{pmatrix} x\\y\\1\end{pmatrix}$ and $\vec{x}^T= (x, y, 1)$. The six coefficients of the general second degree polynomial are then used to construct a 3x3 symmetric matrix as follows: $\vec{Q}=\begin{pmatrix} A&B&D\\B&C&E\\D&E&F\end{pmatrix}$
$\vec{x}^T\vec{Q}\vec{x}=\vec{0}$

Application:
Although conics and quadric surfaces existed around 2000 years ago, they are still the most popular objects in many computer aided design and modeling systems.

Sunday, 21 December 2014

A problem on curve sketching

I came across an interesting problem on curve sketching a few weeks ago.

Question:


From the first two given information, we know f(x) is continuous at x=0, with value 1. From the third, we know f(x) is not differentiable at x=0, meaning we should expect a cusp at x=0. The slopes -1 and 1 should be noted as well. Using the last piece of information, horizontal asymptote: y=2. (?) f(x) also has to be an even function.

Now, sketching the curve is straightforward, but can we find functions that fit the above requirements?


We know the graph should look something like this.

First, look for functions with horizontal asymptote, examples being $\frac{1}{x^2+1}$ and arctan x. However, we can rule out $\frac{1}{x^2+1}$ because it does not fulfill the 3rd requirement as $\lim_{h \to 0} \frac{f(h)-f(0)}{h} = 0$. We now try f(x) = arctan x. To reach the desired graph, we need to transform the graph. $f(0)=1 \Rightarrow y=\arctan x +1$

Before we continue...

Prerequisite knowledge:
Range of arctan x
Since tan x would not be a function if inverted, only one cycle of tan x is used when finding its inverse, arctan x. The cycle that includes (0, 0) is chosen such that for tan x, domain: $(-\frac{\pi}{2}, \frac{\pi}{2})$ and range: (-∞, ∞) So for its inverse, domain: (-∞, ∞), range:$(-\frac{\pi}{2}, \frac{\pi}{2})$

Now, we want $\lim_{x \to \pm \infty}f(x)=2$, since the upper bound is $\frac{\pi}{2}$ $(\lim_{x \to +\infty} \arctan x=\frac{\pi}{2})$, multiply arctan x by $\frac{2}{\pi}\Rightarrow \frac{2}{\pi}\arctan (ax)+1$. Yet another requirement: f'(0)=1, $f'(x)=\frac{2}{\pi}\frac{a}{1+(ax)^2} \Rightarrow$ set $a=\frac{\pi}{2}$. Finally, $f(x)=\frac{2}{\pi}\arctan (\frac{\pi x}{2})+1$. Since it has to be an even function, we define $f(x)$ to be a piecewise function:

$$f(x)=
\begin{cases}
\frac{2}{\pi}\arctan (\frac{\pi x}{2})+1 & x \geq 0 \\
-\frac{2}{\pi}\arctan (\frac{\pi x}{2})+1 & x<0
\end{cases}$$


My question:
What are other functions that meet the 5 requirements?

Saturday, 20 December 2014

Interesting Graphs: Wave

Interestingly, there are mathematical equations that describe waves.

We all know that sine and cosine functions are wave-like functions. One fact you may not know is that a rational function can look like a single pulse wave! [Edited on 26.1: Just discovered another function that resembles a wave: $e^{-x^2}$!]


In general, $y=\dfrac{a}{x^2+b}$ looks like a pulse centered at $x=0$, where $a,b$ are positive real numbers $\neq 0$.
Question: Why does it have to be "+b"?

Having learnt transformation of graphs, we know that $f(x-a)$ is formed by translating $f(x)$ to the right a units; $f(x+a)$ to the left a units, where $a>0$.

For waves,
$y(x, t) = f(x-vt)$ $\Rightarrow$ wave travelling to the right with speed v,
$y(x, t) = f(x+vt)$ $\Rightarrow$ wave travelling to the left with speed v.

Example:


$f(x) = \dfrac{5}{x^2+1}$
"Purple wave": $f(x-vt)$
"Orange wave": $-f(x+vt)$
The "purple wave" is moving to the right, where the "orange wave" is moving to the left. In this case, $v=5$, $t=1$ or $v=1$, $t=5$.

Demonstration of Constructive Interference
For simplicity, choose $v=1$.


At $t=1$,
"Green wave": moving to the right
$y=\dfrac{5}{(x-1+10)^2+1}$
There has to be $\pm$constant, in this case, +10, because otherwise we won't have constructive interference.
"Blue wave": moving to the left


At $t=5$, we have constructive interference: superposition of two waves (represented by the green curve).

$\dfrac{10}{(x+5)^2+1} = \dfrac{5}{(x-5+10)^2+1} + \dfrac{5}{(x+5)^2+1}$



At $t=10$,
"Green wave": moving to the right
"Blue wave": moving to the left

Demonstration of Destructive Interference




Destructive interference: The two waves cancel out each other.


For your information:


Cauchy distribution
The simplest Cauchy distribution is called the standard Cauchy distribution. It is the distribution of a random variable that is the ratio of two independent standard normal variables and has the probability density function $$f(x;0,1)=\dfrac{1}{\pi(1+x^2)}.$$

Its cumulative distribution function has the shape of $\arctan x$:
$$F(x;0,1)=\frac{1}{\pi}\arctan x+\frac{1}{2}.$$