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.

WhatsApp icon