Skip to content

Instantly share code, notes, and snippets.

@samrat
Created February 19, 2016 05:37
Show Gist options
  • Save samrat/f4c045bb272618ff0ac0 to your computer and use it in GitHub Desktop.
Save samrat/f4c045bb272618ff0ac0 to your computer and use it in GitHub Desktop.
Solving differential equations using Euler's method in Org tables

$$w’ = (3-w)(w+1)$$

twm1
04-5
1-10
2-10
3-10

$$y’ = e2/y$$

tym0.5
022.7182818
0.53.35914091.8137388
1.4.26601031.5981107
1.55.06506571.4841788
2.5.80715511.4111468
2.56.51272851.3594646
3.7.19246081.3205772

$$ y’ = y^2 - y^3 $$

tym0.1
00.20.032
0.10.20320.032900063
0.20.206490010.033833778
0.30.209873390.034802580
0.40.213353650.035807969
0.50.216934450.036851500
0.60.22061960.037934788
0.70.224413080.039059512
0.80.228319030.040227404
0.90.232341770.041440262
1.0.236485800.042699939
1.10.240755790.044008338
1.20.245156620.045367422
1.30.249693360.046779199
1.40.254371280.048245718
1.50.259195850.049769066
1.60.264172760.051351357
1.70.269307900.052994720
1.80.274607370.054701283
1.90.280077500.056473173
2.0.285724820.058312478
2.10.291556070.060221235
2.20.297578190.062201403
2.30.303798330.064254837
2.40.310223810.066383241
2.50.316862130.068588142
2.60.323720940.070870831
2.70.330808020.073232319
2.80.338131250.075673269
2.90.345698580.078193932
3.0.353517970.080794063
3.10.361597380.083472844
3.20.369944660.086228776
3.30.378567540.089059588
3.40.387473500.091962103
3.50.396669710.094932126
3.60.406162920.097964304
3.70.415959350.10105199
3.80.426064550.10418708
3.90.436483260.10735988
4.0.447219250.11055895
4.10.458275150.11377095
4.20.469652250.11698052
4.30.481350300.12017016
4.40.493367320.12332013
4.50.505699330.12640841
4.60.518340170.12941069
4.70.531281240.13230044
4.80.544511280.13504900
4.90.558016180.13762583
5.0.571778760.13999878
5.10.585778640.14213452
5.20.599992090.14399905
5.30.614392000.14555836
5.40.628947840.14677910
5.50.643625750.14762950
5.60.65838870.14808019
5.70.673196720.14810523
5.80.688007240.14768301
5.90.702775540.14679722
6.0.717455260.14543766
6.10.731999030.14360097
6.20.746359130.14129114
6.30.760488240.13851980
6.40.774340220.13530623
6.50.787870840.13167715
6.60.801038560.12766615
6.70.813805180.12331290
6.80.826136470.11866211
6.90.838002680.11376237
7.0.849378920.10866476
7.10.860245400.10342150
7.20.870587550.098084631
7.30.880396010.092704710
7.40.889666480.087329692
7.50.898399450.082003996
7.60.906599850.076767758
7.70.914276630.071656316
7.80.921442260.066699908
7.90.928112250.061923558
8.0.934304610.057347155
8.10.940039330.052985682
8.20.945337900.048849537
8.30.950222850.044944957
8.40.954717350.041274466
8.50.958844800.037837406
8.60.962628540.034630402
8.70.966091580.031647845
8.80.969256360.028882355
8.90.972144600.026325167
9.0.974777120.023966539
9.10.977173770.021796050
9.20.979353380.019802855
9.30.981333670.017975970
9.40.983131270.016304422
9.50.984761710.014777417
9.60.986239450.013384450
9.70.987577900.012115400
9.80.988789440.010960616
9.90.989885509.9109285e-3
10.0.990876598.9576962e-3

Shortcuts

  • C-c C-c apply formula(only takes 1 step). The table will end up in a weird intermediate state if you do this!
  • C-u C-u C-c * iterate until stability. This is the “spreadsheet-like” behaviour that you probably want to use.
  • C-c ’ Interactive edit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment