You are on page 1of 12

Non-linear case: Radiating fin

0.99

0.98

0.97

0.96

0.95
y
0.94

0.93

0.92

0.91

0.9
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

x
Solve the second order differential equation y"-0.2(y4-0.2)=0 with
y(0)=1 and y'(1)=0.
We make use of the shooting method with the secant method.

x k1 k2 k3 k4 l1 l2 l3 l4
0
0.1 0.016 0.015486 0.015517 0.015041 -0.012984 -0.012184 -0.01221 -0.011432
0.2 0.015042 0.014605 0.014633 0.01423 -0.011433 -0.010681 -0.010703 -0.00997
0.3 0.01423 0.013861 0.013887 0.013548 -0.009971 -0.009259 -0.009278 -0.008582
0.4 0.013548 0.013239 0.013263 0.012981 -0.008583 -0.007905 -0.007921 -0.007257
0.5 0.012981 0.012726 0.012749 0.012517 -0.007257 -0.006608 -0.006621 -0.005982
0.6 0.012518 0.012311 0.012333 0.012149 -0.005983 -0.005357 -0.005368 -0.00475
0.7 0.012149 0.011988 0.012008 0.011868 -0.004751 -0.004143 -0.004151 -0.00355
0.8 0.011868 0.011749 0.011769 0.01167 -0.00355 -0.002957 -0.002963 -0.002374
0.9 0.01167 0.011591 0.011611 0.011551 -0.002374 -0.001791 -0.001795 -0.001213
1 0.011551 0.011511 0.01153 0.011509 -0.001214 -0.000636 -0.000638 -6.08E-05

x k1 k2 k3 k4 l1 l2 l3 l4
0
0.1 0.016 0.015486 0.015517 0.015041 -0.012984 -0.012184 -0.01221 -0.011432
0.2 0.015042 0.014605 0.014633 0.01423 -0.011433 -0.010681 -0.010703 -0.00997
0.3 0.01423 0.013861 0.013887 0.013548 -0.009971 -0.009259 -0.009278 -0.008582
0.4 0.013548 0.013239 0.013263 0.012981 -0.008583 -0.007905 -0.007921 -0.007257
0.5 0.012981 0.012726 0.012749 0.012517 -0.007257 -0.006608 -0.006621 -0.005982
0.6 0.012518 0.012311 0.012333 0.012149 -0.005983 -0.005357 -0.005368 -0.00475
0.7 0.012149 0.011988 0.012008 0.011868 -0.004751 -0.004143 -0.004151 -0.00355
0.8 0.011868 0.011749 0.011769 0.01167 -0.00355 -0.002957 -0.002963 -0.002374
0.9 0.01167 0.011591 0.011611 0.011551 -0.002374 -0.001791 -0.001795 -0.001213
1 0.011551 0.011511 0.01153 0.011509 -0.001214 -0.000636 -0.000638 -6.08E-05

Secant method:
slope: #DIV/0!
y z
1.0000 -0.1298
0.9878 -0.1143
0.9771 -0.0997
0.9678 -0.0858
0.9599 -0.0726
0.9533 -0.0598
0.9479 -0.0475
0.9438 -0.0355
0.9408 -0.0237
0.9390 -0.0121
0.9384 -0.0006

y z
1.0000 -0.1298
0.9878 -0.1143
0.9771 -0.0997
0.9678 -0.0858
0.9599 -0.0726
0.9533 -0.0598
0.9479 -0.0475
0.9438 -0.0355
0.9408 -0.0237
0.9390 -0.0121
0.9384 -0.0006
Shooting method explained
Column J Column J Column J
1.6
1.4
1.2
1
0.8
y 0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
-0.2
-0.4

x
2
d y
We shall solve the equation −3y=0 with the boundary conditions
dx 2
y ( 0 )=1, y=0 . 5 at x= 1 by the shooting method. The first order equations
that are involved are solved by the Fourth order RK method.

The equation is solved twice by assuming initial slopes and combining


