ap assignment 1

Upload: syed-ali-hassan

Post on 05-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 AP Assignment 1

    1/17

    Q#01: Solve the following system of linear equations by using crammers rule.

    10x+4y-z+2w+u=112

    x-10y+z-3w+2u=120

    2x-3y+10z+w-2u=135

    -x+3y+z-10w+u=145

    3x-y+3z-w+10u=99

    A B C D E F G H I

    1 Matrix

    A B X

    2 10 4 -1 2 1 112 x

    3 1 -10 1 -3 2 120 y

    4 2 -3 10 1 -2 135 z

    5 -1 3 1 -10 1 145 w

    6 3 -1 3 -1 10 99 u

    78 det A= 111993

    9

    10 D1

    11 112 4 -1 2 1

    12 120 -10 1 -3 2 det D1= 1941372

    13 135 -3 10 1 -2 x= 17.33476

    14 145 3 1 -10 1

    15 99 -1 3 -1 10

    16

    17 D218 10 112 -1 2 1

    19 1 120 1 -3 2

    20 2 135 10 1 -2 det D2= -488857

    21 -1 145 1 -10 1 y= -4.36507

    22 3 99 3 -1 10

    23

  • 7/31/2019 AP Assignment 1

    2/17

    24 D3

    25 10 4 112 2 1

    26 1 -10 120 -3 2 det D3= 1151746

    27 2 -3 135 1 -2 z= 10.28409

    28 -1 3 145 -10 1

    29 3 -1 99 -1 10

    30

    31 D4

    32 10 4 -1 112 1

    33

    1 -10 1 120 2 det D4=

    -

    1854876

    34 2 -3 10 135 -2 w= -16.5624

    35 -1 3 1 145 1

    36 3 -1 3 99 10

    37

    38 D539 10 4 -1 2 112

    40 1 -10 1 -3 120 det D5= -53578

    41 2 -3 10 1 135 u= -0.4784

    42 -1 3 1 -10 145

    43 3 -1 3 -1 99

    X=|D1|/|A|

    Y=|D2|/|A|

    Z=|D3|/|A|

    w=|D4|/|A|

    u=|D5|/|A|

  • 7/31/2019 AP Assignment 1

    3/17

    Q#1(b): Solve the following system of equation by using inversion of matrices.

    10x+4y-z+2w+u=112

    X-10y+z-3w+2u=120

    2x-3y+10z+w-2u=135

    -x+3y+z-10w+u=145

    3x-y+3z-w+10u=99

    A B C D E F G H I

    1 Matrix A B X2 10 4 -1 2 1 112 x

    3 1 -10 1 -3 2 120 y

    4 2 -3 10 1 -2 135 z

    5 -1 3 1 -10 1 145 w

    6 3 -1 3 -1 10 99 u

    7

    8 Inverse

    A

    9 0.100051 0.041815 0.010018 0.010206 -0.01739 x= 17.33476

    10 0.006786 -0.09132 0.002464 0.027466 0.015331 y= -4.3650711 -0.02155 -0.03506 0.092175 0.012795 0.026323 z= 10.28409

    12 -0.01254 -0.03656 0.005974 -0.09285 0.019046 w= -16.5624

    13 -0.02413 -0.01481 -0.02981 -0.01344 0.100756 u= -0.4784

    14

    BAX1

  • 7/31/2019 AP Assignment 1

    4/17

    Q#1(c): Solve the following system of equation by using Jacobi Method.

    10x+4y-z+2w+u=112

    X-10y+z-3w+2u=120

    2x-3y+10z+w-2u=135

    -x+3y+z-10w+u=145

    3x-y+3z-w+10u=99

    A B C D E F G H

    1 Matrix

    A B

    2 10 4 -1 2 1 1123 1 -10 1 -3 2 120

    4 2 -3 10 1 -2 135

    5 -1 3 1 -10 1 145

    6 3 -1 3 -1 10 99

    7 k x y z w u

    8 0 0 0 0 0 0

    9 1 11.2 -12 13.5 -14.5 9.9

    10 2 16.56 -6.1 18.29 -3.03 5.14

    11 3 11.903 -7.184 13.349 -4.047 0.358

    124 13.5123 -8.9985 13.7509

    -11.1022 3.4475

    13

    5 15.3

    -

    7.47396 15.29681

    -

    8.27555 3.73111

    14

    6 13.9419

    -

    7.36654 14.25597

    -

    6.89204 2.295908

    15

    7 13.86984

    -

    8.03183 14.06997

    -

    8.74307 2.866498

    16

    8 14.4677

    -

    7.75841 14.58319

    -

    8.43508 3.195549

    17

    9 14.21251

    -

    7.61229 14.4166

    -

    7.81025 2.80408318

    10 14.0849

    -

    7.79525 14.28303

    -

    8.23337 2.853522

    19

    11 14.25112

    -

    7.76917 14.41564

    -

    8.29165 2.992484

    20

    12 14.22519

    -

    7.70566 14.40819

    -

    8.08846 2.906055

    21 13 14.16853 - 14.35672 - 2.889401

  • 7/31/2019 AP Assignment 1

    5/17

    7.74661 8.16067

    22

    14 14.20616

    -

    7.75353 14.38422

    -

    8.21071 2.933152

    23

    15 14.21182

    -

    7.73326 14.39253

    -

    8.15702 2.919308

    24 16 14.19353 -7.74 14.37718-

    8.16173 2.907725

    25

    17 14.19986

    -

    7.74521 14.38101

    -

    8.18177 2.918962

    26

    18 14.20444

    -

    7.73994 14.38556

    -

    8.17031 2.918437

    27

    19 14.19964

    -

    7.74028 14.38181

    -

    8.16743 2.914025

    28

    20 14.20002

    -

    7.74231 14.3817

    -

    8.17355 2.916335

    29

    The following formulas are used in Jacobi Method.

    =($G$2-$B$2*C8+$C$2*D8-$D$2*E8-$E$2*F8)/$A$2

    =($G$3-$A$3*B8-$C$3*D8+$D$4*E8-$E$3*F8)/$B$3

    =($G$4-$A$4*B8+$B$4*C8-$D$4*E8-$E$4*F8)/$C$4

    =($G$5+$A$5*B8-$B$5*C8-$C$6*D8-$E$6*F8)/$D$5

    =($G$6-$A$6*B8+$B$6*C8-$C$6*D8+$D$6*E8)/$E$6

  • 7/31/2019 AP Assignment 1

    6/17

    Q#1(d): Solve the following system of equation by using Gauss seidal Method.

    10x+4y-z+2w+u=112

    X-10y+z-3w+2u=120

    2x-3y+10z+w-2u=135

    -x+3y+z-10w+u=145

    3x-y+3z-w+10u=99

    A B C D E F G

    1 Gauss

    seidal

    method

    2 Matrix A B

    3 10 4 -1 2 1 112

    41 -10 1 -3 2 120

    5 2 -3 10 1 -2 135

    6 -1 3 1 -10 1 145

    7 3 -1 3 -1 10 99

    8 K x y z w u

    9 0 0 0 0 0 0

    10

    1 11.2 -10.88 14.524-

    15.1916 4.78996

    11

    2 16.65892-

    12.4812 16.38973-

    14.4605 2.679574

    12

    3 17.17765-

    12.4455 15.78008-

    14.6699 2.724222

    13

    4 17.26175

    -

    12.5519 15.82507

    -

    14.6845 2.69759614

    5 17.30541-

    12.5528 15.81272-

    14.6843 2.688266

    15

    6 17.30786-

    12.5556 15.81118-

    14.6859 2.688438

    16

    7 17.30945 -12.556 15.8112-

    14.6859 2.687997

    17

    8 17.30967-

    12.5561 15.81108 -14.686 2.687978

    18

    9 17.30972-

    12.5561 15.81108 -14.686 2.687967

    19

    10 17.30973-

    12.5561 15.81108 -14.686 2.687965

    =($G$3-$B$3*C9+$C$3*D9-$D$3*E9-$E$3*F9)/$A$3

    =($G$4-$A$4*B10-$C$4*D9+$D$4*E9-$E$4*F9)/$B$4

    =($G$5-$A$5*B10+$B$5*C10-$D$5*E9-$E$5*F9)/$C$5

    =($G$6+$A$6*B10-$B$6*C10-$C$6*D10-$E$6*F9)/$D$6

    =($G$7-$A$7*B10+$B$7*C10-$C$7*D10+$D$7*E10)/$E$7

  • 7/31/2019 AP Assignment 1

    7/17

    Q#02(a): If y=f(x), then ()

    =

    [+2(++) +]

    Where, h= ( ) , n= 10 given, = f ()

    Then evaluate the following integral.

    1:

    A B C D E F G

    1 Trapezoidal

    Rule

    2 n Xo Xn h X f(x) Integral

    3

    10 0 1 0.1 0 **0 *0.691478424 0.1 0.198025 0.2 0.384615

    6 0.3 0.550459

    7 0.4 0.689655

    8 0.5 0.8

    9 0.6 0.882353

    10 0.7 0.939597

    11 0.8 0.97561

    12 0.9 0.994475

    13 1 1

    The following formulas have been used:

    *=$D$3*(F3+2*SUM (F4:F12) +F13)/2

    **=2*E3/ (1+E3^2)

  • 7/31/2019 AP Assignment 1

    8/17

    (b): If y=f(x), then ()

    =

    [+2(++) +]

    Where, h= ( ) , n= given, = f ()

    Then evaluate the following integral.

    With n=16

    A B C D E F G

    1 Trapezoidal

    Rule

    2 n Xo Xn h X f(x) Integral

    3

    16 0 1 0.0625 0 **1 *0.7852354034 0.0625 0.9961095 0.125 0.984615

    6 0.1875 0.966038

    7 0.25 0.941176

    8 0.3125 0.911032

    9 0.375 0.876712

    10 0.4375 0.839344

    11 0.5 0.8

    12 0.5625 0.759644

    13 0.625 0.71910114 0.6875 0.679045

    15 0.75 0.64

    16 0.8125 0.602353

    17 0.875 0.566372

    18 0.9375 0.532225

    19 1 0.5

    The Following formulas have been used:

    *=$D$3*(F3+2*SUM(F4:F18) +F19)/2

    **=1/(1+E3^2)

  • 7/31/2019 AP Assignment 1

    9/17

    (c): If y=f(x), then ()

    =

    [+2(++) +]

    Where, h= ( ) , n= given, = f ()

    Then evaluate the following integral.

    dx and n=16

    A B C D E F G

    1 Trapezoidal

    Rule

    2 n Xo Xn h X f(x) Integral

    316 0 90 5.625 0 0 68.2819728

    4 5.625 0.313077

    5 11.25 0.441696 16.875 0.538781

    7 22.5 0.618614

    8 28.125 0.686583

    9 33.75 0.745366

    10 39.375 0.796488

    11 45 0.840896

    12 50.625 0.87921

    13 56.25 0.91185

    14 61.875 0.939107

    15 67.5 0.96118716 73.125 0.978233

    17 78.75 0.990346

    18 84.375 0.997589

    19 90 1

    The following formulas have been used:

    *=$D$3*(F3+2*SUM(F4:F18)+F19)/2

    **=SQRT(SIN(RADIANS(E3)))

  • 7/31/2019 AP Assignment 1

    10/17

    Q#03: Find the value of sinx.

    Sinx= x-

    +

    -

    x=10

    A B C D E F G

    1

    n

    x in

    degrees x in radians Terms

    2 0 10 0.17453293 *0.174533

    3 1 -0.00089

    4 2 1.35E-06

    5

    3 -9.8E-10 sinx= 0.1736486 4 4.14E-137 5 -1.1E-16

    8 6 2.24E-20

    9 7 -3.2E-24

    10 8 3.64E-28

    11 9 -3.2E-32

    12 10 2.35E-36

    13 11 -1.4E-40

    14 12 7.18E-45

    15 13 -3.1E-4916 14 1.17E-53

    17 15 -3.8E-58

    18 16 1.1E-62

    19 17 -2.8E-67

    20 18 6.47E-72

    21 19 -1.3E-76

    22 20 2.47E-81

    The following formulas have been used:

    *=((-1)^A2)*($C$2^(2*A2+1))/FACT(2*A2+1)

  • 7/31/2019 AP Assignment 1

    11/17

    (b): X=15

    A B C D E F G

    1

    n

    x in

    degrees x in radians Terms

    2 0 15 0.26179939 0.261799

    3 1 -0.00299

    4 2 1.02E-05

    53 -1.7E-08 sinx= 0.258819

    6 4 1.59E-11

    7 5 -9.9E-15

    8 6 4.36E-189 7 -1.4E-21

    10 8 3.58E-25

    11 9 -7.2E-29

    12 10 1.17E-32

    13 11 -1.6E-36

    14 12 1.81E-40

    15 13 -1.8E-44

    16 14 1.49E-48

    17 15 -1.1E-52

    18 16 7.15E-5719 17 -4.1E-61

    20 18 2.12E-65

    21 19 -9.8E-70

    22 20 4.1E-74

    The following formulas have been used:

    *=((-1)^A2)*($C$2^(2*A2+1))/FACT(2*A2+1)

  • 7/31/2019 AP Assignment 1

    12/17

    (c): x=30

    A B C D E F G

    1n

    x indegrees x in radians Terms

    2 0 30 0.52359878 0.523599

    3 1 -0.02392

    4 2 0.000328

    53 -2.1E-06 sinx= 0.5

    6 4 8.15E-09

    7 5 -2E-11

    8 6 3.57E-14

    97 -4.7E-1710 8 4.7E-20

    11 9 -3.8E-23

    12 10 2.46E-26

    13 11 -1.3E-29

    14 12 6.09E-33

    15 13 -2.4E-36

    16 14 8.02E-40

    17 15 -2.4E-43

    18 16 6.14E-47

    19 17 -1.4E-5020 18 2.91E-54

    21 19 -5.4E-58

    22 20 9.01E-62

    The following formulas have been used:

    *=((-1)^A2)*($C$2^(2*A2+1))/FACT(2*A2+1)

  • 7/31/2019 AP Assignment 1

    13/17

    Q#03(b): Find the value of cosx.

    Cosx= 1 -

    +

    -.

    (1) X=10

    A B C D E F G

    1

    n

    x in

    degrees x in radians Terms

    2 0 10 0.17453293 *1

    3

    1

    -

    0.01523

    4

    2

    3.87E-

    05

    5 3 -3.9E-08

    6

    4

    2.14E-

    11

    75 -7.2E-15 cosx= 0.984807753

    8

    6

    1.67E-

    18

    9 7 -2.8E-22

    10

    8

    3.54E-

    26

    11 9 -3.5E-30

    12

    10

    2.83E-

    3413 11 -1.9E-38

    14

    12

    1.03E-

    42

    15 13 -4.8E-47

    16

    14

    1.94E-

    51

    17 15 -6.8E-56

    18

    19

    20

    21

    22

    The following formulas have been used:

    *=(-1)^(A2)*($C$2^(2*A2))/FACT(2*A2)

  • 7/31/2019 AP Assignment 1

    14/17

    (2) X=15

    A B C D E F G

    1

    n

    x in

    degrees x in radians Terms

    2 0 15 0.26179939 1

    3 1 -0.03427

    4 2 0.000196

    5 3 -4.5E-07

    6 4 5.47E-10

    75 -4.2E-13 cosx= 0.965925826

    8 6 2.16E-16

    9 7 -8.1E-20

    10 8 2.33E-23

    11 9 -5.2E-27

    12 10 9.4E-31

    13 11 -1.4E-34

    14 12 1.73E-38

    15 13 -1.8E-42

    16 14 1.66E-46

    17 15 -1.3E-50

    The following formulas have been used:

    *= (-1)^(A2)*($C$2^(2*A2))/FACT(2*A2)

  • 7/31/2019 AP Assignment 1

    15/17

  • 7/31/2019 AP Assignment 1

    16/17

    Q#04: If ( )

    ,then find the value offrom the following data.

    12,29,34,37,25,60,15,20,30,35,42,47,48,50,57,59,24,53,51,58.

    A B C D E F

    1 x x- ( )2 12 39.3 -27.3 745.29

    3 15 -24.3 590.49

    4 20 -19.3 372.49

    5 24 -15.3 234.09

    6 25 -14.3 204.49

    7 29 -10.3 106.09

    8 30 -9.3 86.49 ( )= 4452.29 34 -5.3 28.09

    1035 -4.3 18.49 = 222.61

    11 37 -2.3 5.29

    1242 2.7 7.29 = 14.92012

    13 47 7.7 59.29

    14 48 8.7 75.69

    15 50 10.7 114.49

    16 51 11.7 136.89

    17 53 13.7 187.69

    16 57 17.7 313.29

    19 58 18.7 349.69

    20 59 19.7 388.09

    60 20.7 428.49

  • 7/31/2019 AP Assignment 1

    17/17

    Q#05: Find the area of circle, perimeter of circle, volume of cylinder, with given

    height (h), volume of the sphere for radius r. (radius for circle and sphere is the

    same).radius is taken as 4cm, and height is taken as 6cm.

    a) Area of circle= = PI()*A2^2b) Perimeter of circle= p= =2*PI()*A2c) Volume of cylinder= v= =PI()*A2^2*B2

    d) Volume of sphere= v=

    =(4*PI()*A2^3)/3

    A B C D E F

    1 Radius

    (r)

    Height

    (h)

    Area of

    circle

    perimeter of

    circle

    volume of

    cylinder

    volume of

    sphere2 4 6 50.26548246 25.13274123 301.5928947 268.0825731

    3

    4

    5

    6

    7

    8

    9