---
# System prepended metadata

title: Mathematical formula
tags: [mechanics, math tools]

---

# Mathematical formula
## Trigonometric function
$$sin^2\theta+cos^2\theta = 1$$

$$sec^2\theta = 1+tan^2\theta$$

$$csc^2\theta = 1+cot^2\theta$$

$$sin^2\frac{\theta}{2} = \frac{1}{2}(1-cos\theta)$$

$$sin2\theta = 2sin\theta cos\theta$$

$$cos^2\frac{\theta}{2} = \frac{1}{2}(1+cos\theta)$$

$$cos2\theta = cos^2\theta-sin^2\theta$$

$$1-cos\theta = 2sin^2\frac{\theta}{2}$$

$$tan2\theta = \frac{2tan\theta}{1-tan^2\theta}$$

$$tan\frac{\theta}{2} = \sqrt{\frac{1-cos\theta}{1+\theta}}$$

$$sin(A\pm B) = sinAcosB\pm cosAsinB$$

$$cos(A\pm B) = cosAcosB\mp sinAsinB$$

$$sinA\pm sinB = 2sin(\frac{1}{2}(A\pm B))cos(\frac{1}{2}(A\mp B))$$

$$cosA+cosB = 2cos(\frac{1}{2}(A+B))cos(\frac{1}{2}(A-B))$$

$$cosA-cosB = 2cos(\frac{1}{2}(A+B))sin(\frac{1}{2}(B-A))$$

## Expansion
$$(a+b)^n = a^n+\frac{n}{1!}a^{n-1}b+\frac{n}{2!(n-2)!}a^{n-2}b^2+...$$

$$(1+x)^n = 1+nx+\frac{n}{2!(n-2)!}x^2+...$$

$$e^x = 1+x+\frac{x^2}{2}+\frac{x^3}{3}+\frac{x^4}{4}+...$$

$$ln(1\pm x) = \pm x-\frac{1}{2}x^2\pm\frac{1}{3}x^3-...$$

$$sinx = x-\frac{x^3}{3!}+\frac{x^5}{5!}-...$$

$$cosx = 1-\frac{x^2}{2!}+\frac{x^4}{4!}-...$$

$$tanx = x+\frac{x^3}{3}+\frac{2x^5}{15}+... , \mid x\mid<\frac{\pi}{2}$$

## Differential
$$\frac{d}{dx}a = 0$$

$$\frac{d}{dx}ax^n = nax^{n-1}$$

$$\frac{d}{dx}e^{ax} = ae^{ax}$$

$$\frac{d}{dx}sin(ax) = a\cdot cos(ax)$$

$$\frac{d}{dx}cos(ax) = -a\cdot sin(ax)$$

$$\frac{d}{dx}tan(ax) = a\cdot sec^2(ax)$$

$$\frac{d}{dx}cot(ax) = a\cdot -acsc^2(ax)$$

$$\frac{d}{dx}secx = tanx\cdot secx$$

$$\frac{d}{dx}cscx = -cotx\cdot cscx$$

$$\frac{d}{dx}ln(ax) = \frac{a}{x}$$

## Integration
$$\int x^ndx = \frac{x^{n+1}}{n+1}$$

$$\int\frac{dx}{x} = lnx$$

$$\int\frac{dx}{a+bx} = \frac{1}{b}ln(a+bx)$$

$$\int\frac{dx}{(a+bx)^2} = \frac{-1}{(a+bx)}$$

$$\int\frac{dx}{a^2+x^2} = \frac{1}{a}tan
^{-1}\frac{x}{a}$$

$$\int\frac{dx}{a^2-x^2} = \frac{1}{2a}ln\frac{a+x}{a-x}$$

$$\int\frac{dx}{x^2\pm a^2} = \pm\frac{1}{2}ln(a^2\pm x^2)$$

$$\int\frac{dx}{\sqrt{a^2-x^2}} = sin^{-1}\frac{x}{a} = -cos^{-1}\frac{x}{a}$$

$$\int\frac{xdx}{\sqrt{x^2\pm a^2}} = \sqrt{x^2+a^2}$$

$$\int\sqrt{a^2-x^2}dx = \frac{1}{2}(x\sqrt{a^2-x^2}+a^2sin^{-1}\frac{x}{a})$$

$$\int x\sqrt{a^2-x^2}dx =\frac{1}{3}(a^2-x^2)^{\frac{3}{2}}$$

$$\int e^{ax}dx = \frac{1}{a}e^{ax}$$

$$\int ln(ax)dx = (xln(ax))-x$$

$$\int xe^{ax}dx = \frac{e^{ax}}{a^2}(ax-1)$$

$$\int\frac{dx}{a+be^{cx}} = \frac{x}{a}-\frac{1}{ac}ln(a+be^{cx})$$

$$\int sin(x)dx = \frac{1}{a}cos(ax)$$

$$\int cos(ax)dx = -\frac{1}{a}sin(ax)$$

$$\int tan(ax)dx = -\frac{1}{a}ln(cos(ax)) = \frac{1}{a}ln(sec(ax))$$

$$\int cot(ax)dx = \frac{1}{a}ln(sin(ax))$$

$$\int sec(ax)dx = \frac{1}{a}ln(sec(ax)+tan(ax))$$

$$\int csc(ax)dx = \frac{1}{a}ln(csc(ax)-cot(ax)) = \frac{1}{a}ln(tan(\frac{ax}{2}))$$

$$\int sin^2(ax)dx = \frac{x}{2}-\frac{sin(2ax)}{4a}$$

$$\int cos^2(ax)dx = \frac{x}{2}+\frac{sin(2ax)}{4a}$$

$$\int \frac{dx}{sin^2
(ax)} = \frac{-1}{a}cot(ax)$$

$$\int \frac{dx}{cos^2
(ax)} = \frac{1}{a}tan(ax)$$

$$\int tan^2(ax)dx = \frac{1}{a}tan(ax)-x$$

$$\int cot^2(ax)dx = -\frac{1}{a}cot(ax)-x$$

$$\int sin^{-1}(ax)dx = x(sin^{-1}(ax))+\frac{\sqrt{1-a^2x^2}}{a}$$

$$\int cos{-1}(ax)dx = x(cos^{-1}(ax))-\frac{\sqrt{1-a^2x^2}}{a}$$

$$\int \frac{dx}{(x^2+a)^{\frac{3}{2}}} = \frac{x}{a^2\sqrt{x^2+a^2}}$$

$$\int \frac{dx}{(x^2+a^2)^{\frac{3}{2}}} = \frac{1}{a^2\sqrt{x^2+a^2}}$$

## x<<1 extreme approximation
$$(1+x)^n \simeq 1+nx$$

$$e^x \simeq 1+x$$

$$ln(1\pm x) \simeq \pm x$$

$$sin(x) \simeq x$$

$$cos(x) \simeq 1$$

$$tan(x) \simeq x$$
## Factorial
$$0! = 1$$

$$n! = 1\times2\times3...\times n$$

$$n! = n(n-1)!$$

$$n! =  \prod_{i = 1}^n i \quad \forall n\ge1$$

$$\Gamma(n) = \int_0^\infty t^{n-1} e^{-t}  dt = (n-1)!$$

$$\Gamma(\frac12) = \sqrt{\pi} = -0.5!$$

$$\Gamma(n+1) =n\Gamma(n)$$
## Other
$$e^{i\theta} = \cos(\theta)+i\sin(\theta)$$