these two solutions to get the correct solution that satisfies the boundary
xi+1 = xi + 0.1 Let y' = z RK Algorithm is given at the left.
k1 = h f(xi,yi,zi) l1 = h zi The two solutions start with the same function
k2 = h f(xi+h/2, yi+l1/2, zi+k1/2)l2 = h (zi + k1/2) value but with different initial slopes.
k3 = h f(xi+h/2, yi+l2/2, zi+k2/2)l3 = h (zi + k2/2)
k4 = h f(xi+h, yi+l3, zi+k3) l4 = h (zi + k3)

x k1 k2 k3 k4 l1 l2 l3 l4 y y'
0 0.3 0.285 0.28725 0.274275 -0.1 -0.085 -0.08575 -0.071275 1 -1
0.1 0.274361 0.263658 0.265716 0.25691 -0.07135375 -0.057636 -0.058171 -0.044782 0.914538 -0.7135375
0.2 0.256974 0.250246 0.252173 0.247271 -0.0448534264 -0.032005 -0.032341 -0.019636 0.856579 -0.4485342639
0.3 0.247315 0.244359 0.246214 0.24507 -0.0197020427 -0.007336 -0.007484 0.004919 0.824382 -0.1970204272
0.4 0.245094 0.245822 0.24766 0.250238 0.00485681889 0.017111 0.017148 0.029623 0.816979 0.04856818895
0.5 0.250243 0.254678 0.256555 0.262932 0.02956175676 0.042074 0.042296 0.055217 0.834145 0.29561756756
0.6 0.262919 0.271193 0.273165 0.283534 0.05515576262 0.068302 0.068715 0.082472 0.876398 0.55155762624
0.7 0.283503 0.295864 0.29799 0.312663 0.08240856692 0.096584 0.097202 0.112208 0.945008 0.82408566925
0.8 0.312612 0.329433 0.331777 0.351195 0.11213978812 0.12777 0.128611 0.145318 1.04204 1.12139788115
0.9 0.351123 0.372909 0.375543 0.40029 0.14524358241 0.1628 0.163889 0.182798 1.17041 1.45243582414
1 0.400194 0.427601 0.430603 0.461423 0.18271553524 0.202725 0.204096 0.225776 1.33398 1.82715535244
x k1 k2 k3 k4 l1 l2 l3 l4 y y'
0 0.3 0.27 0.27225 0.24405 -0.2 -0.185 -0.1865 -0.172775 1 -2
0.1 0.244211 0.218283 0.220114 0.195628 -0.1728575 -0.160647 -0.161943 -0.150846 0.814038 -1.728575
0.2 0.195767 0.17313 0.174598 0.15309 -0.150913614 -0.141125 -0.142257 -0.133454 0.652557 -1.5091361403
0.3 0.15321 0.133184 0.134333 0.115156 -0.1335083899 -0.125848 -0.126849 -0.120075 0.510701 -1.3350838994
0.4 0.115262 0.097244 0.098108 0.080685 -0.1201183739 -0.114355 -0.115256 -0.110308 0.384205 -1.2011837387
0.5 0.080779 0.064228 0.064834 0.04864 -0.1103408676 -0.106302 -0.107129 -0.103857 0.269264 -1.1034086764
0.6 0.048726 0.033144 0.033509 0.018059 -0.1038818178 -0.101446 -0.102225 -0.100531 0.16242 -1.038818178
0.7 0.018138 0.003056 0.003192 -0.01198 -0.1005469721 -0.09964 -0.100394 -0.100228 0.060461 -1.0054697209
0.8 -0.011904 -0.026939 -0.027028 -0.042379 -0.1002360375 -0.100831 -0.101583 -0.102939 -0.039679 -1.0023603746
0.9 -0.042304 -0.057745 -0.058062 -0.074052 -0.1029396638 -0.105055 -0.105827 -0.108746 -0.141013 -1.0293966381
1 -0.073976 -0.090287 -0.090842 -0.107952 -0.1087391628 -0.112438 -0.113254 -0.117823 -0.246588 -1.0873916283

