Answer
We want g(0) and f(0) to be the same. We can see that
g(0) = a + b(0) + c(0)2 = a
and we know that
f(0) = sin(0) = 0.
In order for g(0) and f(0) to be the same, we must have a = 0.
Next, we want g'(0) and f '(0) to be the same. We can compute
g'(x) = b + 2cx
and we know f '(x) = cos x. To have these derivatives be the same at 0, we need
g'(0) = b + 2c(0) = b
and
f '(0) = cos(0) = 1
to be the same, so we must have b = 1.
Finally, we want the second derivatives to be the same. We calculate the second derivatives:
g(2)(x) = 2c
and
f (2)(x) = -sin(x)
so we need
2c = g(2)(0) = f(2)(0) = -sin(0) = 0
which means c = 0. Now that we know a, b, and c, we can write
g(x) = a + bx + cx2 = 0 + x + 0x2 = x.
If we graph g(x) and f(x) on the same graph, g does look like a good approximation of f close to zero:
In this case, it just happened that the second derivative of f was zero, so we ended up with g being a line anyway.