Question: Using python: Find the Taylor polynomials of cos(x) about 0, i.e., p_n(x) where n=1, 3, 5(no programming here). For the domain -pi to pi, graph
Using python:
Find the Taylor polynomials of cos(x) about 0, i.e., p_n(x) where n=1, 3, 5(no programming here). For the domain -pi to pi, graph these 3 polynomials along with cos(x) all versus x. Use numpy in your program. Generate the vector x by
import numpy as N
x = np.arange( -3.14 , 3.14 , 0.01)
Save your graph to a pdf file. Use different symbols for each plot likes "+" and "o"s. Provide a legend and title. Use an x-label and y-label for axes.
Adjust the size of the plot. Give some axis parameters.
What do you observe about the graph?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
