MATH08013: Use An Appropriate Taylor Series To Write A MATLAB Function M-File That Approximates 𝑓(đ‘„) = Sin(2đ‘„)

Question 1.

Find Taylor series for ; 𝑓(đ‘„) = ln(đ‘„) at x=1.
Use MATLAB to plot 𝑓(đ‘„) = ln(đ‘„) forÂ đ‘„Â âˆˆÂ (0, 5], along with Taylor approximations aroundÂ đ‘„Â = 1 with 𝑛 = 0, 2, 4, 6.

Question 2.

Find Taylor series for 𝑓(đ‘„) = sin(2đ‘„) atÂ đ‘„Â = 𝜋

Use an appropriate Taylor series to write a MATLAB function M–file that approximates 𝑓(đ‘„) = sin(2đ‘„) for all x with a maximum error of 0.01. That is, your M–file should take values of x as input, and return values of sin(2đ‘„) as output, but should not use MATLAB’s built–in sine function i.e., sin.m. Hint. You might find MATLAB’s built–in function mod useful in dealing with the periodicity.