numerical analysis solution

Upload: dr-olayinka-okeola

Post on 03-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Numerical Analysis Solution

    1/14

    NUMERICAL

    ANALYSIS(SOLVED EXERCISES)

    Olayinka G. Okeola

  • 7/28/2019 Numerical Analysis Solution

    2/14

    2

    Question:Determine the values ofsuch that the b.v.p 0" uu ; 0)0( u ; 0)1( u has non-trivial

    solution for 5n using canomical form of solution.

    Solution

    Recall Chebyshev polynomial

    arcxTn cos()( )cos x ; 11 x

    0n 10cos)( xTo

    1n arcxT cos()(1 xx )cos

    The recursive relation generated as follows:

    12)( 22 xxT

    xxxT 34)( 33

    188)( 244 xxxT

    xxxxT 52016)( 355

    Given condition: 0)0( u ; ,0)1( u 10 x

    Transforming )(xTn , 11 x into 10 x

    x , are constants

    0 (1)

    1 (2)

    21

    Hence2

    1

    2

    1 x

    12 x

    12 x

  • 7/28/2019 Numerical Analysis Solution

    3/14

    3

    1)( xTo

    12)(1 xxT

    1881)12(2)( 222 xxxxT

    14832)12(3)12(4)(233

    3 xxxxxT

    1321602561281)12(8)12(8)( 234244 xxxxxxxT

    15040011201280512)12(5)12(20)12(16)( 2345355 xxxxxxxxxT

    )()1(1)(

    )()1()(1

    )(

    )()1()()(

    )()1()(

    )()1()}({

    )()1()(

    )1()(

    )(

    0

    0)(

    0

    2

    2

    2

    2

    2

    2

    2

    2

    2

    2

    2

    "

    xQiixxQ

    xQiixLQxQ

    xQiixLQxQ

    QxQiixLQ

    LQxLQiixLQL

    LQxLQiixLQ

    xxiixLQ

    xxLQ

    xL

    LU

    Ux

    UU

    i

    i

    i

    iii

    iii

    iii

    iii

    iii

    ii

    i

    i

    i

  • 7/28/2019 Numerical Analysis Solution

    4/14

    4

    32

    35

    5

    32

    4

    4

    2

    3

    3

    2

    2

    2

    1

    12020)(5

    2412)(4

    6)(3

    2)(2

    )(1

    1)(0

    xxxxQi

    xxQi

    xxxQi

    xxQi

    xxQi

    xQi o

    )()()()(

    )()()(

    )()()(

    )()()(

    )()()()()(

    0

    1

    0

    )1(

    2

    0

    )(

    1

    1

    0

    )1(

    2

    0

    )(

    1

    1

    0

    )1(

    212

    0

    )(

    11

    121

    xQcxcxxLU

    xcxxcxxLU

    xcxxTx

    xcxxTx

    xTxxTxxLU

    LU

    i

    n

    i

    n

    i

    n

    i

    n

    in

    n

    i

    in

    i

    n

    i

    in

    in

    n

    i

    in

    in

    n

    i

    in

    in

    nnn

    For U(0) = 0

    )0()()(01

    0

    )1(

    2

    0

    )(

    1 i

    n

    i

    n

    i

    n

    i

    n

    i Qcxcx

    (1)

    For U(1) =0

    )1()()(01

    0

    )1(

    2

    0

    )(

    1 i

    n

    i

    n

    i

    n

    i

    n

    i Qcxcx

    (2)

    0

    0

    )1()1(

    )0()0(

    2

    1

    1

    0

    )1(

    0

    )(

    1

    0

    )1(

    0

    )(

    n

    i

    i

    n

    i

    n

    i

    i

    n

    i

    n

    i

    i

    n

    i

    n

    i

    i

    n

    i

    QcQc

    QcQc

  • 7/28/2019 Numerical Analysis Solution

    5/14

    5

    For n=5

    1)

    32

    32

    5554

    543

    532

    521

    510

    50

    5

    0

    5

    307208001

    )0)(512(24)1280()0)(1120()2()400()0)(50(1)1(

    )0()0()0()0()0()0()0(

    QcQcQcQcQcQcQci

    ii

    2)

    32

    32

    4

    4

    43

    4

    32

    4

    21

    4

    10

    4

    0

    4

    0

    4

    30723201

    24)128()0)(256(

    )2()160()0)(32(

    1)1(

    )0()0()0()0()0()0(

    QcQcQcQcQcQci

    ii

    3)

    32

    23222

    5554

    543

    532

    521

    510

    50

    5

    0

    5

    921608001

    201)512(

    24121)1280(

    61)1120(

    21)400()1)(50(

    1)1(

    )1()1()1()1()1()1()1(

    QcQcQcQcQcQcQci

    ii

    4)

    32

    3222

    4

    4

    43

    4

    32

    4

    21

    4

    10

    4

    0

    4

    0

    4

    30723201

    24121)128(

    61)256(

    21)160(

    1)32(

    1)1(

    )1()1()1()1()1()1(

    QcQcQcQcQcQci

    ii

    3232

    3232

    30723201921608001

    30723201307208001

    0

    0

    2

    1

    A

  • 7/28/2019 Numerical Analysis Solution

    6/14

    6

    1474560091340867208)(

    1887436801474560045670422402)(

    01887436801474560045670422402

    0188743601474560045675422402

    03072320192160800130723201307208001

    0

    23'

    234

    234

    65432

    32323232

    f

    f

    A

    By Newton-Raphson method

    )(

    )('1

    f

    fnn

    n 2 11.51573

    3 11.06039

    4 10.70213

    5 10.42561

    6 10.21848

    7 10.07066

    8 9.97386

    9 9.92118

    10 9.85577

    9.9

  • 7/28/2019 Numerical Analysis Solution

    7/14

    7

    Problem Statement1) Use the explicit method to solve for the temperature distribution of a long, thin rod with a

    length lf 10cm and the following value: )./(49.0' CcmsCalk o , cmx 2 . At t = 0, the

    temperature of the rod is zero and the boundary conditions are fixed for all times at

    T(0)=1000C and T(10) =50

    0C. Note that the rod is aluminum with )./(2174.0 CgCalc o

    and 3/7.2 cmg . Compute results to t =0.2 and compare those in example 24.1

    2) Use the Crank-Nocolson method to solve problem 1 above for cmx 5.2 .

    Solutions1)

    010437.0

    /835.0)2174.07.2(

    )49.0(

    2.0

    05.02

    2

    2

    x

    tk

    scmk

    t

    stcm

  • 7/28/2019 Numerical Analysis Solution

    8/14

    8

    )2(11

    1 ji

    ji

    ji

    ji

    ji TTTTT

    At t= 0.05s

    0,1 ji 0437.1)100)0(20(0)2( 000

    1

    0

    2

    0

    1

    1

    1 TTTTT

    0,2 ji 0)0)0(20(0)2( 010

    2

    0

    3

    0

    2

    1

    2 TTTTT

    0,3 ji 0)0)0(20(0)2( 020

    3

    0

    4

    0

    3

    1

    3 TTTTT

    0,4 ji 52185.0)0)0(250(0)2( 03

    04

    05

    04

    14 TTTTT

    At t = 0.1s

    1,1 ji 04382.2)100)0875.2(20(0437.1)2( 101

    1

    1

    2

    1

    1

    2

    1 TTTTT

    1,2 ji 01089.0)0437.1)0(20(0)2( 111

    2

    1

    3

    1

    2

    2

    2 TTTTT

    1,3 ji 00544.0)0)0(252185.0(0)2( 121

    3

    1

    4

    1

    3

    2

    3 TTTTT

    1,4 ji 02191.1)0)52185.0(250(52185.0)2( 1314

    15

    14

    24 TTTTT

    At t = 0.15s

    2,1 ji

    04497.3)100)04382.2(201089.0(04382.2)2( 202

    1

    1

    2

    2

    1

    3

    1 TTTTT

    2,2 ji

    03205.0)04382.2)01089.0(200544.0(01089.0)2( 212

    2

    2

    3

    2

    2

    3

    2 TTTTT

    2,3 ji

    0161.0)01089.0)00544.0(202191.1(00544.0)2( 222

    3

    2

    4

    2

    3

    3

    3 TTTTT

    2,4 ji

    52248.1)00544.0)02191.1(250(02191.1)2( 2324

    25

    24

    34

    TTTTT

  • 7/28/2019 Numerical Analysis Solution

    9/14

    9

    At t = 0.2s

    3,1 ji

    02544.4)100)04497.3(203205.0(04497.3)2( 303

    1

    3

    2

    3

    1

    4

    1 TTTTT

    3,2 ji06333.0)04497.3)03205.0(20161.0(03205.0)2( 31

    3

    2

    3

    3

    3

    2

    4

    2 TTTTT

    3,3 ji

    03198.0)03205.0)00161.0(252248.1(0161.0)2( 323

    3

    3

    4

    3

    3

    4

    3 TTTTT

    3,4 ji 01272.2)0161.0)52248.1(250(52248.1)2( 33

    34

    35

    34

    44 TTTTT

    (2)

    Using Crank-Nicolson to solve the problem 1 with cmx 5.2

    01336.0

    /835.0

    2.0

    1.0

    5.2

    2

    2

    tk

    scmk

    st

    st

    cmx

    First interior node

    )()1(2)()1(2 102101

    21

    1 llllll tfTTtfTT

    Last interior node

    )()1(2)()1(2 111111

    1

    l

    m

    l

    m

    l

    m

    l

    m

    l

    m

    l

    m tfTTtfTT

    Inner nodes

    l

    i

    l

    i

    l

    i

    l

    i

    l

    i

    l

    i TTTTTT 111

    1

    11

    1 )1(2)1(2

  • 7/28/2019 Numerical Analysis Solution

    10/14

    1 0

    At t = 0.1s

    0,1 li

    672.201336.002672.2

    )100(00)100(01336.002672.2

    )()1(2)()1(2

    12

    11

    12

    11

    10

    02

    01

    00

    12

    11

    TT

    TT

    tfTTtfTT

    (1)

    0,2 li001336.002672.201336.0

    )1(2)1(2

    1

    3

    1

    2

    1

    1

    0

    3

    0

    2

    0

    1

    1

    3

    1

    2

    1

    1

    TTT

    TTTTTT (2)

    0,3 li001336.002672.201336.0

    )1(2)1(2

    1

    4

    1

    3

    1

    2

    0

    4

    0

    3

    0

    2

    1

    4

    1

    3

    1

    2

    TTT

    TTTTTT (3)

    0,4 li336.102672.201336.0

    )'()1(2)'()1(2

    1

    4

    1

    3

    5

    00

    35

    1

    4

    1

    3

    TT

    tfTTtfTT (4)

  • 7/28/2019 Numerical Analysis Solution

    11/14

    1 1

    336.1

    0

    0

    672.2

    02672.201336.0

    01336.002672.201336.0

    01336.002672.201336.0

    01336.002672.2

    14

    13

    12

    11

    T

    T

    T

    T

    Using Gauss elimination method[1] [1]

    See Appendix

    65917.0

    00428.0

    0087.0

    3183.1

    1

    4

    1

    3

    1

    2

    1

    1

    T

    T

    T

    T

    At t = 0.2s

    1,1 li

    2733.5336.100012.06014.2336.101336.002672.2

    )100()0087.0()3183.1(97328.1)100(02672.2

    )()1(2)()1(2

    22

    21

    22

    21

    20

    12

    11

    10

    22

    21

    TT

    TT

    tfTTtfTT

    (1)

    1,2 li

    0005.001336.002672.201336.0

    0006.001717.001761.001336.002672.201336.0

    )1(2)1(2

    23

    22

    21

    23

    22

    21

    13

    12

    11

    23

    22

    21

    TTT

    TTT

    TTTTTT

    (2)

    1,3 li

    01713.001336.002672.201336.0

    00881.00084.000012.001336.002672.201336.0

    )1(2)1(2

    2

    4

    2

    3

    2

    2

    2

    4

    2

    3

    2

    2

    1

    4

    1

    3

    1

    2

    2

    4

    2

    3

    2

    2

    TTT

    TTT

    TTTTTT

    (3)

    1,4 li36182.1)50(00881.001701.0)50(02672.201336.0

    )()1(2)'()1(2

    2

    4

    2

    3

    2

    5

    1

    4

    1

    35

    2

    4

    2

    3

    TT

    tfTTtfTT(4)

  • 7/28/2019 Numerical Analysis Solution

    12/14

    1 2

    36182.1

    01713.0

    0005.0

    2733.5

    02672.201336.000

    01336.002672.201336.00

    001336.002672.201336.0

    0001336.002672.2

    24

    23

    22

    21

    T

    T

    T

    T

    Using Gauss elimination method[2] [2]

    See Appendix

    67526.0

    50645.0

    02074.0

    60214.2

    1

    4

    1

    3

    1

    2

    1

    1

    T

    T

    T

    T

    Appendix [1]

    336.1

    0

    0

    672.2

    02672.201336.000

    01336.002672.201336.00

    001336.002672.201336.0

    0001336.002672.2

    1

    4

    1

    3

    1

    2

    1

    1

    T

    T

    T

    T

    02672.201336.0

    21m which gives

    336.1

    0

    01761.0

    672.2

    02672.201336.000

    01336.002672.201336.00

    001336.002672.20

    0001336.002672.2

    14

    13

    12

    11

    T

    T

    T

    T

    3

    32 1059222.60266.2

    01336.0 m which gives

    336.1

    000116.0

    01761.0

    672.2

    02672.201336.000

    01336.002672.200

    001336.002663.20

    0001336.002672.2

    14

    13

    12

    11

    T

    T

    T

    T

  • 7/28/2019 Numerical Analysis Solution

    13/14

    1 3

    3243 mm which gives

    3359.1000116.0

    01761.0

    672.2

    02663.200001336.002663.200

    001336.002663.20

    0001336.002672.2

    1

    4

    1

    3

    1

    2

    1

    1

    TT

    T

    T

    Solving by back substitution give

    3183.1672.201336.002663.2

    008666.001761.001336.002663.2

    004288.0000116.0)65917.0(01336.002663.2

    05917.002663.2

    3359.1

    1

    1

    1

    2

    1

    1

    1

    2

    1

    3

    1

    2

    1

    3

    1

    3

    1

    4

    TTT

    TTT

    TT

    T

    Appendix [2]

    36182.1

    01713.0

    0005.0

    2733.5

    02672.201336.000

    01336.002672.201336.00

    001336.002672.201336.0

    0001336.002672.2

    24

    23

    22

    21

    T

    T

    T

    T

    02672.201336.0

    21m which gives

    36182.1

    01713.0

    03526.0

    2733.5

    02672.201336.000

    01336.002672.201336.00

    001336.002663.20

    0001336.002672.2

    24

    23

    22

    21

    T

    T

    T

    T

    3

    32 1059222.60266.201336.0 m which gives

  • 7/28/2019 Numerical Analysis Solution

    14/14

    1 4

    36182.1

    01736.1

    03526.0

    2733.5

    02672.201336.000

    01336.002672.200

    001336.002663.20

    0001336.002672.2

    24

    23

    22

    21

    T

    T

    T

    T

    3243 mm which gives

    36852.1

    01736.1

    03526.0

    2733.5

    02663.2000

    01336.002672.200

    001336.002663.20

    0001336.002672.2

    24

    23

    22

    21

    T

    T

    T

    T

    Solving by back substitution give

    60214.22733.501336.002663.2

    02074.003526.001336.002663.2

    50645.001736.1)67526.0(01336.002663.2

    67526.002663.2

    36852.1

    2

    1

    2

    2

    2

    1

    2

    2

    2

    3

    2

    2

    2

    3

    2

    3

    2

    4

    TTT

    TTT

    TT

    T