Quadratic Approximation Calculator

Type a function and a point near your value, and optionally the value to estimate.

Use x. Type powers with ^, and functions with brackets: sin(x), e^(2x), ln(x), sqrt(x).

Near x =aa

A point where f is easy to work out, such as 4 for sqrt(x).

Estimate at x = (optional)xx

Optional: a value of x to estimate f at, close to the point above.

Try

Result

You enteredf(x)=cos⁡x,a=0f(x) = \cos x,\quad a = 0

Q(0.2)=0.98\displaystyle Q(0.2) = 0.98

Q(x)

Q(x)=1−12x2\displaystyle Q(x) = 1 - \frac{1}{2}x^{2}

Exact value

f(0.2)≈0.980067\displaystyle f(0.2) \approx 0.980067

Error of Q

∣f−Q∣≈0.000067\displaystyle \left|f - Q\right| \approx 0.000067

Error of the linear approximation

∣f−L∣≈0.019933\displaystyle \left|f - L\right| \approx 0.019933
Show the work
  1. Derivative of cosine

    This is a standard derivative: cos⁡x\cos x differentiates to −sin⁡x-\sin x.

    Using ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x

    ddx[cos⁡x]=−sin⁡x\frac{d}{dx}\left[\cos x\right] = -\sin x
  2. First and second derivatives

    The approximation needs the first two derivatives.

    f′(x)=−sin⁡xf′′(x)=−cos⁡x\begin{gathered} f'(x) = -\sin x \\ f''(x) = -\cos x \end{gathered}
  3. Values at the point

    Put x=0x = 0 into ff, f′f' and f′′f''.

    f(0)=1f′(0)=0f′′(0)=−1\begin{gathered} f(0) = 1 \\ f'(0) = 0 \\ f''(0) = -1 \end{gathered}
  4. Quadratic approximation

    The tangent line matches the value and the slope; adding the square term also matches the bending (the second derivative), so it stays close for longer.

    Q(x)=f(a)+f′(a)(x−a)+f′′(a)2(x−a)2=1−12x2\begin{aligned} Q(x) &= f(a) + f'(a)(x - a) + \frac{f''(a)}{2}(x - a)^2 \\ &= 1 - \frac{1}{2}x^{2} \end{aligned}
  5. Estimate at the chosen point

    Put x=0.2x = 0.2 into QQ.

    Q(0.2)=0.98Q(0.2) = 0.98
  6. Result

    The quadratic approximation.

Drag to pan. Scroll or pinch to zoom. Arrow keys pan and + / − zoom when the graph has focus.
  • y = cos(x)

Points on the graph

  • y = cos(x): zero (-1.570796, 0)
  • y = cos(x): zero (1.570796, 0)
  • y = cos(x): maximum (0, 1)

Worked examples