Skip to content

Instantly share code, notes, and snippets.

@adituv
Created November 14, 2013 01:50
Show Gist options
  • Save adituv/7459940 to your computer and use it in GitHub Desktop.
Save adituv/7459940 to your computer and use it in GitHub Desktop.
Pendulum results with and without sin(x) ~ x. Initial conditions: timestep = 0.1s pendulum length = 1m pendulum mass = 0.25kg gravitational acceleration = 9.81 damping = 0.5 initial angle = 1 initial angular velocity: -0.8
# Assumed that sin(x) ~ x
0.837900
0.626022
0.395107
0.171615
-0.024014
-0.178162
-0.284002
-0.340814
-0.352829
-0.327829
-0.275669
-0.206898
-0.131584
-0.058425
0.005834
0.056669
0.091778
0.110861
0.115252
0.107459
0.090683
0.068366
0.043806
0.019860
-0.001245
-0.018006
-0.029649
-0.036055
-0.037643
-0.035220
-0.029827
-0.022586
-0.014578
-0.006741
0.000189
0.005715
0.009575
0.011724
0.012293
0.011542
0.009809
0.007460
0.004850
0.002285
0.000010
-0.001812
-0.003091
-0.003812
-0.004014
-0.003782
-0.003225
-0.002464
-0.001613
-0.000774
-0.000027
0.000574
0.000998
0.001239
0.001310
0.001239
0.001060
0.000814
0.000536
0.000262
0.000016
-0.000181
-0.000322
-0.000403
-0.000428
-0.000406
-0.000349
-0.000269
-0.000178
-0.000088
-0.000008
0.000057
0.000104
0.000131
0.000140
0.000133
0.000115
0.000089
0.000059
0.000030
0.000003
-0.000018
-0.000033
-0.000043
-0.000046
-0.000044
-0.000038
-0.000029
-0.000020
-0.000010
-0.000001
0.000006
0.000011
0.000014
0.000015
0.000014
0.000012
0.000010
0.000007
0.000003
0.000001
-0.000002
-0.000003
-0.000004
-0.000005
-0.000005
-0.000004
-0.000003
-0.000002
-0.000001
-0.000000
0.000001
0.000001
0.000001
0.000002
0.000002
0.000001
0.000001
0.000001
0.000000
0.000000
-0.000000
-0.000000
-0.000000
-0.000001
-0.000001
-0.000000
-0.000000
-0.000000
-0.000000
-0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
-0.000000
-0.000000
-0.000000
-0.000000
# No approximation used
0.853452
0.662289
0.449036
0.235848
0.042374
-0.116560
-0.232299
-0.302305
-0.329104
-0.318838
-0.279874
-0.221605
-0.153427
-0.083893
-0.020045
0.032999
0.072198
0.096481
0.106457
0.104014
0.091874
0.073162
0.051022
0.028306
0.007358
-0.010123
-0.023115
-0.031241
-0.034677
-0.034025
-0.030166
-0.024121
-0.016918
-0.009496
-0.002627
0.003126
0.007421
0.010130
0.011303
0.011133
0.009904
0.007950
0.005607
0.003182
0.000930
-0.000963
-0.002382
-0.003284
-0.003684
-0.003642
-0.003251
-0.002620
-0.001858
-0.001066
-0.000327
0.000295
0.000764
0.001065
0.001201
0.001191
0.001067
0.000863
0.000615
0.000357
0.000115
-0.000090
-0.000245
-0.000345
-0.000391
-0.000390
-0.000350
-0.000284
-0.000204
-0.000119
-0.000040
0.000027
0.000079
0.000112
0.000127
0.000127
0.000115
0.000094
0.000067
0.000040
0.000014
-0.000008
-0.000025
-0.000036
-0.000042
-0.000042
-0.000038
-0.000031
-0.000022
-0.000013
-0.000005
0.000002
0.000008
0.000012
0.000014
0.000014
0.000012
0.000010
0.000007
0.000004
0.000002
-0.000001
-0.000003
-0.000004
-0.000004
-0.000004
-0.000004
-0.000003
-0.000002
-0.000001
-0.000001
0.000000
0.000001
0.000001
0.000001
0.000001
0.000001
0.000001
0.000001
0.000000
0.000000
-0.000000
-0.000000
-0.000000
-0.000000
-0.000000
-0.000000
-0.000000
-0.000000
-0.000000
-0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
-0.000000
-0.000000
-0.000000
-0.000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment