In [1]: import numpy
import matplotlib.pyplot as plt
%matplotlib inline
from time import time
Problem 1: Using
(-) sin(x) xljtl (2j +I) j-0
(Ipts) Derive Taylor series for sin(x) around x = 0.
(3pts) Write a Python program which computes the Taylor series of sin(x) using recursion, non-vectorization, and tolerance-based while loop approach.
(3pts) Write a Python program which computes the Taylor series of sin(x) using recursion, vectorization, and tolerance-based while loop approach.
(Ipts) On the interval [0, #], plot the semi-log error in your approximation for tolerance values of 10^-5 using your Python program in (b).
(Ipts) On the interval [0, x], plot the semi-log error in your approximation for tolerance values of 10^-5 using your Python program in (c).
(Zpts) Compare the time it takes to run the Python program in (d) and (e). Which program takes longer to run and why?