The desired beginning slope is now calculated:


alpha 0.472354
correct slope at x=0 is -1.527646
x k1 k2 k3 k4 l1 l2 l3 l4 y y'
0 0.3 0.277085 0.279335 0.258327 -0.152764565 -0.137765 -0.13891 -0.124831 1 -1.5276456499
0.1 0.258453 0.239716 0.241654 0.224575 -0.1249117621 -0.111989 -0.112926 -0.100746 0.861509 -1.2491176213
0.2 0.224678 0.209556 0.211241 0.197577 -0.100815623 -0.089582 -0.090338 -0.079692 0.748928 -1.0081562302
0.3 0.197661 0.185698 0.187181 0.176521 -0.0797514668 -0.069868 -0.070467 -0.061033 0.65887 -0.7975146676
0.4 0.176588 0.167425 0.16875 0.160774 -0.0610857979 -0.052256 -0.052715 -0.044211 0.588628 -0.6108579791
0.5 0.160826 0.154188 0.155394 0.149862 -0.0442572544 -0.036216 -0.036548 -0.028718 0.536088 -0.4425725441
0.6 0.149901 0.145587 0.146712 0.143457 -0.0287597248 -0.021265 -0.02148 -0.014089 0.499671 -0.2875972485
0.7 0.143484 0.141365 0.142441 0.141367 -0.0141271274 -0.006953 -0.007059 0.000117 0.478281 -0.1412712735
0.8 0.141383 0.141395 0.142455 0.143528 8.0607616E-05 0.00715 0.00715 0.014326 0.471275 0.00080607616
0.9 0.143533 0.145677 0.146753 0.150005 0.01429077217 0.021467 0.021575 0.028966 0.478443 0.14290772174
1 0.15 0.15434 0.155465 0.160994 0.02893073168 0.036431 0.036648 0.044477 0.5 0.28930731676
Shooting method explained
Column J Column J Column J
1.6
1.4
1.2
1
0.8
y 0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1
-0.2
-0.4

x
2
d y
We shall solve the equation −3y=0 with the boundary conditions
dx 2
dy
y ( 0 )=1, =0 at x= 1 by the shooting method. The first order equations
dx
that are involved are solved by the Fourth order RK method.

The equation is solved twice by assuming initial slopes and combining


xi+1 = xi + 0.1
these two solutions to get the correct solution that satisfies the boundary
Let y' = z RK Algorithm is given at the left.
k1 = h f(xi,yi,zi) l1 = h zi The two solutions start with the same function
k2 = h f(xi+h/2, yi+l1/2, zi+k1/2)l2 = h (zi + k1/2) value but with different initial slopes.
k3 = h f(xi+h/2, yi+l2/2, zi+k2/2)l3 = h (zi + k2/2)
k4 = h f(xi+h, yi+l3, zi+k3) l4 = h (zi + k3)

