Homework Solution: MATLAB……

    MATLAB... HW 1 2 problem 4.11 Instead of estimating cos(T/4), use the Maclaurin series expansion of sin(x), shown below, to estimate cos(5π/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) = Σ 0 (2k)! 2! 4!6!
    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!

    Expert Answer

     
    format short function approx = Cosine(val)

    MATLAB…

    HW 1 2 problem 4.11 Instead of estimating cos(T/4), explanation the Maclaurin order paraphrase of ungodliness(x), shown beneath, to revere cos(5π/12) complimentary to at lowest 3 sig figs. Display the results to the hide in a table affect the undivided in Example 4.1 in your work. Explanation fprintf. Publish your results as a PDF, and upload to Blackboard concurrently with the M- rasp. cos(x) = Σ 0 (2k)! 2! 4!6!

    Instead of estimating cos(pi/4), explanation the Maclaurin order paraphrase of ungodliness(x), shown beneath, to revere cos(5 pi/12) complimentary to at lowest 3 sig figs. Display the results to the hide in a table affect the undivided in Example 4.1 in your work. Explanation 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!

    Expert Reply

     

    format short
    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 esteem of Cosine ce (5/12)PI is: %.3fn”,approx);
    approx =Cosine(0.25*pi);
    fprintf(“Approximate esteem of Cosine ce PI/4 is: %.3fn”,approx);
    =============================================================
    See output