Chapter 3 Numerical Methods

3.1 Euler's Method

  1. 1

    \(y_1=1.450000000,\; y_2=2.085625000,\; y_3= 3.079099746\)

  2. 2

    \(y_1=1.200000000,\; y_2=1.440415946,\; y_3=1.729880994\)

  3. 3

    \(y_1=1.900000000,\; y_2=1.781375000,\; y_3=1.646612970\)

  4. 4

    \(y_1=2.962500000,\; y_2=2.922635828,\; y_3=2.880205639\)

  5. 5

    \(y_1=2.513274123,\; y_2=1.814517822,\; y_3=1.216364496\)

  6. 6

    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    1.048.29814736251.49282564353.07667368554.647937102

  7. 7

    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    2.01.3902420091.3709967581.3619211321.353193719

  8. 8

    \(x\)\(h=0.05\)\(h=0.025\)\(h=0.0125\)Exact
    1.507.8861704378.8524637939.54803990710.500000000

  9. 9

    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)\(h=0.1\)\(h=0.05\)\(h=0.025\)
    3.01.4694582411.4625144861.4592170100.32100.15370.0753
    Approximate SolutionsResiduals

  10. 10

    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)\(h=0.1\)\(h=0.05\)\(h=0.025\)
    2.00.4734567370.4832274700.487986391-0.3129-0.1563-0.0781
    Approximate SolutionsResiduals

  11. 11

    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    1.00.6910667970.6762695160.6683274710.659957689

  12. 12

    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    2.0-0.772381768-0.761510960-0.756179726-0.750912371

  13. 13
    Euler’s method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    1.00.5388711780.5930023250.6201315250.647231889

    Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    1.00.6472318890.6472318890.6472318890.647231889

    Applying variation of parameters to the given initial value problem yields

    \(y=ue^{-3x}\), where (A) \(u'=7,\quad u(0)=6\). Since \(u''=0\), Euler’s method yields the exact solution of (A). Therefore the Euler semilinear method produces the exact solution of the given problem

    .

  14. 14
    Euler’s method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    3.012.80422613513.91294466214.55962305515.282004826

    Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    3.015.35412228715.31725770515.29942942115.282004826

  15. 15
    Euler’s method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact”
    2.00.8675650040.8857192630.8950247720.904276722

    Euler semilinear method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact”
    2.00.5696707890.7208618580.8084382610.904276722

  16. 16
    Euler’s method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact”
    3.00.9220943790.9456048000.9567528680.967523153

    Euler semilinear method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact”
    3.00.9939547540.9807513070.9741403200.967523153

  17. 17
    Euler’s method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact”
    1.500.3198921310.3307971090.3370201230.343780513

    Euler semilinear method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact”
    1.500.3055969530.3233402680.3332045190.343780513

  18. 18
    Euler’s method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact”
    2.00.7545725600.7438698780.7383039140.732638628

    Euler semilinear method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact”
    2.00.7226104540.7277429660.7302202110.732638628

  19. 19
    Euler’s method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact”
    1.502.1759599702.2102595542.2272075002.244023982

    Euler semilinear method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact”
    1.502.1179533422.1798445852.2116479042.244023982

  20. 20
    Euler’s method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    1.00.0321051170.0439970450.0501593100.056415515

    Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    1.00.0560201540.0562439800.0563364910.056415515

  21. 21
    Euler’s method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    1.028.98781665638.42695751645.36726968854.729594761

    Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    1.054.70913494654.72415048554.72822801554.729594761

  22. 22
    Euler’s method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    3.01.3614279071.3613208241.3613325891.361383810

    Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact”
    3.01.2913455181.3265357371.3440041021.361383810

3.2 The Improved Euler Method and Related Methods

  1. 1

    \(y_1=1.542812500,\; y_2=2.421622101,\; y_3=4.208020541\)

  2. 2

    \(y_1=1.220207973,\; y_2=1.489578775\; y_3=1.819337186\)

  3. 3

    \(y_1=1.890687500,\; y_2=1.763784003,\; y_3=1.622698378\)

  4. 4

    \(y_1=2.961317914\)  \(y_2=2.920132727\)  \(y_3=2.876213748\).

  5. 5

    \(y_1=2.478055238,\; y_2=1.844042564,\; y_3=1.313882333\)

  6. 6
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    1.056.13448000955.00339044854.73467483654.647937102

  7. 7
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    2.01.3535018391.3532884931.3532194851.353193719

  8. 8
    \(x\)\(h=0.05\)\(h=0.025\)\(h=0.0125\)Exact
    1.5010.14196958510.39677040910.47250211110.500000000

  9. 9
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)\(h=0.1\)\(h=0.05\)\(h=0.025\)
    3.01.4556748161.4559351271.456001289-0.00818-0.00207-0.000518
    Approximate SolutionsResiduals

  10. 10
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)\(h=0.1\)\(h=0.05\)\(h=0.025\)
    2.00.4928629990.4927099310.4926748550.003350.0007770.000187
    Approximate SolutionsResiduals

  11. 11
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.00.6602681590.6600285050.6599744640.659957689

  12. 12
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    2.0-0.749751364-0.750637632-0.750845571-0.750912371

  13. 13

    Applying variation of parameters to the given initial value problem

    \(y=ue^{-3x}\), where (A) \(u'=1-2x,\quad u(0)=2\). Since \(u'''=0\), the improved Euler method yields the exact solution of (A). Therefore the improved Euler semilinear method produces the exact solution of the given problem.

    Improved Euler method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    1.00.1056604010.1009243990.0998936850.099574137

    Improved Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    1.00.0995741370.0995741370.0995741370.099574137

  14. 14
    Improved Euler method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    3.015.10760096815.23485600015.26975507215.282004826

    Improved Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    3.015.28523172615.28281242415.28220678015.282004826

  15. 15
    Improved Euler method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    2.00.9243353750.9078660810.9050582010.904276722

    Improved Euler semilinear method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    2.00.9696707890.9208618580.9084382610.904276722

  16. 16
    Improved Euler method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    3.00.9674737210.9675107900.9675200620.967523153

    Improved Euler semilinear method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    3.00.9674737210.9675107900.9675200620.967523153

  17. 17
    Improved Euler method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact"
    1.500.3491760600.3451716640.3441312820.343780513

    Improved Euler semilinear method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact"
    1.500.3493502060.3452168940.3441428320.343780513

  18. 18
    Improved Euler method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    2.00.7326792230.7327216130.7326679050.732638628

    Improved Euler semilinear method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    2.00.7321666780.7325210780.7326092670.732638628

  19. 19
    Improved Euler method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact"
    1.502.2478803152.2449751812.2442601432.244023982

    Improved Euler semilinear method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact"
    1.502.2486035852.2451697072.2443104652.244023982

  20. 20
    Improved Euler method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.00.0590718940.0569990280.0565530230.056415515

    Improved Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.00.0562959140.0563857650.0564081240.056415515

  21. 21
    Improved Euler method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.050.53455634653.48394701354.39154444054.729594761

    Improved Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.054.70904143454.72408357254.72819136654.729594761

  22. 22
    Improved Euler method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    3.01.3613953091.3613792591.3613822391.361383810

    Improved Euler semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    3.01.3756999331.3647309371.3621939971.361383810

  23. 23
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    2.01.3494890561.3523459001.3529908221.353193719

  24. 24
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    2.01.3508907361.3526675991.3530679511.353193719

  25. 25
    \(x\)\(h=0.05\)\(h=0.025\)\(h=0.0125\)Exact
    1.5010.13302131110.39165509810.47073141110.500000000

  26. 26
    \(x\)\(h=0.05\)\(h=0.025\)\(h=0.0125\)Exact
    1.5010.13632964210.39341968110.47073141110.500000000

  27. 27
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.00.6608468350.6601897490.6600169040.659957689

  28. 28
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.00.6606584110.6601366300.6600028400.659957689

  29. 29
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    2.0-0.750626284-0.750844513-0.750895864-0.751331499
  30. 30
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    2.0-0.750335016-0.750775571-0.750879100-0.751331499