x k1 k2 k3 k4 l1 l2 l3 l4 y y'
0 0.3 0.285 0.28725 0.274275 -0.1 -0.085 -0.08575 -0.071275 1 -1
0.1 0.274361 0.263658 0.265716 0.25691 -0.07135375 -0.057636 -0.058171 -0.044782 0.914538 -0.7135375
0.2 0.256974 0.250246 0.252173 0.247271 -0.0448534264 -0.032005 -0.032341 -0.019636 0.856579 -0.4485342639
0.3 0.247315 0.244359 0.246214 0.24507 -0.0197020427 -0.007336 -0.007484 0.004919 0.824382 -0.1970204272
0.4 0.245094 0.245822 0.24766 0.250238 0.00485681889 0.017111 0.017148 0.029623 0.816979 0.04856818895
0.5 0.250243 0.254678 0.256555 0.262932 0.02956175676 0.042074 0.042296 0.055217 0.834145 0.29561756756
0.6 0.262919 0.271193 0.273165 0.283534 0.05515576262 0.068302 0.068715 0.082472 0.876398 0.55155762624
0.7 0.283503 0.295864 0.29799 0.312663 0.08240856692 0.096584 0.097202 0.112208 0.945008 0.82408566925
0.8 0.312612 0.329433 0.331777 0.351195 0.11213978812 0.12777 0.128611 0.145318 1.04204 1.12139788115
0.9 0.351123 0.372909 0.375543 0.40029 0.14524358241 0.1628 0.163889 0.182798 1.17041 1.45243582414
1 0.400194 0.427601 0.430603 0.461423 0.18271553524 0.202725 0.204096 0.225776 1.33398 1.82715535244
x k1 k2 k3 k4 l1 l2 l3 l4 y y'
0 0.3 0.27 0.27225 0.24405 -0.2 -0.185 -0.1865 -0.172775 1 -2
0.1 0.244211 0.218283 0.220114 0.195628 -0.1728575 -0.160647 -0.161943 -0.150846 0.814038 -1.728575
0.2 0.195767 0.17313 0.174598 0.15309 -0.150913614 -0.141125 -0.142257 -0.133454 0.652557 -1.5091361403
0.3 0.15321 0.133184 0.134333 0.115156 -0.1335083899 -0.125848 -0.126849 -0.120075 0.510701 -1.3350838994
0.4 0.115262 0.097244 0.098108 0.080685 -0.1201183739 -0.114355 -0.115256 -0.110308 0.384205 -1.2011837387
0.5 0.080779 0.064228 0.064834 0.04864 -0.1103408676 -0.106302 -0.107129 -0.103857 0.269264 -1.1034086764
0.6 0.048726 0.033144 0.033509 0.018059 -0.1038818178 -0.101446 -0.102225 -0.100531 0.16242 -1.038818178
0.7 0.018138 0.003056 0.003192 -0.01198 -0.1005469721 -0.09964 -0.100394 -0.100228 0.060461 -1.0054697209
0.8 -0.011904 -0.026939 -0.027028 -0.042379 -0.1002360375 -0.100831 -0.101583 -0.102939 -0.039679 -1.0023603746
0.9 -0.042304 -0.057745 -0.058062 -0.074052 -0.1029396638 -0.105055 -0.105827 -0.108746 -0.141013 -1.0293966381
1 -0.073976 -0.090287 -0.090842 -0.107952 -0.1087391628 -0.112438 -0.113254 -0.117823 -0.246588 -1.0873916283

The desired beginning slope is now calculated:


alpha 0.373091
correct slope at x=0 is -1.626909
x k1 k2 k3 k4 l1 l2 l3 l4 y y'
0 0.3 0.275596 0.277846 0.255327 -0.1626908869 -0.147691 -0.148911 -0.134906 1 -1.6269088694
0.1 0.25546 0.235212 0.237128 0.218492 -0.1349873512 -0.122214 -0.123227 -0.111275 0.851533 -1.3498735115
0.2 0.218603 0.201901 0.203541 0.188228 -0.1113434987 -0.100413 -0.101248 -0.090989 0.728676 -1.1134349871
0.3 0.18832 0.174663 0.176075 0.163625 -0.0910482512 -0.081632 -0.082315 -0.073441 0.627733 -0.9104825118
0.4 0.163701 0.152677 0.153905 0.143944 -0.0734912379 -0.065306 -0.065857 -0.058101 0.545669 -0.734912379
0.5 0.144005 0.135283 0.136363 0.128591 -0.0581444393 -0.050944 -0.05138 -0.044508 0.480016 -0.5814443933
0.6 0.12864 0.121958 0.122923 0.117105 -0.0445463071 -0.038114 -0.038448 -0.032254 0.428799 -0.4454630711
0.7 0.117143 0.1123 0.113179 0.109142 -0.0322878832 -0.026431 -0.026673 -0.02097 0.390478 -0.3228788318
0.8 0.10917 0.10602 0.106839 0.10446 -0.0210005006 -0.015542 -0.015699 -0.010317 0.3639 -0.2100050058
0.9 0.10448 0.102928 0.103712 0.102921 -0.0103446959 -0.005121 -0.005198 2.651E-05 0.348267 -0.1034469588
1 0.102932 0.102932 0.103704 0.104476 9.5756736E-17 0.005147 0.005147 0.01037 0.343108 9.5756736E-16
Nonlinear BVP by Secant Method
1.00

