{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

STA5106_FRADE_HW1

STA5106_FRADE_HW1 - STA5106 Dr Srivastava Homework 1 Jaime...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
STA5106: Dr. Srivastava Homework 1 Jaime Frade 1. x = (5298,0) y = (8012,0) z= (6024,0) ((x+y)* + z)* (x+y)* = (5298,0) + (8012, 0) = (1331,1) ((x+y)*+z)* = (1331,1) + (6024,0) = (1331,1) + (0602,1) = (1933,1) (x+(y+ z)*)* (y+z)* = (8012, 0) + (6024,0) = (1402,1) (x+(y+ z)*)* = (5298,0) + (1402,1) = (0530,1) + (1402,1) = (1934,1) Therefore, ((x+y)* + z)* (x+(y+ z)*)* 2. Value of t on my computer is 53 CODE x=1.5; alpha=1.0; t=0; u=1.0; while x>alpha u=u/2; x=alpha+u; t=t+1; end disp([ 'Value of t on my computer is ' , num2str(t)]);
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
STA5106: Dr. Srivastava Homework 1 Jaime Frade At the eighth step, function 1 fails to give the correct value for the given x. 3a. n x f 1 (x) f 2 (x) f 3 (x) 1 0.1 0.499583472197429 0.499583472197423 0.499583472197423 2 0.01 0.499995833347366 0.499995833347222 0.499995833347222 3 0.001 0.499999958325503 0.499999958333335 0.499999958333335 4 0.0001 0.499999996961265 0.499999999583333 0.499999958333335 5 0.00001 0.500000041370185 0.499999999995833 0.499999999583333 6 0.000001 0.500044450291170 0.499999999999958 0.499999999995833 7 0.0000001 0.499600361081320 0.500000000000000 0.499999999999958 8 0.00000001 0 0.500000000000000 0.500000000000000 9 0.000000001 0 0.500000000000000 0.500000000000000 CODE function y=function1(x) x=0.1; n=0; format long for i=1:10, x y = (1-cos(x))/(x*x); x=x/10; y if (y==0) n=i; n end end function y=function2(x) x=0.1; n=0; format long for i=1:10, x y = (sin(x)/x)^2/(1+cos(x)); x=x/10; y if (y==0) n=i; n end end
Image of page 2
STA5106: Dr. Srivastava Homework 1 Jaime Frade function y=function3(x) x=0.1; n=0; format long for i=1:10, x y = 2*(sin(x/2)/(x))^2; x=x/10; y if (y==0) n=i;
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern