spec / calculus.mdon commit [spec] start vector calculus (42fe40b)
   1# Differential calculus
   2
   3## Limits
   4
   5$$\lim_{x \rightarrow a}f(x)$$
   6
   7$L^-$ - limit from below
   8
   9$L^+$ - limit from above
  10
  11$\lim_{x \to a} f(x)$ - limit of a point  
  12
  13- Limit exists if $L^-=L^+$
  14- If limit exists, point does not.
  15
  16Limits can be solved using normal techniques (if div 0, factorise)
  17
  18## Limit theorems
  19
  201. For constant function $f(x)=k$, $\lim_{x \rightarrow a} f(x) = k$
  212. $\lim_{x \rightarrow a} (f(x) \pm g(x)) = F \pm G$
  223. $\lim_{x \rightarrow a} (f(x) \times g(x)) = F \times G$
  234. ${\lim_{x \rightarrow a} {f(x) \over g(x)}} = {F \over G}, G \ne 0$
  24
  25Corollary: $\lim_{x \rightarrow a} c \times f(x)=cF$ where $c=$ constant
  26
  27## Solving limits for $x\rightarrow\infty$
  28
  29Factorise so that all values of $x$ are in denominators.
  30
  31e.g.
  32
  33$$\lim_{x \rightarrow \infty}{{2x+3} \over {x-2}}={{2+{3 \over x}} \over {1-{2 \over x}}}={2 \over 1} = 2$$
  34
  35
  36## Continuous functions
  37
  38A function is continuous if $L^-=L^+=f(x)$ for all values of $x$.
  39
  40## Gradients of secants and tangents
  41
  42Secant (chord) - line joining two points on curve
  43
  44Tangent - line that intersects curve at one point
  45
  46given $P(x,y) \quad Q(x+\delta x, y + \delta y)$:
  47gradient of chord joining $P$ and $Q$ is ${m_{PQ}}={\operatorname{rise} \over \operatorname{run}} = {\delta y \over \delta x}$
  48
  49As $Q \rightarrow P, \delta x \rightarrow 0$. Chord becomes tangent (two infinitesimal points are equal).
  50
  51Can also be used with functions, where $h=\delta x$.
  52
  53## First principles derivative
  54
  55$$f^\prime(x) = \lim_{\delta x \rightarrow 0}{\delta y \over \delta x}={dy \over dx}$$
  56
  57$$m_{\tan}=\lim_{h \rightarrow 0}f^\prime(x)$$
  58
  59
  60
  61$$m_{\vec{PQ}}=f^\prime(x)$$
  62
  63first principles derivative:
  64$${m_{\text{tangent at }P} =\lim_{h \rightarrow 0}}{{f(x+h)-f(x)}\over h}$$
  65
  66## Gradient at a point
  67
  68Given point $P(a, b)$ and function $f(x)$, the gradient is $f^\prime(a)$
  69
  70
  71## Derivatives of $x^n$
  72
  73$${d(ax^n) \over dx}=anx^{n-1}$$
  74
  75If $x=$ constant, derivative is $0$
  76
  77If $y=ax^n$, derivative is $a\times nx^{n-1}$
  78
  79If $f(x)={1 \over x}=x^{-1}, \quad f^\prime(x)=-1x^{-2}={-1 \over x^2}$
  80
  81If $f(x)=^5\sqrt{x}=x^{1 \over 5}, \quad f^\prime(x)={1 \over 5}x^{-4/5}={1 \over 5 \times ^5\sqrt{x^4}}$
  82
  83If $f(x)=(x-b)^2, \quad f^\prime(x)=2(x-b)$
  84
  85$$f^\prime(x)=\lim_{h \rightarrow 0}{{f(x+h)-f(x)} \over h}$$
  86
  87## Derivatives of $u \pm v$
  88
  89$${dy \over dx}={du \over dx} \pm {dv \over dx}$$
  90where $u$ and $v$ are functions of $x$
  91
  92## Euler's number as a limit
  93
  94$$\lim_{h \rightarrow 0} {{e^h-1} \over h}=1$$
  95
  96## Chain rule for $(f\circ g)$
  97
  98If $f(x) = h(g(x)) = (h \circ g)(x)$:
  99
 100$$f^\prime(x) = h^\prime(g(x)) \cdot g^\prime(x)$$
 101
 102If $y=h(u)$ and $u=g(x)$:
 103
 104$${dy \over dx} = {dy \over du} \cdot {du \over dx}$$
 105$${d((ax+b)^n) \over dx} = {d(ax+b) \over dx} \cdot n \cdot (ax+b)^{n-1}$$
 106
 107Used with only one expression.
 108
 109e.g. $y=(x^2+5)^7$ - Cannot reasonably expand  
 110Let $u-x^2+5$ (inner expression)  
 111${du \over dx} = 2x$  
 112$y=u^7$  
 113${dy \over du} = 7u^6$  
 114
 115## Product rule for $y=uv$
 116
 117$${dy \over dx} = u{dv \over dx} + v{du \over dx}$$
 118
 119## Quotient rule for $y={u \over v}$
 120
 121$${dy \over dx} = {{v{du \over dx} - u{dv \over dx}} \over v^2}$$
 122
 123$$f^\prime(x)={{v(x)u^\prime(x)-u(x)v^\prime(x)} \over [v(x)]^2}$$
 124
 125## Logarithms
 126
 127$$\log_b (x) = n \quad \operatorname{where} \hspace{0.5em} b^n=x$$
 128
 129Wikipedia:
 130
 131> the logarithm of a given number $x$ is the exponent to which another fixed number, the base $b$, must be raised, to produce that number $x$
 132
 133### Logarithmic identities
 134
 135$\log_b (xy)=\log_b x + \log_b y$  
 136$\log_b x^n = n \log_b x$  
 137$\log_b y^{x^n} = x^n \log_b y$
 138
 139### Index identities
 140
 141$b^{m+n}=b^m \cdot b^n$  
 142$(b^m)^n=b^{m \cdot n}$  
 143$(b \cdot c)^n = b^n \cdot c^n$  
 144${a^m \div a^n} = {a^{m-n}}$
 145
 146### $e$ as a logarithm
 147
 148$$\operatorname{if} y=e^x, \quad \operatorname{then} x=\log_e y$$
 149$$\ln x = \log_e x$$
 150
 151### Differentiating logarithms
 152$${d(\log_e x)\over dx} = x^{-1} = {1 \over x}$$
 153
 154## Derivative rules
 155
 156| $f(x)$ | $f^\prime(x)$ |
 157| ------ | ------------- |
 158| $\sin x$ | $\cos x$ |
 159| $\sin ax$ | $a\cos ax$ |
 160| $\cos x$ | $-\sin x$ |
 161| $\cos ax$ | $-a \sin ax$ |
 162| $\tan f(x)$ | $f^2(x) \sec^2f(x)$ |
 163| $e^x$ | $e^x$ |
 164| $e^{ax}$ | $ae^{ax}$ |
 165| $ax^{nx}$ | $an \cdot e^{nx}$ |
 166| $\log_e x$ | $1 \over x$ |
 167| $\log_e {ax}$ | $1 \over x$ |
 168| $\log_e f(x)$ | $f^\prime (x) \over f(x)$ |
 169| $\sin(f(x))$ | $f^\prime(x) \cdot \cos(f(x))$ |
 170| $\sin^{-1} x$ | $1 \over {\sqrt{1-x^2}}$ |
 171| $\cos^{-1} x$ | $-1 \over {sqrt{1-x^2}}$ |
 172| $\tan^{-1} x$ | $1 \over {1 + x^2}$ |
 173
 174## Reciprocal derivatives
 175
 176$${1 \over {dy \over dx}} = {dx \over dy}$$
 177
 178## Differentiating $x=f(y)$
 179
 180Find $dx \over dy$. Then ${dx \over dy} = {1 \over {dy \over dx}} \implies {dy \over dx} = {1 \over {dx \over dy}}$.
 181
 182$${dy \over dx} = {1 \over {dx \over dy}}$$
 183
 184## Second derivative
 185
 186$$f(x) \longrightarrow f^\prime (x) \longrightarrow f^{\prime\prime}(x)$$
 187
 188$$\therefore y \longrightarrow {dy \over dx} \longrightarrow {d({dy \over dx}) \over dx} \longrightarrow {d^2 y \over dx^2}$$
 189
 190Order of polynomial $n$th derivative decrements each time the derivative is taken
 191
 192### Points of Inflection
 193
 194*Stationary point* - point of zero gradient (i.e. $f^\prime(x)=0$)  
 195*Point of inflection* - point of maximum $|$gradient$|$ (i.e.  $f^{\prime\prime} = 0$)
 196
 197* if $f^\prime (a) = 0$ and $f^{\prime\prime}(a) > 0$, then point $(a, f(a))$ is a local min (curve is concave up)
 198* if $f^\prime (a) = 0$ and $f^{\prime\prime} (a) < 0$, then point $(a, f(a))$ is local max (curve is concave down)
 199* if $f^{\prime\prime}(a) = 0$, then point $(a, f(a))$ is a point of inflection
 200  + if also $f^\prime(a)=0$, then it is a stationary point of inflection
 201
 202![](graphics/second-derivatives.png)
 203
 204## Implicit Differentiation
 205
 206**On CAS:** Action $\rightarrow$ Calculation $\rightarrow$ `impDiff(y^2+ax=5, x, y)`. Returns $y^\prime= \dots$.
 207
 208Used for differentiating circles etc.
 209
 210If $p$ and $q$ are expressions in $x$ and $y$ such that $p=q$, for all $x$ nd $y$, then:
 211
 212$${dp \over dx} = {dq \over dx} \quad \text{and} \quad {dp \over dy} = {dq \over dy}$$
 213
 214## Integration
 215
 216$$\int f(x) \cdot dx = F(x) + c \quad \text{where } F^\prime(x) = f(x)$$
 217
 218$$\int x^n \cdot dx = {x^{n+1} \over n+1} + c$$
 219
 220- area enclosed by curves
 221- $+c$ should be shown on each step without $\int$
 222
 223### Integral laws
 224
 225$\int f(x) + g(x) dx = \int f(x) dx + \int g(x) dx$  
 226$\int k f(x) dx = k \int f(x) dx$  
 227
 228| $f(x)$                          | $\int f(x) \cdot dx$         |
 229| ------------------------------- | ---------------------------- |
 230| $k$ (constant) | $kx + c$ |
 231| $x^n$ | ${x^{n+1} \over {n+1}} + c$ |
 232| $a x^{-n}$ | $a \cdot \log_e x + c$ |
 233| ${1 \over {ax+b}}$ | ${1 \over a} \log_e (ax+b) + c$ |
 234| $(ax+b)^n$ | ${1 \over {a(n+1)}}(ax+b)^{n-1} + c$ |
 235| $e^{kx}$ | ${1 \over k} e^{kx} + c$ |
 236| $e^k$ | $e^kx + c$ |
 237| $\sin kx$ | $-{1 \over k} \cos (kx) + c$ |
 238| $\cos kx$ | ${1 \over k} \sin (kx) + c$ |
 239| $\sec^2 kx$ | ${1 \over k} \tan(kx) + c$ |
 240| $1 \over \sqrt{a^2-x^2}$ | $\sin^{-1} {x \over a} + c \>\vert\> a>0$ |
 241| $-1 \over \sqrt{a^2-x^2}$ | $\cos^{-1} {x \over a} + c \>\vert\> a>0$ |
 242| $a \over {a^2-x^2}$ | $\tan^{-1} {x \over a} + c$ |
 243| ${f^\prime (x)} \over {f(x)}$ | $\log_e f(x) + c$ |
 244| $g^\prime(x)\cdot f^\prime(g(x)$ | $f(g(x))$ (chain rule)|
 245| $f(x) \cdot g(x)$ | $\int [f^\prime(x) \cdot g(x)] dx + \int [g^\prime(x) f(x)] dx$ |
 246
 247Note $\sin^{-1} {x \over a} + \cos^{-1} {x \over a}$ is constant for all $x \in (-a, a)$.
 248
 249### Definite integrals
 250
 251$$\int_a^b f(x) \cdot dx = [F(x)]_a^b=F(b)-F(a)$$
 252
 253- Signed area enclosed by: $\> y=f(x), \quad y=0, \quad x=a, \quad x=b$.
 254- *Integrand* is $f$.
 255- $F(x)$ may be any integral, i.e. $c$ is inconsequential
 256
 257#### Properties
 258
 259$$\int^b_a f(x) \> dx = \int^c_a f(x) \> dx + \int^b_c f(x) \> dx$$
 260
 261$$\int^a_a f(x) \> dx = 0$$
 262
 263$$\int^b_a k \cdot f(x) \> dx = k \int^b_a f(x) \> dx$$
 264
 265$$\int^b_a f(x) \pm g(x) \> dx = \int^b_a f(x) \> dx \pm \int^b_a g(x) \> dx$$
 266
 267$$\int^b_a f(x) \> dx = - \int^a_b f(x) \> dx$$
 268
 269### Integration by substitution
 270
 271$$\int f(u) {du \over dx} \cdot dx = \int f(u) \cdot du$$
 272
 273Note $f(u)$ must be one-to-one $\implies$ one $x$ value for each $y$ value
 274
 275e.g. for $y=\int(2x+1)\sqrt{x+4} \cdot dx$:  
 276let $u=x+4$  
 277$\implies {du \over dx} = 1$  
 278$\implies x = u - 4$  
 279then $y=\int (2(u-4)+1)u^{1 \over 2} \cdot du$  
 280Solve as a normal integral
 281
 282#### Definite integrals by substitution
 283
 284For $\int^b_a f(x) {du \over dx} \cdot dx$, evaluate new $a$ and $b$ for $f(u) \cdot du$.
 285
 286### Trigonometric integration
 287
 288$$\sin^m x \cos^n x \cdot dx$$
 289
 290**$m$ is odd:**  
 291$m=2k+1$ where $k \in \mathbb{Z}$  
 292$\implies \sin^{2k+1} x = (\sin^2 z)^k \sin x = (1 - \cos^2 x)^k \sin x$  
 293Substitute $u=\cos x$
 294
 295**$n$ is odd:**  
 296$n=2k+1$ where $k \in \mathbb{Z}$  
 297$\implies \cos^{2k+1} x = (\cos^2 x)^k \cos x = (1-\sin^2 x)^k \cos x$  
 298Subbstitute $u=\sin x$
 299
 300**$m$ and $n$ are even:**  
 301Use identities:
 302
 303- $\sin^2x={1 \over 2}(1-\cos 2x)$
 304- $\cos^2x={1 \over 2}(1+\cos 2x)$
 305- $\sin 2x = 2 \sin x \cos x$
 306
 307## Partial fractions
 308
 309On CAS: Action $\rightarrow$ Transformation $\rightarrow$ `expand/combine`  
 310or Interactive $\rightarrow$ Transformation $\rightarrow$ `expand` $\rightarrow$ Partial
 311
 312## Graphing integrals on CAS
 313
 314In main: Interactive $\rightarrow$ Calculation $\rightarrow$ $\int$ ($\rightarrow$ Definite)  
 315Restrictions: `Define f(x)=...` $\rightarrow$ `f(x)|x>1` (e.g.)
 316
 317## Applications of antidifferentiation
 318
 319- $x$-intercepts of $y=f(x)$ identify $x$-coordinates of stationary points on $y=F(x)$
 320- nature of stationary points is determined by sign of $y=f(x)$ on either side of its $x$-intercepts
 321- if $f(x)$ is a polynomial of degree $n$, then $F(x)$ has degree $n+1$
 322
 323To find stationary points of a function, substitute $x$ value of given point into derivative. Solve for ${dy \over dx}=0$. Integrate to find original function.
 324
 325## Solids of revolution
 326
 327Approximate as sum of infinitesimally-thick cylinders
 328
 329### Rotation about $x$-axis
 330
 331\begin{align*}
 332  V &= \int^{x=b}_{x-a} \pi y^2 \> dx \\
 333    &= \pi \int^b_a (f(x))^2 \> dx
 334\end{align*}
 335
 336### Rotation about $y$-axis
 337
 338\begin{align*}
 339  V &= \int^{y=b}_{y=a} \pi x^2 \> dy \\
 340    &= \pi \int^b_a (f(y))^2 \> dy
 341\end{align*}
 342
 343### Regions not bound by $y=0$
 344
 345$$V = \pi \int^b_a f(x)^2 - g(x)^2 \> dx$$  
 346where $f(x) > g(x)$
 347
 348## Length of a curve
 349
 350$$L = \int^b_a \sqrt{1 + ({dy \over dx})^2} \> dx \quad \text{(Cartesian)}$$
 351
 352$$L = \int^b_a \sqrt{{dx \over dt} + ({dy \over dt})^2} \> dt \quad \text{(parametric)}$$
 353
 354Evaluate on CAS. Or use Interactive $\rightarrow$ Calculation $\rightarrow$ Line $\rightarrow$ `arcLen`.
 355
 356## Rates
 357
 358### Related rates
 359
 360$${da \over db} \quad \text{(change in } a \text{ with respect to } b)$$
 361
 362### Gradient at a point on parametric curve
 363
 364$${dy \over dx} = {{dy \over dt} \div {dx \over dt}} \> \vert \> {dx \over dt} \ne 0$$
 365
 366$${d^2 \over dx^2} = {d(y^\prime) \over dx} = {{dy^\prime \over dt} \div {dx \over dt}} \> \vert \> y^\prime = {dy \over dx}$$
 367
 368## Rational functions
 369
 370$$f(x) = {P(x) \over Q(x)} \quad \text{where } P, Q \text{ are polynomial functions}$$
 371
 372### Addition of ordinates
 373
 374- when two graphs have the same ordinate, $y$-coordinate is double the ordinate
 375- when two graphs have opposite ordinates, $y$-coordinate is 0 i.e. ($x$-intercept)
 376- when one of the ordinates is 0, the resulting ordinate is equal to the other ordinate
 377
 378## Fundamental theorem of calculus
 379
 380If $f$ is continuous on $[a, b]$, then
 381
 382$$\int^b_a f(x) \> dx = F(b) - F(a)$$
 383
 384where $F$ is any antiderivative of $f$
 385
 386## Differential equations
 387
 388One or more derivatives
 389
 390**Order** - highest power inside derivative  
 391**Degree** - highest power of highest derivative  
 392e.g. ${\left(dy^2 \over d^2 x\right)}^3$: order 2, degree 3
 393
 394### Verifying solutions
 395
 396Start with $y=\dots$, and differentiate. Substitute into original equation.
 397
 398### Function of the dependent variable
 399
 400If ${dy \over dx}=g(y)$, then ${dx \over dy} = 1 \div {dy \over dx} = {1 \over g(y)}$. Integrate both sides to solve equation. Only add $c$ on one side. Express $e^c$ as $A$.
 401
 402### Mixing problems
 403
 404$$\left({dm \over dt}\right)_\Sigma = \left({dm \over dt}\right)_{\text{in}} - \left({dm \over dt}\)_{\text{out}}$$
 405
 406### Separation of variables
 407
 408If ${dy \over dx}=f(x)g(y)$, then:
 409
 410$$\int f(x) \> dx = \int {1 \over g(y)} \> dy$$
 411
 412### Using definite integrals to solve DEs
 413
 414Used for situations where solutions to ${dy \over dx} = f(x)$ is not required.
 415
 416In some cases, it may not be possible to obtain an exact solution.
 417
 418Approximate solutions can be found by numerically evaluating a definite integral.
 419
 420### Using Euler's method to solve a differential equation
 421
 422$${{f(x+h) - f(x)} \over h } \approx f^\prime (x) \quad \text{for small } h$$
 423
 424$$\implies f(x+h) \approx f(x) + hf^\prime(x)$$
 425