test1 fskm set1 mac2016

Upload: atiqah-umairah

Post on 01-Mar-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 Test1 Fskm Set1 Mac2016

    1/3

    Test1_fskm_Set1_mac2016

    Universiti Teknologi MaraFakulti Sains Komputer & Matematik

    MAT 575 TEST 1

    NAME : __________________________________________________ 1.

    UITM No : ______________ GROUP/PROG:_______________ 2.

    LECTURER : MAZNITA 3.

    Instructions : 1. Answer all FIVE questionsin 1 hour 15 mins.

    2. Perform all calculations using FOUR decimal places.

    3. Attach this question paper with your answer sheets.

    4.5.

    Question 1

    Justify that 561.x approximate 56111.x to 3 significant digits.(3 marks)

    Question 2

    Let .)( 123 xxxf

    a) Use the Bisection method with three iterations to reduce the interval of the root of f if].,.[ 5040r .

    b) How many iterations are required if the Bisection method is used to locate the root of

    faccurate up to 10-4given

    ].,.[ 5040r ?

    (10 marks)

    Question 3

    By applying Secant method solve the equation 0922 xex using 10x and 2

    1x until

    accuracy of up to 3 decimal places is achieved.(7 marks)

    Question 4

    Show analytically that there is an intersection of 12 xxg )( and xxh cos)( 2 between

    the values 70.x and 80.x . Then, by applying Newtons method find the point ofintersection correct to 4 significant digits. Then, calculate the relative error for each of theiteration. (Note: calculator in radian)

    (8 marks)

    Question 5

    Provide one advantage of Bisection method and one disadvantage of Newtons method.

    (2 marks)

    ENDGood Luck!

  • 7/25/2019 Test1 Fskm Set1 Mac2016

    2/3

    Test1_fskm_Set1_mac2016

    SolutionQuestion 1

    331051070460

    56111

    56156111

    x..

    ..

    The relative error 3105 x , thus 561.x approximate 56111.x to 3 significant

    digits.

    Question 21a)

    ]..[,).()..(.).(

    .).(

    )(

    5040050401250050

    1360040

    123

    rfff

    f

    xxxf

    Bisect ion formu la ,ba

    c2

    initial interval [0.4,0.5]

    iteration a b c fa fb fc interval of root1 0.4 0.5 0.45 -0.1360 0.1250 -0.0089 [0.45,0.5]

    2 0.45 0.5 0.475 -0.0089 0.1250 0.0572 [0.45,0.475]

    3 0.45 0.475 0.4625 -0.0089 0.0572 0.0239 [0.45,0.4625]

    After 3 iterations the root is in the interval [0.45, 0.4625].

    1b)

    9.96n

    n

    ab

    E

    n

    2

    10

    4050

    10

    2

    10

    4

    4

    4

    ln

    ..ln

    )(

    Hence, requires at least 10 iterations.

    Question 3

    Identify equation: 0922 xex 922 xexxf )(

    Secant formu la:

    )x(ff,ff

    xxfxx nn

    nn

    nnnnn

    1

    11

    Relat ive error for each i terat ion:

    1

    1

    n

    nn

    new

    oldnew

    x

    xx

    x

    xx or 100100

    1

    1x

    x

    xxx

    x

    xx

    n

    nn

    new

    oldnew

    %

  • 7/25/2019 Test1 Fskm Set1 Mac2016

    3/3

    Test1_fskm_Set1_mac2016

    Iteration xn xn-1 fn fn-1 xn+1

    Rel

    Error (3D)

    1 2 1 49.5982 -0.6109 1.0122 0.9760 1.012

    2 1.0122 2 -0.4044 49.5982 1.0202 0.0078 1.020

    3 1.0202 1.012168 -0.2662 -0.4044 1.0356 0.0149 1.036

    4 1.0356 1.020158 0.0059 -0.2662 1.0352 0.0003 1.035

    5 1.0352 1.035551 -0.0001 0.0059 1.0352 0.0000 1.035

    Thus, the root correct to 3 decimal places is 1.035.

    Question 4

    12 xxg )( and xxh cos)( 2

    xxxxxfxxxfxxxx

    xhxg

    sin)sin()('cos)(coscos

    )()(

    222221

    021212

    22

    Show analytically that the intersection point is between x=0.7 and x=0.8.

    ]..[,).()..(.).(

    .).(

    8070080702466080

    0397070

    rfff

    Newtons formula:

    )x('f

    )x(f

    xxn

    nnn 1

    Initial guess x0=0.7: (or any other value sufficiently close)

    Iteration Xn f f (x) Xn+1

    1 0.7 -0.0397 2.6884 0.7148

    2 0.7148 0.0004 2.7404 0.7146

    3 0.7146 0.0000 2.7399 0.7146

    Thus, the root correct to 4 significant digits is 0.7146.

    The point of intersection is (0.7146, g(0.7146)) = (0.7146, h(0.7146)) = (0.7146, 1.5107)

    Question 5

    Advantage of Bisection: (one only)1. simple to use2. will definitely converge if criteria is fulfilled

    Disadvantage of Newton:1. may fail or diverge