3.3 The Runge-Kutta Method

  1. 1

    \(y_1=1.550598190,\; y_2=2.469649729\)

  2. 2

    \(y_1=1.221551366,\; y_2=1.492920208\)

  3. 3

    \(y_1=1.890339767,\; y_2=1.763094323\)

  4. 4

    \( y_1=2.961316248\)  \( y_2=2.920128958\).

  5. 5

    \(y_1=2.475605264,\; y_2=1.825992433\)

  6. 6
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    1.054.65450969954.64834401954.64796232854.647937102

  7. 7
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    2.01.3531917451.3531936061.3531937121.353193719

  8. 8
    \(x\)\(h=0.05\)\(h=0.025\)\(h=0.0125\)Exact
    1.5010.49865819810.49990626610.49999382010.500000000

  9. 9
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)\(h=0.1\)\(h=0.05\)\(h=0.025\)
    3.01.4560239071.4560234031.4560233790.00001240.0000006110.0000000333
    Approximate SolutionsResiduals

  10. 10
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)\(h=0.1\)\(h=0.05\)\(h=0.025\)
    2.00.4926637890.4926637380.4926637360.0000009020.00000005080.00000000302
    Approximate SolutionsResiduals

  11. 11
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.00.6599570460.6599576460.6599576860.659957689

  12. 12
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    2.0-0.750911103-0.750912294-0.750912367-0.750912371

  13. 13

    Applying variation of parameters to the given initial value problem yields

    \(y=ue^{-3x}\), where (A) \(u'=1-4x+3x^2-4x^3,\quad u(0)=-3\). Since \(u^{(5)}=0\), the Runge-Kutta method yields the exact solution of (A). Therefore the Euler semilinear method produces the exact solution of the given problem.

    Runge-Kutta method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    0.0-3.000000000-3.000000000-3.000000000-3.000000000
    0.1-2.162598011-2.162526572-2.162522707-2.162522468
    0.2-1.577172164-1.577070939-1.577065457-1.577065117
    0.3-1.163350794-1.163242678-1.163236817-1.163236453
    0.4-0.868030294-0.867927182-0.867921588-0.867921241
    0.5-0.655542739-0.655450183-0.655445157-0.655444845
    0.6-0.501535352-0.501455325-0.501450977-0.501450707
    0.7-0.389127673-0.389060213-0.389056546-0.389056318
    0.8-0.306468018-0.306412184-0.306409148-0.306408959
    0.9-0.245153433-0.245107859-0.245105379-0.245105226
    1.0-0.199187198-0.199150401-0.199148398-0.199148273

    Runge-Kutta semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)Exact
    0.0-3.000000000-3.000000000-3.000000000-3.000000000
    0.1-2.162522468-2.162522468-2.162522468-2.162522468
    0.2-1.577065117-1.577065117-1.577065117-1.577065117
    0.3-1.163236453-1.163236453-1.163236453-1.163236453
    0.4-0.867921241-0.867921241-0.867921241-0.867921241
    0.5-0.655444845-0.655444845-0.655444845-0.655444845
    0.6-0.501450707-0.501450707-0.501450707-0.501450707
    0.7-0.389056318-0.389056318-0.389056318-0.389056318
    0.8-0.306408959-0.306408959-0.306408959-0.306408959
    0.9-0.245105226-0.245105226-0.245105226-0.245105226
    1.0-0.199148273-0.199148273-0.199148273-0.199148273

  14. 14
    Runge-Kutta method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    3.015.28166003615.28198140715.28200330015.282004826

    Runge-Kutta semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    3.015.28200599015.28200489915.28200483115.282004826

  15. 15
    Runge-Kutta method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    2.00.9046781560.9042957720.9042777590.904276722

    Runge-Kutta semilinear method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    2.00.9045922150.9042970620.9042780040.904276722

  16. 16
    Runge-Kutta method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    3.00.9675231470.9675231520.9675231530.967523153

    Runge-Kutta semilinear method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    3.00.9675231470.9675231520.9675231530.967523153

  17. 17
    Runge-Kutta method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact"
    1.500.3438391580.3437848140.3437807960.343780513

    Runge-Kutta semilinear method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact"
    1.000.0000000000.0000000000.0000000000.000000000
    1.050.0281210220.0281210100.0281210100.028121010
    1.100.0553934940.0553934660.0553934650.055393464
    1.150.0821640480.0821639940.0821639900.082163990
    1.200.1088626980.1088625970.1088625910.108862590
    1.250.1360587150.1360585280.1360585170.136058516
    1.300.1645648620.1645644960.1645644730.164564471
    1.350.1956510740.1956502710.1956502190.195650216
    1.400.2315422880.2315401640.2315400270.231540017
    1.450.2768187750.2768110110.2768104910.276810456
    1.500.3438391240.3437848110.3437807960.343780513

  18. 18
    Runge-Kutta method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    2.00.7326332290.7326383180.7326386090.732638628

    Runge-Kutta semilinear method
    \(x\)\(h=0.2\)\(h=0.1\)\(h=0.05\)“Exact"
    2.00.7326392120.7326386630.7326386300.732638628

  19. 19
    Runge-Kutta method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact"
    1.502.2440256832.2440240882.2440239892.244023982

    Runge-Kutta semilinear method
    \(x\)\(h=0.0500\)\(h=0.0250\)\(h=0.0125\)“Exact"
    1.502.2440250812.2440240512.2440239872.244023982

  20. 20
    Runge-Kutta method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.00.0564268860.0564161370.0564155520.056415515

    Runge-Kutta semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.00.0564151850.0564154950.0564155140.056415515

  21. 21
    Runge-Kutta method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.054.69590118654.72711185854.72942625054.729594761

    Runge-Kutta semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    1.054.72909996654.72956172054.72959265854.729594761

  22. 22
    Runge-Kutta method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    3.01.3613840821.3613838121.3613838091.361383810

    Runge-Kutta semilinear method
    \(x\)\(h=0.1\)\(h=0.05\)\(h=0.025\)“Exact"
    3.01.3614565021.3613881961.3613840791.361383810

  23. 24
    \(x\)\(h=.1\)\(h=.05\)\(h=.025\)Exact
    2.00-1.000000000-1.000000000-1.000000000-1.000000000

  24. 25
    \(x\)\(h=.1\)\(h=.05\)\(h=.025\)“Exact"
    1.001.0000000001.0000000001.0000000001.000000000

  25. 26
    \(x\)\(h=.1\)\(h=.05\)\(h=.025\)Exact
    1.504.1421712794.1421705534.1421705084.142170505

  26. 27
    \(x\)\(h=.1\)\(h=.05\)\(h=.025\)Exact
    3.016.66666698816.66666668716.66666666816.666666667