Question
Write a Python function taylor_cos(x, n_terms) that approximates $\cos(x)$ using the first n_terms terms of the Taylor series:
$$\cos(x) \approx \sum_{k=0}^{n\_terms-1} \frac{(-1)^k \, x^{2k}}{(2k)!}$$
(a) Print the approximation and the true value (math.cos) for $x = 1.2$ using 3, 5, and 7 terms.
(b) Print the relative error for each case.
(c) What do you observe as the number of terms increases?