When x is close to some reference value x0 (in other words Δx≈0), you can approximate f(x) as the parabola that matches the curve at that reference value.
form
formula
analog
point–slope form
f(x)≈f(x0)+f′(x0)(x−x0)+2f′′(x0)(x−x0)2
y=a+b(x−x0)+c(x−x0)2
slope–intercept form
f(x0+Δx)≈f(x0)+f′(x0)Δx+2f′′(x0)Δx2
y=a+bΔx+cΔx2
A line can only match the height and the slope. It stays straight while the curve bends, so it falls behind the moment you leave the reference point. The x2 term lets your guess bend too, and f′′(x0) says how hard.
The teal line below is the linear approximation from the linear cheatsheet; the violet curve is the quadratic one. Drag Δx out and watch the violet curve stay with the grey one for much longer.
f(x0)
1.349859
f~1(x)on the tangent line
2.159774
f~2(x)on the parabola
2.402749
f(x)on the curve
2.459603
linear error (f(x)−f~1(x))
0.299829
quadratic error (f(x)−f~2(x))
0.056854
Set f′′(x0)=0 and the whole x2 term disappears, leaving exactly the linear approximation. So quadratic approximation is never worse than linear — at worst the curvature is zero and the two agree.
2. Cheatsheet
Each entry gives you the general formula, then lets you pick the reference point. Every table compares the linear approximation f~1 against the quadratic one f~2, with both errors side by side so you can see how much the extra term buys you.
Watch the error columns as Δx shrinks. The linear error falls like Δx2; the quadratic error falls like Δx3. At Δx=1/100 that is already a difference of roughly a hundredfold.
2.1 Trigonometric
2.1.1sinx
sinx
≈
sinx0+cosx0(x−x0)−2sinx0(x−x0)2
reference
at 0
sinx
≈
sin0+cos0x−2sin0x2
≈
x
f(x)
f~1(x)
f~2(x)
linear error
quad. error
0+0
0.000000
0.000000
0.000000
0.000000
0.000000
0+1001
0.010000
0.010000
0.010000
1.67×10−7
1.67×10−7
0+101
0.099833
0.100000
0.100000
0.000167
0.000167
0+21
0.479426
0.500000
0.500000
0.020574
0.020574
0+1
0.841471
1.000000
1.000000
0.158529
0.158529
sinxf~1f~2
at 6π
sinx
≈
sin6π+cos6π(x−6π)−2sin6π(x−6π)2
≈
21+23(x−6π)−41(x−6π)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
6π+0
0.500000
0.500000
0.500000
0.000000
0.000000
6π+1001
0.508635
0.508660
0.508635
2.51×10−5
1.44×10−7
6π+101
0.583960
0.586603
0.584103
0.002642
0.000142
6π+21
0.853986
0.933013
0.870513
0.079027
0.016527
6π+1
0.998886
1.366025
1.116025
0.367139
0.117139
sinxf~1f~2
at 4π
sinx
≈
sin4π+cos4π(x−4π)−2sin4π(x−4π)2
≈
22+22(x−4π)−42(x−4π)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
4π+0
0.707107
0.707107
0.707107
0.000000
0.000000
4π+1001
0.714142
0.714178
0.714142
3.55×10−5
1.18×10−7
4π+101
0.774167
0.777817
0.774282
0.003650
0.000115
4π+21
0.959550
1.060660
0.972272
0.101111
0.012722
4π+1
0.977061
1.414214
1.060660
0.437152
0.083599
sinxf~1f~2
at 2π
sinx
≈
sin2π+cos2π(x−2π)−2sin2π(x−2π)2
≈
1−21(x−2π)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
2π+0
1.000000
1.000000
1.000000
0.000000
0.000000
2π+1001
0.999950
1.000000
0.999950
5.00×10−5
4.17×10−10
2π+101
0.995004
1.000000
0.995000
0.004996
4.17×10−6
2π+21
0.877583
1.000000
0.875000
0.122417
0.002583
2π+1
0.540302
1.000000
0.500000
0.459698
0.040302
sinxf~1f~2
At 0 the quadratic term vanishes, so it matches the linear one. At π/2 it is the other way round: the linear term dies and the curvature carries everything.
2.1.2cosx
cosx
≈
cosx0−sinx0(x−x0)−2cosx0(x−x0)2
reference
at 0
cosx
≈
cos0−sin0x−2cos0x2
≈
1−21x2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
0+0
1.000000
1.000000
1.000000
0.000000
0.000000
0+1001
0.999950
1.000000
0.999950
5.00×10−5
4.17×10−10
0+101
0.995004
1.000000
0.995000
0.004996
4.17×10−6
0+21
0.877583
1.000000
0.875000
0.122417
0.002583
0+1
0.540302
1.000000
0.500000
0.459698
0.040302
cosxf~1f~2
at 6π
cosx
≈
cos6π−sin6π(x−6π)−2cos6π(x−6π)2
≈
23−21(x−6π)−43(x−6π)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
6π+0
0.866025
0.866025
0.866025
0.000000
0.000000
6π+1001
0.860982
0.861025
0.860982
4.32×10−5
8.37×10−8
6π+101
0.811782
0.816025
0.811695
0.004243
8.69×10−5
6π+21
0.520296
0.616025
0.507772
0.095729
0.012524
6π+1
0.047180
0.366025
−0.066987
0.318845
0.114167
cosxf~1f~2
at 3π
cosx
≈
cos3π−sin3π(x−3π)−2cos3π(x−3π)2
≈
21−23(x−3π)−41(x−3π)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
3π+0
0.500000
0.500000
0.500000
0.000000
0.000000
3π+1001
0.491315
0.491340
0.491315
2.49×10−5
1.45×10−7
3π+101
0.411044
0.413397
0.410897
0.002354
0.000146
3π+21
0.023597
0.066987
0.004487
0.043391
0.019109
3π+1
−0.458584
−0.366025
−0.616025
0.092559
0.157441
cosxf~1f~2
at 2π
cosx
≈
cos2π−sin2π(x−2π)−2cos2π(x−2π)2
≈
−(x−2π)
f(x)
f~1(x)
f~2(x)
linear error
quad. error
2π+0
6.12×10−17
6.12×10−17
6.12×10−17
0.000000
0.000000
2π+1001
−0.010000
−0.010000
−0.010000
1.67×10−7
1.67×10−7
2π+101
−0.099833
−0.100000
−0.100000
0.000167
0.000167
2π+21
−0.479426
−0.500000
−0.500000
0.020574
0.020574
2π+1
−0.841471
−1.000000
−1.000000
0.158529
0.158529
cosxf~1f~2
The famous one: near 0, cos x ≈ 1 − x²/2. At π/2 the curvature vanishes instead, so there the quadratic adds nothing.
2.1.3tanx
tanx
≈
tanx0+sec2x0(x−x0)+sec2x0tanx0(x−x0)2
reference
at 0
tanx
≈
tan0+sec20x+sec20tan0x2
≈
x
f(x)
f~1(x)
f~2(x)
linear error
quad. error
0+0
0.000000
0.000000
0.000000
0.000000
0.000000
0+1001
0.010000
0.010000
0.010000
3.33×10−7
3.33×10−7
0+101
0.100335
0.100000
0.100000
0.000335
0.000335
0+21
0.546302
0.500000
0.500000
0.046302
0.046302
0+1
1.557408
1.000000
1.000000
0.557408
0.557408
tanxf~1f~2
at 6π
tanx
≈
tan6π+sec26π(x−6π)+sec26πtan6π(x−6π)2
≈
31+34(x−6π)+943(x−6π)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
6π+0
0.577350
0.577350
0.577350
0.000000
0.000000
6π+1001
0.590761
0.590684
0.590761
7.79×10−5
8.97×10−7
6π+101
0.719356
0.710684
0.718382
0.008672
0.000974
6π+21
1.641346
1.244017
1.436467
0.397329
0.204879
6π+1
21.171805
1.910684
2.680484
19.261121
18.491321
tanxf~1f~2
at 4π
tanx
≈
tan4π+sec24π(x−4π)+sec24πtan4π(x−4π)2
≈
1+2(x−4π)+2(x−4π)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
4π+0
1.000000
1.000000
1.000000
0.000000
0.000000
4π+1001
1.020203
1.020000
1.020200
0.000203
2.70×10−6
4π+101
1.223049
1.200000
1.220000
0.023049
0.003049
4π+21
3.408223
2.000000
2.500000
1.408223
0.908223
4π+1
−4.588038
3.000000
5.000000
7.588038
9.588038
tanxf~1f~2
tan is odd, so at 0 the curvature is zero and the quadratic collapses back to x.
At r = 2 the quadratic approximation is exact — (1+x)² already is a quadratic, so there is no error at all.
2.2.4ax
a =
ax
≈
ax0+ax0lna(x−x0)+2ax0ln2a(x−x0)2
reference
at 0
ax
≈
a0+a0lnax+2a0ln2ax2
≈
1+lnax+2ln2ax2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
0+0
1.000000
1.000000
1.000000
0.000000
0.000000
0+1001
1.006956
1.006931
1.006955
2.41×10−5
5.56×10−8
0+101
1.071773
1.069315
1.071717
0.002459
5.65×10−5
0+21
1.414214
1.346574
1.406630
0.067640
0.007583
0+1
2.000000
1.693147
1.933374
0.306853
0.066626
axf~1f~2
at 1
ax
≈
a1+a1lna(x−1)+2a1ln2a(x−1)2
≈
a+alna(x−1)+2aln2a(x−1)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
1+0
2.000000
2.000000
2.000000
0.000000
0.000000
1+1001
2.013911
2.013863
2.013911
4.82×10−5
1.11×10−7
1+101
2.143547
2.138629
2.143434
0.004917
0.000113
1+21
2.828427
2.693147
2.813260
0.135280
0.015167
1+1
4.000000
3.386294
3.866747
0.613706
0.133253
axf~1f~2
ax
≈
ax0+ax0lna(x−x0)+2ax0ln2a(x−x0)2
reference
at 0
ax
≈
a0+a0lnax+2a0ln2ax2
≈
1+lnax+2ln2ax2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
0+0
1.000000
1.000000
1.000000
0.000000
0.000000
0+1001
1.011047
1.010986
1.011046
6.06×10−5
2.22×10−7
0+101
1.116123
1.109861
1.115896
0.006262
0.000227
0+21
1.732051
1.549306
1.700175
0.182745
0.031876
0+1
3.000000
2.098612
2.702087
0.901388
0.297913
axf~1f~2
at 1
ax
≈
a1+a1lna(x−1)+2a1ln2a(x−1)2
≈
a+alna(x−1)+2aln2a(x−1)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
1+0
3.000000
3.000000
3.000000
0.000000
0.000000
1+1001
3.033140
3.032958
3.033139
0.000182
6.65×10−7
1+101
3.348370
3.329584
3.347688
0.018786
0.000682
1+21
5.196152
4.647918
5.100524
0.548234
0.095628
1+1
9.000000
6.295837
8.106260
2.704163
0.893740
axf~1f~2
ax
≈
ax0+ax0lna(x−x0)+2ax0ln2a(x−x0)2
reference
at 0
ax
≈
a0+a0lnax+2a0ln2ax2
≈
1+lnax+2ln2ax2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
0+0
1.000000
1.000000
1.000000
0.000000
0.000000
0+1001
1.023293
1.023026
1.023291
0.000267
2.05×10−6
0+101
1.258925
1.230259
1.256768
0.028667
0.002157
0+21
3.162278
2.151293
2.814030
1.010985
0.348248
0+1
10.000000
3.302585
5.953534
6.697415
4.046466
axf~1f~2
at 1
ax
≈
a1+a1lna(x−1)+2a1ln2a(x−1)2
≈
a+alna(x−1)+2aln2a(x−1)2
f(x)
f~1(x)
f~2(x)
linear error
quad. error
1+0
10.000000
10.000000
10.000000
0.000000
0.000000
1+1001
10.232930
10.230259
10.232909
0.002671
2.05×10−5
1+101
12.589254
12.302585
12.567680
0.286669
0.021574
1+21
31.622777
21.512925
28.140298
10.109851
3.482478
1+1
100.000000
33.025851
59.535341
66.974149
40.464659
axf~1f~2
Covers e^x too: set a = e, so ln a = 1 and the coefficients collapse to 1, 1, 1/2.
3. Algebra
You do not have to differentiate a messy function twice. You can build its approximation out of the entries above instead.
Write Q(f) for the quadratic approximation of f near 0, and L(f) for the linear one.
The useful fact is that you can approximate first and combine second. For a product:
Q(Q(f)Q(g))=Q(fg)
So the Q of a product is just the quadratic approximation of the product of the quadratic approximations. You never have to touch fg itself.
Here is the full set:
rule
sum
Q(f+g)=Q(f)+Q(g)
scale
Q(kf)=kQ(f)
product
Q(Q(f)Q(g))=Q(fg)
composition, when g(0)=0
Q(Q(f)∘Q(g))=Q(f∘g)
Applied to a polynomial, Q does nothing but chop off everything above x2. So the outer Q on each left-hand side is the cut — a product of two quadratics runs up to x4, and those high terms are not trustworthy, since the inputs were only accurate to second order.
The g(0)=0 condition on the last line is not a deep restriction — it falls out of how Q is defined here. Q(f) only carries information about f near 0, so plugging in g(x) is only valid where g actually lands near 0. Centre Q 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.
Quadratic Approximation Cheatsheet - Stefan Wullems