When x is close to some reference value x0 (in other words Δx≈0), you can approximate f(x) as the tangent line at that reference value.
f(x0)
1.349859
f~(x)on the tangent line
2.159774
f(x)on the curve
2.459603
error (f(x)−f~(x))
0.299829
form
formula
analog
point–slope form
f(x)≈f(x0)+f′(x0)(x−x0)
y−y0=m(x−x0)
slope–intercept form
f(x+Δx)≈f′(x)Δx+f(x)
y=mx+b
2. Cheatsheet
Each entry gives you f and f′, then lets you pick the reference point. The formula, the table and the graph all follow that choice. Pick any x0 to see the general form and drag the reference around.
2.1 Trigonometric
2.1.1sinx
sinx
≈
sinx0+cosx0(x−x0)
reference
at 0
sinx
≈
sin0+cos0(x−0)
≈
x
f(x)
f~(x)
error
0+0
0.000000
0.000000
0.000000
0+1001
0.010000
0.010000
1.67×10−7
0+101
0.099833
0.100000
0.000167
0+21
0.479426
0.500000
0.020574
0+1
0.841471
1.000000
0.158529
sinxf~
at 6π
sinx
≈
sin6π+cos6π(x−6π)
≈
21+23(x−6π)
f(x)
f~(x)
error
6π+0
0.500000
0.500000
0.000000
6π+1001
0.508635
0.508660
2.51×10−5
6π+101
0.583960
0.586603
0.002642
6π+21
0.853986
0.933013
0.079027
6π+1
0.998886
1.366025
0.367139
sinxf~
at 4π
sinx
≈
sin4π+cos4π(x−4π)
≈
22+22(x−4π)
f(x)
f~(x)
error
4π+0
0.707107
0.707107
0.000000
4π+1001
0.714142
0.714178
3.55×10−5
4π+101
0.774167
0.777817
0.003650
4π+21
0.959550
1.060660
0.101111
4π+1
0.977061
1.414214
0.437152
sinxf~
at 2π
sinx
≈
sin2π+cos2π(x−2π)
≈
1
f(x)
f~(x)
error
2π+0
1.000000
1.000000
0.000000
2π+1001
0.999950
1.000000
5.00×10−5
2π+101
0.995004
1.000000
0.004996
2π+21
0.877583
1.000000
0.122417
2π+1
0.540302
1.000000
0.459698
sinxf~
At 0 this is the small-angle rule. At π/2 the curve is flat, so the approximation is just the constant 1.
2.1.2cosx
cosx
≈
cosx0−sinx0(x−x0)
reference
at 0
cosx
≈
cos0−sin0(x−0)
≈
1
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
0.999950
1.000000
5.00×10−5
0+101
0.995004
1.000000
0.004996
0+21
0.877583
1.000000
0.122417
0+1
0.540302
1.000000
0.459698
cosxf~
at 6π
cosx
≈
cos6π−sin6π(x−6π)
≈
23−21(x−6π)
f(x)
f~(x)
error
6π+0
0.866025
0.866025
0.000000
6π+1001
0.860982
0.861025
4.32×10−5
6π+101
0.811782
0.816025
0.004243
6π+21
0.520296
0.616025
0.095729
6π+1
0.047180
0.366025
0.318845
cosxf~
at 3π
cosx
≈
cos3π−sin3π(x−3π)
≈
21−23(x−3π)
f(x)
f~(x)
error
3π+0
0.500000
0.500000
0.000000
3π+1001
0.491315
0.491340
2.49×10−5
3π+101
0.411044
0.413397
0.002354
3π+21
0.023597
0.066987
0.043391
3π+1
−0.458584
−0.366025
0.092559
cosxf~
at 2π
cosx
≈
cos2π−sin2π(x−2π)
≈
2π−x
f(x)
f~(x)
error
2π+0
6.12×10−17
6.12×10−17
0.000000
2π+1001
−0.010000
−0.010000
1.67×10−7
2π+101
−0.099833
−0.100000
0.000167
2π+21
−0.479426
−0.500000
0.020574
2π+1
−0.841471
−1.000000
0.158529
cosxf~
Flat at 0, so the line there is the constant 1. At π/2 it is steepest and the approximation is a pure slope.
2.1.3tanx
tanx
≈
tanx0+sec2x0(x−x0)
reference
at 0
tanx
≈
tan0+sec20(x−0)
≈
x
f(x)
f~(x)
error
0+0
0.000000
0.000000
0.000000
0+1001
0.010000
0.010000
3.33×10−7
0+101
0.100335
0.100000
0.000335
0+21
0.546302
0.500000
0.046302
0+1
1.557408
1.000000
0.557408
tanxf~
at 6π
tanx
≈
tan6π+sec26π(x−6π)
≈
31+34(x−6π)
f(x)
f~(x)
error
6π+0
0.577350
0.577350
0.000000
6π+1001
0.590761
0.590684
7.79×10−5
6π+101
0.719356
0.710684
0.008672
6π+21
1.641346
1.244017
0.397329
6π+1
21.171805
1.910684
19.261121
tanxf~
at 4π
tanx
≈
tan4π+sec24π(x−4π)
≈
1+2(x−4π)
f(x)
f~(x)
error
4π+0
1.000000
1.000000
0.000000
4π+1001
1.020203
1.020000
0.000203
4π+101
1.223049
1.200000
0.023049
4π+21
3.408223
2.000000
1.408223
4π+1
−4.588038
3.000000
7.588038
tanxf~
Near 0, tan x flattens to x, the same as sin x. It steepens fast as you approach π/2.
2.1.4secx
secx
≈
secx0+secx0tanx0(x−x0)
reference
at 0
secx
≈
sec0+sec0tan0(x−0)
≈
1
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
1.000050
1.000000
5.00×10−5
0+101
1.005021
1.000000
0.005021
0+21
1.139494
1.000000
0.139494
0+1
1.850816
1.000000
0.850816
secxf~
at 6π
secx
≈
sec6π+sec6πtan6π(x−6π)
≈
32+32(x−6π)
f(x)
f~(x)
error
6π+0
1.154701
1.154701
0.000000
6π+1001
1.161464
1.161367
9.70×10−5
6π+101
1.231858
1.221367
0.010490
6π+21
1.921983
1.488034
0.433949
6π+1
21.195408
1.821367
19.374041
secxf~
at 4π
secx
≈
sec4π+sec4πtan4π(x−4π)
≈
2+2(x−4π)
f(x)
f~(x)
error
4π+0
1.414214
1.414214
0.000000
4π+1001
1.428570
1.428356
0.000215
4π+101
1.579825
1.555635
0.024191
4π+21
3.551899
2.121320
1.430579
4π+1
−4.695752
2.828427
7.524180
secxf~
Flat at 0 like cos, so the line there is the constant 1.
2.1.5cotx
cotx
≈
cotx0−csc2x0(x−x0)
reference
at 4π
cotx
≈
cot4π−csc24π(x−4π)
≈
1−2(x−4π)
f(x)
f~(x)
error
4π+0
1.000000
1.000000
0.000000
4π+1001
0.980197
0.980000
0.000197
4π+101
0.817629
0.800000
0.017629
4π+21
0.293408
0.000000
0.293408
4π+1
−0.217958
−1.000000
0.782042
cotxf~
at 2π
cotx
≈
cot2π−csc22π(x−2π)
≈
2π−x
f(x)
f~(x)
error
2π+0
6.12×10−17
6.12×10−17
0.000000
2π+1001
−0.010000
−0.010000
3.33×10−7
2π+101
−0.100335
−0.100000
0.000335
2π+21
−0.546302
−0.500000
0.046302
2π+1
−1.557408
−1.000000
0.557408
cotxf~
There is no reference point at 0 — cot blows up there. Away from 0 it behaves like anything else.
2.1.6cscx
cscx
≈
cscx0−cscx0cotx0(x−x0)
reference
at 4π
cscx
≈
csc4π−csc4πcot4π(x−4π)
≈
2−2(x−4π)
f(x)
f~(x)
error
4π+0
1.414214
1.414214
0.000000
4π+1001
1.400281
1.400071
0.000210
4π+101
1.291711
1.272792
0.018919
4π+21
1.042156
0.707107
0.335049
4π+1
1.023477
−2.22×10−16
1.023477
cscxf~
at 2π
cscx
≈
csc2π−csc2πcot2π(x−2π)
≈
1
f(x)
f~(x)
error
2π+0
1.000000
1.000000
0.000000
2π+1001
1.000050
1.000000
5.00×10−5
2π+101
1.005021
1.000000
0.005021
2π+21
1.139494
1.000000
0.139494
2π+1
1.850816
1.000000
0.850816
cscxf~
Same as cot — undefined at 0, fine everywhere else. At π/2 it bottoms out, so the line is flat.
2.2 Exponents and logarithms
2.2.1ex
ex
≈
ex0+ex0(x−x0)
reference
at 0
ex
≈
e0+e0(x−0)
≈
1+x
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
1.010050
1.010000
5.02×10−5
0+101
1.105171
1.100000
0.005171
0+21
1.648721
1.500000
0.148721
0+1
2.718282
2.000000
0.718282
exf~
at 1
ex
≈
e1+e1(x−1)
≈
ex
f(x)
f~(x)
error
1+0
2.718282
2.718282
0.000000
1+1001
2.745601
2.745465
0.000136
1+101
3.004166
2.990110
0.014056
1+21
4.481689
4.077423
0.404266
1+1
7.389056
5.436564
1.952492
exf~
at 2
ex
≈
e2+e2(x−2)
≈
e2(x−1)
f(x)
f~(x)
error
2+0
7.389056
7.389056
0.000000
2+1001
7.463317
7.462947
0.000371
2+101
8.166170
8.127962
0.038208
2+21
12.182494
11.083584
1.098910
2+1
20.085537
14.778112
5.307425
exf~
At x₀ = 1 the two terms collapse: e + e(x − 1) = e·x.
2.2.2ln(1+x)
ln(1+x)
≈
ln(1+x0)+1+x0x−x0
reference
at 0
ln(1+x)
≈
ln(1+0)+1+0x−0
≈
x
f(x)
f~(x)
error
0+0
0.000000
0.000000
0.000000
0+1001
0.009950
0.010000
4.97×10−5
0+101
0.095310
0.100000
0.004690
0+21
0.405465
0.500000
0.094535
0+1
0.693147
1.000000
0.306853
ln(1+x)f~
at 1
ln(1+x)
≈
ln(1+1)+1+1x−1
≈
ln2+2x−1
f(x)
f~(x)
error
1+0
0.693147
0.693147
0.000000
1+1001
0.698135
0.698147
1.25×10−5
1+101
0.741937
0.743147
0.001210
1+21
0.916291
0.943147
0.026856
1+1
1.098612
1.193147
0.094535
ln(1+x)f~
at 2
ln(1+x)
≈
ln(1+2)+1+2x−2
≈
ln3+3x−2
f(x)
f~(x)
error
2+0
1.098612
1.098612
0.000000
2+1001
1.101940
1.101946
5.54×10−6
2+101
1.131402
1.131946
0.000544
2+21
1.252763
1.265279
0.012516
2+1
1.386294
1.431946
0.045651
ln(1+x)f~
Written as ln(1 + x) so that 0 is a usable reference point. Plain ln x has none.
2.2.3(1+x)r
r =
1+x
≈
1+x0+21+x01(x−x0)
reference
at 0
(1+x)r
≈
(1+0)r+r(1+0)r−1(x−0)
≈
1+rx
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
1.004988
1.005000
1.24×10−5
0+101
1.048809
1.050000
0.001191
0+21
1.224745
1.250000
0.025255
0+1
1.414214
1.500000
0.085786
(1+x)rf~
at 1
(1+x)r
≈
(1+1)r+r(1+1)r−1(x−1)
≈
2r+r2r−1(x−1)
f(x)
f~(x)
error
1+0
1.414214
1.414214
0.000000
1+1001
1.417745
1.417749
4.41×10−6
1+101
1.449138
1.449569
0.000431
1+21
1.581139
1.590990
0.009851
1+1
1.732051
1.767767
0.035716
(1+x)rf~
1+x1
≈
1+x01−2(1+x0)3/21(x−x0)
reference
at 0
(1+x)r
≈
(1+0)r+r(1+0)r−1(x−0)
≈
1+rx
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
0.995037
0.995000
3.72×10−5
0+101
0.953463
0.950000
0.003463
0+21
0.816497
0.750000
0.066497
0+1
0.707107
0.500000
0.207107
(1+x)rf~
at 1
(1+x)r
≈
(1+1)r+r(1+1)r−1(x−1)
≈
2r+r2r−1(x−1)
f(x)
f~(x)
error
1+0
0.707107
0.707107
0.000000
1+1001
0.705346
0.705339
6.60×10−6
1+101
0.690066
0.689429
0.000636
1+21
0.632456
0.618718
0.013737
1+1
0.577350
0.530330
0.047020
(1+x)rf~
1+x1
≈
1+x01−(1+x0)21(x−x0)
reference
at 0
(1+x)r
≈
(1+0)r+r(1+0)r−1(x−0)
≈
1+rx
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
0.990099
0.990000
9.90×10−5
0+101
0.909091
0.900000
0.009091
0+21
0.666667
0.500000
0.166667
0+1
0.500000
0.000000
0.500000
(1+x)rf~
at 1
(1+x)r
≈
(1+1)r+r(1+1)r−1(x−1)
≈
2r+r2r−1(x−1)
f(x)
f~(x)
error
1+0
0.500000
0.500000
0.000000
1+1001
0.497512
0.497500
1.24×10−5
1+101
0.476190
0.475000
0.001190
1+21
0.400000
0.375000
0.025000
1+1
0.333333
0.250000
0.083333
(1+x)rf~
(1+x)2
≈
(1+x0)2+2(1+x0)(x−x0)
reference
at 0
(1+x)r
≈
(1+0)r+r(1+0)r−1(x−0)
≈
1+rx
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
1.020100
1.020000
1.00×10−4
0+101
1.210000
1.200000
0.010000
0+21
2.250000
2.000000
0.250000
0+1
4.000000
3.000000
1.000000
(1+x)rf~
at 1
(1+x)r
≈
(1+1)r+r(1+1)r−1(x−1)
≈
2r+r2r−1(x−1)
f(x)
f~(x)
error
1+0
4.000000
4.000000
0.000000
1+1001
4.040100
4.040000
1.00×10−4
1+101
4.410000
4.400000
0.010000
1+21
6.250000
6.000000
0.250000
1+1
9.000000
8.000000
1.000000
(1+x)rf~
(1+x)3
≈
(1+x0)3+3(1+x0)2(x−x0)
reference
at 0
(1+x)r
≈
(1+0)r+r(1+0)r−1(x−0)
≈
1+rx
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
1.030301
1.030000
0.000301
0+101
1.331000
1.300000
0.031000
0+21
3.375000
2.500000
0.875000
0+1
8.000000
4.000000
4.000000
(1+x)rf~
at 1
(1+x)r
≈
(1+1)r+r(1+1)r−1(x−1)
≈
2r+r2r−1(x−1)
f(x)
f~(x)
error
1+0
8.000000
8.000000
0.000000
1+1001
8.120601
8.120000
0.000601
1+101
9.261000
9.200000
0.061000
1+21
15.625000
14.000000
1.625000
1+1
27.000000
20.000000
7.000000
(1+x)rf~
The workhorse. r = 1/2 gives √(1+x), and r = −1 gives 1/(1+x).
2.2.4ax
a =
ax
≈
ax0+ax0lna(x−x0)
reference
at 0
ax
≈
a0+a0lna(x−0)
≈
1+xlna
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
1.006956
1.006931
2.41×10−5
0+101
1.071773
1.069315
0.002459
0+21
1.414214
1.346574
0.067640
0+1
2.000000
1.693147
0.306853
axf~
at 1
ax
≈
a1+a1lna(x−1)
≈
a+alna(x−1)
f(x)
f~(x)
error
1+0
2.000000
2.000000
0.000000
1+1001
2.013911
2.013863
4.82×10−5
1+101
2.143547
2.138629
0.004917
1+21
2.828427
2.693147
0.135280
1+1
4.000000
3.386294
0.613706
axf~
ax
≈
ax0+ax0lna(x−x0)
reference
at 0
ax
≈
a0+a0lna(x−0)
≈
1+xlna
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
1.011047
1.010986
6.06×10−5
0+101
1.116123
1.109861
0.006262
0+21
1.732051
1.549306
0.182745
0+1
3.000000
2.098612
0.901388
axf~
at 1
ax
≈
a1+a1lna(x−1)
≈
a+alna(x−1)
f(x)
f~(x)
error
1+0
3.000000
3.000000
0.000000
1+1001
3.033140
3.032958
0.000182
1+101
3.348370
3.329584
0.018786
1+21
5.196152
4.647918
0.548234
1+1
9.000000
6.295837
2.704163
axf~
ax
≈
ax0+ax0lna(x−x0)
reference
at 0
ax
≈
a0+a0lna(x−0)
≈
1+xlna
f(x)
f~(x)
error
0+0
1.000000
1.000000
0.000000
0+1001
1.023293
1.023026
0.000267
0+101
1.258925
1.230259
0.028667
0+21
3.162278
2.151293
1.010985
0+1
10.000000
3.302585
6.697415
axf~
at 1
ax
≈
a1+a1lna(x−1)
≈
a+alna(x−1)
f(x)
f~(x)
error
1+0
10.000000
10.000000
0.000000
1+1001
10.232930
10.230259
0.002671
1+101
12.589254
12.302585
0.286669
1+21
31.622777
21.512925
10.109851
1+1
100.000000
33.025851
66.974149
axf~
Covers e^x too. Set a = e, so ln a = 1.
3. Algebra
You do not have to differentiate a messy function at all. You can build its approximation out of the entries above instead.
Write L(f) for the linear approximation of f near 0.
The useful fact is that you can approximate first and combine second. For a product:
L(L(f)L(g))=L(fg)
So the L of a product is just the linear approximation of the product of the linear approximations. You never have to touch fg itself.
Here is the full set:
rule
sum
L(f+g)=L(f)+L(g)
scale
L(kf)=kL(f)
product
L(L(f)L(g))=L(fg)
composition, when g(0)=0
L(L(f)∘L(g))=L(f∘g)
Applied to a polynomial, L does nothing but chop off the high powers. So the outer L on each left-hand side is the cut — the x2 term a product or composition produces along the way is not trustworthy, since the inputs were only accurate to first order.
The g(0)=0 condition on the last line is not a deep restriction — it falls out of how L is defined here. L(f) only carries information about f near 0, so plugging in g(x) is only valid where g actually lands near 0. Centre L at a different reference point and the condition moves with it: substitution is valid whenever the inside function's value at your reference point equals the outside function's reference point.