0.98

0.96

0.94

y
0.92

0.90

0.88

0.86
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

x
Solve the second order differential equation y"-0.2y2=0 with
y(0)=1 and y'(1)=0.
We make use of the shooting method with the secant method.

x k1 k2 k3 k4 l1 l2 l3 l4
0
0.1 0.02 0.019647 0.019667 0.019335 -0.01774 -0.01674 -0.016757 -0.015773
0.2 0.019336 0.019027 0.019045 0.018757 -0.015774 -0.014807 -0.014822 -0.013869
0.3 0.018757 0.01849 0.018508 0.018259 -0.01387 -0.012932 -0.012945 -0.012019
0.4 0.018259 0.01803 0.018048 0.017837 -0.01202 -0.011107 -0.011118 -0.010215
0.5 0.017837 0.017645 0.017661 0.017486 -0.010215 -0.009324 -0.009333 -0.008449
0.6 0.017486 0.017329 0.017345 0.017204 -0.00845 -0.007576 -0.007583 -0.006715
0.7 0.017204 0.01708 0.017095 0.016987 -0.006716 -0.005856 -0.005862 -0.005006
0.8 0.016987 0.016895 0.016911 0.016834 -0.005007 -0.004158 -0.004162 -0.003316
0.9 0.016834 0.016773 0.016789 0.016743 -0.003316 -0.002475 -0.002478 -0.001637
1 0.016743 0.016713 0.016729 0.016714 -0.001638 -0.000801 -0.000802 3.49E-05

x k1 k2 k3 k4 l1 l2 l3 l4
0
0.1 0.02 0.019647 0.019667 0.019335 -0.01774 -0.01674 -0.016757 -0.015773
0.2 0.019336 0.019027 0.019045 0.018757 -0.015774 -0.014807 -0.014822 -0.013869
0.3 0.018757 0.01849 0.018508 0.018259 -0.01387 -0.012932 -0.012945 -0.012019
0.4 0.018259 0.01803 0.018048 0.017837 -0.01202 -0.011107 -0.011118 -0.010215
0.5 0.017837 0.017645 0.017661 0.017486 -0.010215 -0.009324 -0.009333 -0.008449
0.6 0.017486 0.017329 0.017345 0.017204 -0.00845 -0.007576 -0.007583 -0.006715
0.7 0.017204 0.01708 0.017095 0.016987 -0.006716 -0.005856 -0.005862 -0.005006
0.8 0.016987 0.016895 0.016911 0.016834 -0.005007 -0.004158 -0.004162 -0.003316
0.9 0.016834 0.016773 0.016789 0.016743 -0.003316 -0.002475 -0.002478 -0.001637
1 0.016743 0.016713 0.016729 0.016714 -0.001638 -0.000801 -0.000802 3.49E-05

Secant method:
slope: #DIV/0!
y z
1.0000 -0.1774
0.9832 -0.1577
0.9684 -0.1387
0.9555 -0.1202
0.9444 -0.1022
0.9350 -0.0845
0.9275 -0.0672
0.9216 -0.0501
0.9174 -0.0332
0.9150 -0.0164
0.9142 0.0003

y z
1.0000 -0.1774
0.9832 -0.1577
0.9684 -0.1387
0.9555 -0.1202
0.9444 -0.1022
0.9350 -0.0845
0.9275 -0.0672
0.9216 -0.0501
0.9174 -0.0332
0.9150 -0.0164
0.9142 0.0003

You might also like