Task 02

Task 02

deadline: 07/03/2021 23:59 CET

[0.5 points]: Write a function that takes nN0 as an argument and returns the first n terms of the Maclaurin series of the function sinx,

k=0n(1)k(2k+1)!x2k+1

in the form of numpy.poly1d (in order to evaluate the factorial, you may use the function scipy.special.factorial).

[0.25 points]: Write a function that calculates the relative error of the function above for arbitrary point xR and nN0. Print the relative error for x=π/2 and n=2 on 16 decimal places.

[0.25 points]: Find n for which the relative error at x=π/2 is less than 200ε, where ε is the machine epsilon of the 64-bit representation of IEEE floating point numbers. Print that number.

# add your code here