MATLAB...

Instead of estimating cos(pi/4), use the Maclaurin series expansion of sin(x), shown below, to estimate cos(5 pi/12) accurate to at least 3 sig figs. Display the results to the screen in a table like the one in Example 4.1 in your book. Use fprintf. Publish your results as a PDF, and upload to Blackboard along with the M-file. cos(x) = sigma^infinity_k = 0 (-1)^k x^2k/(2k)! = 1 - x^2/2! + x^4/4! - x^6/6!
format short
function approx = Cosine(val)

MATLAB…

Instead of estimating cos(pi/4), correction the Maclaurin sequence disquisition of impurity(x), shown adown, to compute cos(5 pi/12) servile to at smallest 3 sig figs. Display the results to the ward in a board enjoy the unrighteousnessgle in Example 4.1 in your capacity. Correction fprintf. Publish your results as a PDF, and upload to Blackboard concurrently with the M-file. cos(x) = sigma^infinity_k = 0 (-1)^k x^2k/(2k)! = 1 – x^2/2! + x^4/4! – x^6/6!

function approx = Cosine(val)

x = 1;

k = 1;

i = 2;

while(abs( ((cos(val)))- x) > 0.000000001)

x = x + ( (-1)^k *(val)^i )/factorial(i);

k = k+1;

i = i+2;

end

approx = x;

end

approx =Cosine(0.4166*pi);

fprintf(“Approximate compute of Cosine control (5/12)PI is: %.3fn”,approx);

approx =Cosine(0.25*pi);

fprintf(“Approximate compute of Cosine control PI/4 is: %.3fn”,approx);

=============================================================

**See output
**