summaryrefslogtreecommitdiff
path: root/Engineering_Mechanics_by_R.K_Bansal/chapter_18.ipynb
blob: 1086131cba7992e1646ca8039dbfe9198c3da41d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
{
 "metadata": {
  "name": "chapter 18.ipynb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 18:Work,Power And Energy "
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.1,Page No.673"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=500 #N #Weight of Body\n",
      "S=5 #m #Distance\n",
      "P=250 #N #Force\n",
      "P2=200 #N #Force 2\n",
      "theta=30 #Degrees #Angle made by Force with Horizontal\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Part-1\n",
      "\n",
      "#Work Done\n",
      "w=P*S #N*m\n",
      "\n",
      "#Work Done\n",
      "w2=P2*cos(theta*pi*180**-1)*S #N*m\n",
      "\n",
      "#Result\n",
      "print\"Work Done when Force 250 N is applied\",round(w,2),\"N*m\"\n",
      "print\"Work Done when Force 200 N is applied\",round(w2,2),\"N*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work Done when Force 250 N is applied 1250.0 N*m\n",
        "Work Done when Force 200 N is applied 866.03 N*m\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.2,Page No.673"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=1500 #N #Weight of Body\n",
      "S=500 #m #Distance\n",
      "P=15 #N #Force\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Work Done by Resistance \n",
      "w=P*S #N*m\n",
      "\n",
      "#Result\n",
      "print\"Work Done on body by Resistance is\",round(w,2),\"N*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work Done on body by Resistance is 7500.0 N*m\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.3,Page No.673"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=800 #N #Weight of Body\n",
      "theta=30 #Degrees #angle made by Force\n",
      "S=5 #Distance\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Force apllied on Block\n",
      "P=W*sin(theta*pi*180**-1) #N\n",
      "\n",
      "#Work done on body\n",
      "w=P*S #N*m\n",
      "\n",
      "#Result\n",
      "print\"Work Done in Pulling up the Body is\",round(w,2),\"N*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work Done in Pulling up the Body is 2000.0 N*m\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.4,Page No.674"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "mu=0.3 #coefficient of Friction\n",
      "S=5 #m #Distance\n",
      "W=800 #N #weight of Body\n",
      "theta=30 #Degrees #Angle made by Weight\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#reaction Force \n",
      "R=W*cos(theta*pi*180**-1) #N\n",
      "\n",
      "#Force of friction\n",
      "F=mu*R\n",
      "\n",
      "#Forces along plane\n",
      "P=W*sin(theta*pi*180**-1)+F #N*m\n",
      "\n",
      "#Work done\n",
      "w=P*S #N*m\n",
      "\n",
      "#Result\n",
      "print\"Work done in pullint the Body\",round(w,2),\"N*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work done in pullint the Body 3039.23 N*m\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.5,Page No.674"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "L=50.5 #m #Total Length of chain\n",
      "R=0.16 #m #Radius of pulley\n",
      "L_AC=40 #m #Length of chain between A and C\n",
      "W=505 #N #Weight of chain\n",
      "w=10 #N #weight of chain per metre length\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Length of BD\n",
      "L_BD=L-2*pi*R*2**-1-L_AC #m\n",
      "\n",
      "#Weight of chain \n",
      "W_AC=w*L_AC #N\n",
      "\n",
      "#Weight of chain BD\n",
      "W_BD=w*L_BD #N\n",
      "\n",
      "#Force applied at D\n",
      "P=W_AC-W_BD #N\n",
      "\n",
      "#Length of chain\n",
      "l=(L_AC-w)*2**-1\n",
      "\n",
      "#Work Done\n",
      "W=P*l*2**-1 #N\n",
      "\n",
      "#Result\n",
      "print\"Work Done by the man\",round(W,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work Done by the man 2250.2 N\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.6,Page No.675"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=2000 #N #Weight of Body\n",
      "P_o=750 #N #Initial Force\n",
      "x_o=0 #Initial Force,distance moved is zero\n",
      "S=25 #m #Distance Moved\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Force after a distance of 25 m\n",
      "P=P_o+10*S #N\n",
      "\n",
      "#Work Done\n",
      "w=(P_o+P)*2**-1*S #N*m\n",
      "\n",
      "#Result\n",
      "print\"Work Done by applied Force\",round(w,2),\"N*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work Done by applied Force 21875.0 N*m\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.7,Page No.676"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from scipy.integrate import * \n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "L=10 #m #Length of free cable\n",
      "W=50 #N #weight of cable per m length\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Weight of element \n",
      "#X=50*dx\n",
      "\n",
      "#work done on the elemnt\n",
      "#dw=500-50*x*dx\n",
      "\n",
      "def f(x) :\n",
      "    return 500-50*x\n",
      "\n",
      "I,err = quad(f,0,10)\n",
      "\n",
      "#Result\n",
      "print\"Work done by Electric Motor is\",round(I,2),\"N*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work done by Electric Motor is 2500.0 N*m\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.8,Page No.677"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=2000 #KN #Weight of train\n",
      "v=10 #m/s #speed of train\n",
      "F=20000 #N #Resistance due to friction\n",
      "p=F #Net Force in Direction of motion\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Power\n",
      "P=p*v*10**-3 #KW\n",
      "\n",
      "#Result\n",
      "print\"Power of the Engine\",P,\"KW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power of the Engine 200.0 KW\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.9,Page No.677"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=2000 #KN #Weight of train\n",
      "F=20000 #N #Resistance Force\n",
      "v=10 #m/s #Velocity\n",
      "a=0.5 #m/s**2 #Acceleration\n",
      "g=9.81 #m/s**2 #acceleration due to gravity\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Mass of train\n",
      "m=W*10**3*g**-1 #Kg\n",
      "\n",
      "#Net Force\n",
      "F=m*a+F #N\n",
      "\n",
      "#Power of the engine \n",
      "P=F*v*10**-3 #KW\n",
      "\n",
      "#Result\n",
      "print\"Power of the Engine is\",round(P,2),\"KW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power of the Engine is 1219.37 KW\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.10,Page No.678"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=1500*1000 #N #Weight of train \n",
      "v=10 #m/s #speed\n",
      "F=7500 #N #Force exerted by engine\n",
      "#sin(theta)=1*100**-1 \n",
      "\n",
      "#Calculation\n",
      "\n",
      "#from equation of Net Force\n",
      "#p=W*sin(theta*pi*180**-1)+F\n",
      "#After sub values and further simplifying we get\n",
      "p=15000+7500 #N\n",
      "\n",
      "#Power Exerted by Engine\n",
      "P=p*v*10**-3 #KW\n",
      "\n",
      "\n",
      "#Result\n",
      "print\"Power Exerted by the Engine is\",round(P,2),\"KW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power Exerted by the Engine is 225.0 KW\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.11,Page No.678"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=2*10**6 #N\n",
      "v=5 #m/s velocity\n",
      "P=35*10**3 #W\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#After simplifying Net Force acting on engine in direction of motion, we get\n",
      "#F=13333.3-F+P  ................1\n",
      "\n",
      "#Power\n",
      "P2=P*v**-1\n",
      "\n",
      "#Sub value in equation 1 we get\n",
      "F=13333.3+P2 #N\n",
      "\n",
      "#case-2\n",
      "\n",
      "#frpm Net force in direction of motion after simplifying we get,value of \n",
      "F2=W*150**-1+F #N\n",
      "\n",
      "#Power developed by engine \n",
      "P3=F2*v*10**-3 #KW\n",
      "\n",
      "\n",
      "#Result\n",
      "print\"Power required to pull the train is\",round(P3,2),\"KW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power required to pull the train is 168.33 KW\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.12,Page No.680"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "P=1800 #N #Force\n",
      "D=0.01 #m #Diameter\n",
      "R=0.005 #m #Radius\n",
      "theta=2*pi #Radians\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Torque\n",
      "T=P*R #N*m\n",
      "\n",
      "#Work done\n",
      "W=T*theta #N*m\n",
      "\n",
      "#Result\n",
      "print\"Work Done is\",round(W,2),\"N*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Work Done is 56.55 N*m\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.13,Page No.681"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "F=1800 #N #Force\n",
      "R=0.005 #m #Radius\n",
      "T=9 #N*m #Torque\n",
      "N=200 #r.p.m\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Power of the shaft\n",
      "P=2*pi*N*T*60**-1 #W\n",
      "\n",
      "#Result\n",
      "print\"Power of the shaft is\",round(P,2),\"N*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power of the shaft is 188.5 N*m\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.14,Page No.683"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "M=2 #Kg #Mass\n",
      "v=50 #m/s**2 #Velocity\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Let K.E be E\n",
      "E=1*2**-1*M*v**2 #N*m\n",
      "\n",
      "#Result\n",
      "print\"Kinetic Energy is\",round(E,2),\"N*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Kinetic Energy is 2500.0 N*m\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.15,Page No.683"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "m=0.081 #Kg\n",
      "u=300 #m/s #Initial Velocity of bullet\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Part-1\n",
      "\n",
      "S=0.1 #m #Penetration of bullet\n",
      "v=0 #Final Velocity of bullet\n",
      "\n",
      "#Kinetic Energy of bullet\n",
      "KE=(m*v**2-m*u**2)*2**-1 #N*m\n",
      "\n",
      "#Force of Resistance\n",
      "P=-KE*S**-1 #N\n",
      "\n",
      "#Part-2\n",
      "\n",
      "#Depth of penetration\n",
      "S2=0.05 #m\n",
      "\n",
      "#work Done by force of Resistance\n",
      "W2=-P*S2 #N*m\n",
      "\n",
      "#velocity of bullet after 5cm penetration\n",
      "v1=((W2+(m*u**2*2**-1))*2*m**-1)**0.5\n",
      "\n",
      "#Result\n",
      "print\"Force of Resistance is\",round(P,2),\"N\"\n",
      "print\"Velocity with which bullet will emerge is\",round(v1,2),\"m/s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Force of Resistance is 36450.0 N\n",
        "Velocity with which bullet will emerge is 212.13 m/s\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.15(A),Page No.684"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "m=0.01 #Kg \n",
      "u=1000 #m/s #Velocity\n",
      "t=0.002 #s #time taken b bullet to travel\n",
      "v=0 #Final Velocity\n",
      "g=9.81 #acceleration due to gravity\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Kinetic energy of bullet\n",
      "KE=m*u**2*2**-1 #N*m\n",
      "\n",
      "#acceleration\n",
      "a=-(v-u)*t**-1 #m/s**2\n",
      "\n",
      "#Frictional Force\n",
      "F=m*a #N\n",
      "\n",
      "#Distance travelled by bullet\n",
      "S=F*KE**-1 #m\n",
      "\n",
      "#Part-2\n",
      "\n",
      "#Probable speed of the car just before brakes are applied \n",
      "V=(30*2*g)**0.5*1000**-1*3600 #m/s\n",
      "\n",
      "#Result\n",
      "print\"Average Force acted on the bullet is\",round(F,2),\"N\"\n",
      "print\"Distance penetrated by it\",round(S,2),\"m\" \n",
      "print\"Probable speed of the car just before brakes are applied\",round(V,2),\"km/hr\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Average Force acted on the bullet is 5000.0 N\n",
        "Distance penetrated by it 1.0 m\n",
        "Probable speed of the car just before brakes are applied 87.34 km/hr\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.16,Page No.686"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=20*10**3 #N #Weight of Truck\n",
      "u=45*10**3*(3600)**-1 #speed of truck #m/s\n",
      "v=0 #Final Velocity of truck\n",
      "g=9.81 #Acceleration due to gravity\n",
      "m=W*g**-1 #mass of truck\n",
      "S=20 #m #DIstance\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Kinetic energy of Truck\n",
      "KE=-m*(v**2-u**2)*2**-1 #N*m\n",
      "\n",
      "#Average Force of Resisting acting on the truck\n",
      "P=KE*S**-1 #N\n",
      "\n",
      "#Result\n",
      "print\"Average Force of Resisting acting on the truck\",round(P,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Average Force of Resisting acting on the truck 7963.81 N\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.17,Page No.687"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=9810 #N #Weight of train\n",
      "m=1000 #Kg  #Mass of car\n",
      "u=0 #m/s #Intial Velocity\n",
      "v=12.5 #m/s #Final by car\n",
      "S=50 #m #Distance\n",
      "P=100 #N #Resistance\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Change in Kinetic Energy\n",
      "KE=m*(v**2-u**2)*2**-1 #N*m\n",
      "\n",
      "#Average driving Force exerted by engine\n",
      "P2=KE*S**-1+P #N\n",
      "\n",
      "#Power Developed by Engine\n",
      "P3=P2*v*10**-3 #KW\n",
      "\n",
      "#Result\n",
      "print\"Average driving Force exerted by engine\",round(P2,2),\"N\"\n",
      "print\"Power Developed by Engine\",round(P3,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Average driving Force exerted by engine 1662.5 N\n",
        "Power Developed by Engine 20.78 N\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.18,Page No.688"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=196.2 #N #Weight of train\n",
      "m=20 #Kg #Mass\n",
      "P=300 #N #force\n",
      "theta=30 #Degrees #Angle of inclination\n",
      "mu=0.2 #Coefficient of friction\n",
      "u=0 #initial Velocity\n",
      "t=4 #seconds\n",
      "\n",
      "#Calculation\n",
      "\n",
      "R=W*cos(theta*pi*180**-1) #N\n",
      "\n",
      "#Net Force in Direction of motion\n",
      "F=P-W*sin(theta*pi*180**-1)-mu*R #N\n",
      "\n",
      "#Acceleration\n",
      "a=F*m**-1 #m/s**2\n",
      "\n",
      "#Distance travelled in four seconds\n",
      "s=u*t+a*t**2*2**-1\n",
      "\n",
      "#Velocity after 4 seconds\n",
      "v=u+a*t #m/s\n",
      "\n",
      "#Kinetic Energy after 4 seconds\n",
      "KE=m*v**2*2**-1 #N*m\n",
      "\n",
      "#Work Done on Body\n",
      "W2=F*s #N*m\n",
      "\n",
      "#Momentum of the body after four seconds\n",
      "e=m*v #Kg*m/s\n",
      "\n",
      "#Impulse applied in four seconds\n",
      "I=F*t #N*s\n",
      "\n",
      "#Result\n",
      "print\"Acceleration of Body\",round(a,2),\"m/s**2\"\n",
      "print\"Distance travelled in four seconds\",round(s,2),\"m\"\n",
      "print\"Velocity after 4 seconds\",round(v,2),\"m/s\"\n",
      "print\"Kinetic Energy after 4 seconds\",round(KE,2),\"N*m\"\n",
      "print\"Work Done on Body\",round(W2,2),\"N*m\"\n",
      "print\"Momentum of the body after four seconds\",round(e,2),\"Kg*m/s\"\n",
      "print\"Impulse applied in four seconds\",round(I,2),\"N*s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Acceleration of Body 8.4 m/s**2\n",
        "Distance travelled in four seconds 67.17 m\n",
        "Velocity after 4 seconds 33.58 m/s\n",
        "Kinetic Energy after 4 seconds 11278.47 N*m\n",
        "Work Done on Body 11278.47 N*m\n",
        "Momentum of the body after four seconds 671.67 Kg*m/s\n",
        "Impulse applied in four seconds 671.67 N*s\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.19,Page No.689"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "W=20 #N #Weight \n",
      "theta=20 #Degrees #Angle\n",
      "u=12 #m/s #Initial Velocity\n",
      "mu=0.15 #Coefficient of friction\n",
      "g=9.81 #acceleration due to gravity\n",
      "m=W*g**-1 #Kg\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#PArt-1\n",
      "\n",
      "v=0 #Final Velocity\n",
      "R=W*cos(theta*pi*180**-1)\n",
      "F=mu*R\n",
      "\n",
      "#Net Force\n",
      "F2=W*sin(theta*pi*180**-1)+mu*R #N\n",
      "\n",
      "#Change in Kinetic Energy\n",
      "KE=m*(v**2-u**2)*2**-1 #N*m\n",
      "\n",
      "S=KE*F2**-1 #Max Distance\n",
      "\n",
      "#PArt-2\n",
      "\n",
      "#Net Force in direction of motion is\n",
      "F3=W*sin(theta*pi*180**-1)-mu*R #N\n",
      "\n",
      "#Work Done on the body \n",
      "W2=F3*S #N*m\n",
      "\n",
      "#Velocity of the body\n",
      "V1=(-W2*2*g*W**-1)**0.5\n",
      "\n",
      "#Result\n",
      "print\"MAx Distance that the bodt will move up the inclined plane\",round(S,2),\"m\"\n",
      "print\"Velocity of the body\",round(V1,2),\"m/s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "MAx Distance that the bodt will move up the inclined plane -15.2 m\n",
        "Velocity of the body 7.74 m/s\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.20,Page No.691"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "m1=0.025 #Kg #Mass of bullet\n",
      "u1=600 #m/s #Initial Veloctiy of Bullet\n",
      "m2=5 #Kg #Mass of Wooden Block\n",
      "u2=0 #m/s #Final Velocity of bullet\n",
      "S=0.9 #m #Distance travelled by block and bullet\n",
      "g=9.81 #Acceleration due to gravity\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Total mass of bullet\n",
      "M=m1+m2 #Kg\n",
      "\n",
      "#common Velocityof bullet and block after impact\n",
      "V=(m1*u1+m2*u2)*M**-1 #m/s\n",
      "\n",
      "#Average resistance between block and horizontal surface\n",
      "\n",
      "#Initial Velocity of Block And Bullet\n",
      "Vi=V #m/s\n",
      "\n",
      "#Final Velocity\n",
      "Vf=0 #m/s\n",
      "\n",
      "#Change of KE of bullet and Block\n",
      "KE=M*(Vf**2-Vi**2)*2**-1 #N*m\n",
      "\n",
      "#Frictional resistance \n",
      "P=-KE*S**-1 #N\n",
      "\n",
      "#Coefficient of Friction \n",
      "\n",
      "W=M*g #N\n",
      "R=W #N \n",
      "\n",
      "mu=P*R**-1 \n",
      "\n",
      "#Result\n",
      "print\"Average Resistance between Block and horizontal surface\",round(P,2),\"N\"\n",
      "print\"Coefficient of friction is\",round(mu,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Average Resistance between Block and horizontal surface 24.88 N\n",
        "Coefficient of friction is 0.5\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.21,Page No.692"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "m1=0.01 #Kg #mass of bullet\n",
      "m2=1 #Kg #Mass of Block\n",
      "S=1 #m #Distance travelled by block and bullet\n",
      "mu=0.2 #coefficient of friction\n",
      "g=9.81 #Acceleration due to gravity\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#total mass of buulet and wooden block\n",
      "M=m1+m2 #Kg\n",
      "\n",
      "#Friction Force\n",
      "F=mu*M*g #N\n",
      "\n",
      "#Work Done by force of friction\n",
      "W=F*S #N\n",
      "\n",
      "#Velocity of bullet\n",
      "u1=(W*2*M**-1)**0.5*M*m1**-1 #m/s\n",
      "\n",
      "#Result\n",
      "print\"Velocity of bullet is\",round(u1,2),\"m/s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Velocity of bullet is 200.07 m/s\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.22,Page No.694"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "M=1500 #Kg #Mass of Hammer\n",
      "h=0.6 #m #Height from which hammer drops\n",
      "m=750 #kg #Mass of pile\n",
      "S=0.05 #m #Depth of penetration\n",
      "g=9.81 #Acceleration due to gravity\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Velocity of hammer after falling through height of 0.6 m from rest\n",
      "v=(2*g*h)**0.5 #m/s\n",
      "\n",
      "#Total momentum of hammer and pile just before impact\n",
      "p=M*v #Kg*m/s\n",
      "\n",
      "#Common Velocity\n",
      "V=p*(M+m)**-1 #m/s\n",
      "\n",
      "#Part-2\n",
      "\n",
      "#K.E of system\n",
      "KE=(M+m)*round(V,2)**2*2**-1 #N*m\n",
      "\n",
      "#Loss of P.E of system\n",
      "PE=(M+m)*g*S #N*m\n",
      "\n",
      "#Total Energy loss\n",
      "E=KE+PE #N*m\n",
      "\n",
      "#Resistance of ground\n",
      "R=E*S**-1 #N\n",
      "\n",
      "#Result\n",
      "print\"Common Velocity after impact\",round(V,2),\"m/s\"\n",
      "print\"Average Resistance of the ground\",round(R,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Common Velocity after impact 2.29 m/s\n",
        "Average Resistance of the ground 140064.75 N\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.23,Page No.695"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "M=750 #Kg #MAss of hammer\n",
      "h=1.2 #m #Height through which hammer drops\n",
      "m=200 #kg #mass of pile\n",
      "R=79*10**3 #N #Average resistance of ground\n",
      "g=9.81 #Acceleration due to gravity\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Velocity of hammer after falling through height of 0.6 m from rest\n",
      "v=(2*g*h)**0.5 #m/s\n",
      "\n",
      "#Total momentum of hammer and pile just before impact\n",
      "p=M*v #Kg*m/s\n",
      "\n",
      "#Common Velocity\n",
      "V=p*(M+m)**-1 #m/s\n",
      "\n",
      "#Part-2\n",
      "\n",
      "#K.E of system\n",
      "KE=(M+m)*round(V,2)**2*2**-1 #N*m\n",
      "\n",
      "#Depth of penetration into the ground\n",
      "S=KE*(R-(M+m)*g)**-1\n",
      "\n",
      "#Result\n",
      "print\"Depth of penetration into the ground\",round(S,2),\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Depth of penetration into the ground 0.1 m\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.24,Page No.696"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "M=400 #Kg #Mass of Hammer\n",
      "h=3 #m #Height from which hammer drops\n",
      "m=0 #kg #Mass of pile\n",
      "S=1 #m #Depth of penetration\n",
      "g=9.81 #Acceleration due to gravity\n",
      "\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Velocity of hammer after falling through height of 0.6 m from rest\n",
      "v=(2*g*h)**0.5 #m/s\n",
      "\n",
      "#Total momentum of hammer and pile just before impact\n",
      "p=M*v #Kg*m/s\n",
      "\n",
      "#Common Velocity\n",
      "V=p*(M+m)**-1 #m/s\n",
      "\n",
      "#Part-2\n",
      "\n",
      "#K.E of system\n",
      "KE=(M+m)*V**2*2**-1 #N*m\n",
      "\n",
      "#Loss of P.E of system\n",
      "PE=(M+m)*g*S #N*m\n",
      "\n",
      "#Total Energy loss\n",
      "E=KE+PE #N*m\n",
      "\n",
      "#Resistance of ground\n",
      "R=E*S**-1 #N\n",
      "\n",
      "\n",
      "#Result\n",
      "print\"Resistance of ground for penetration is\",round(R,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resistance of ground for penetration is 15696.0 N\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.25,Page No.697"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "M=10 #Kg #Mass of Body\n",
      "k=100 #N/cm #stiffnes\n",
      "h=2 #cm #Height through which mass 10 kg is dropped \n",
      "  \n",
      "#Calculation\n",
      "\n",
      "#For Position 1\n",
      "#PE+KE=M*g*(x+h) ............1\n",
      "\n",
      "#For Position 2\n",
      "#PE of spring=50*x**2  .............2\n",
      "\n",
      "#Equating equations 1 and 2 we get\n",
      "#5x**2-9.81*x-19.62=0\n",
      "\n",
      "a=5\n",
      "b=-9.81\n",
      "c=-19.62\n",
      "\n",
      "X=b**2-4*a*c\n",
      "\n",
      "#Max Displacement of spring\n",
      "x1=(-b+X**0.5)*(2*a)**-1\n",
      "x2=(-b-X**0.5)*(2*a)**-1\n",
      "\n",
      "#Result\n",
      "print\"Max Displacement of spring\",round(x1,2),\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Max Displacement of spring 3.19 m\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.26,Page No.698"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "m=0.01 #kg #Mass of bullet\n",
      "M=1 #kg #Mass of body\n",
      "L=1 #m #Length of string\n",
      "theta=18.2 #degrees\n",
      "g=9.81 #acceleration due to gravity\n",
      "L_OA=1 #m #Length of OA\n",
      "L_OB=1 #m #Length of OB\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#From Geometry of figure\n",
      "h=L_OA-L_OB*cos(theta*pi*180**-1) #m\n",
      "\n",
      "#Potential Energy of body and bullet at B\n",
      "PE=(M+m)*g*h\n",
      "\n",
      "#from Kinetic Energy of body and bullet after impact\n",
      "V=(PE*2*(M+m)**-1)**0.5 #m/s #Velocity of body and bullet\n",
      "\n",
      "#Velocity of bullet\n",
      "u=(M+m)*V*m**-1\n",
      "\n",
      "#Result\n",
      "print\"Velocity of Bullet is\",round(u,2),\"m/s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Velocity of Bullet is 100.06 m/s\n"
       ]
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.27,Page No.700"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "m=0.03 #kg #Mass of bullet\n",
      "u=483 #m/s #Velocity of bullet\n",
      "M=10 #kg #MAss of body\n",
      "L=0.8 #m #Length of string\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Momentum of bullet and body before impact\n",
      "p=m*u #Kg*m/s\n",
      "\n",
      "#from Momentum of bullet and body after impact\n",
      "V=p*(M+m)**-1 #m/s\n",
      "\n",
      "#K.E of the bullet and body after impact\n",
      "KE=(M+m)*V**2*2**-1 #N*m\n",
      "\n",
      "#Angle through which body swings\n",
      "theta=arccos(-((KE*((M+m)*g)**-1)-L)*L**-1)*(pi**-1*180) #Degrees\n",
      "\n",
      "#Result\n",
      "print\"Angle through which body swings is\",round(theta,2),\"Degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Angle through which body swings is 29.88 Degrees\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.28,Page No.701"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of Variables\n",
      "\n",
      "m=0.03 #kg #mass of bullet\n",
      "u=483 #m/s #velocity of bullet\n",
      "M=10 #Kg #Mass of body\n",
      "L=0.8 #m #Length of string\n",
      "v=96.5 #m/s #Velocity of body\n",
      "g=9.81 #acceleration due to gravity\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Velocity of Body after impact\n",
      "V=(m*u-m*v)*M**-1 #m/s\n",
      "\n",
      "#Height \n",
      "h=V**2*(2*g)**-1 #m\n",
      "\n",
      "#from geometry\n",
      "theta=arccos((L-h)*L**-1)*(pi**-1*180)\n",
      "\n",
      "#Result\n",
      "print\"Angle through which the body will swing\",round(theta,2),\"Degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Angle through which the body will swing 23.89 Degrees\n"
       ]
      }
     ],
     "prompt_number": 31
    }
   ],
   "metadata": {}
  }
 ]
}