{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Tema25 - CHAPTER 25 25.1 The analytical solution can be...

This preview shows pages 1–8. Sign up to view the full content.

CHAPTER 25 25.1 The analytical solution can be derived by separation of variables dy y x dx = - 2 12 . ln . y x x C = - + 3 3 12 Substituting the initial conditions yields C = 0. Taking the exponential give the final result y e x x = - 3 3 1.2 The result can be plotted as 0 1 2 0 1 2 25.2 Euler’s method with h = 0.5 x y dy / dx 0 1 -1.2 0.5 0.4 -0.38 1 0.21 -0.042 1.5 0.189 0.19845 2 0.288225 0.80703 Euler’s method with h = 0.25 gives x y dy / dx 0 1 -1.2 0.25 0.7 -0.79625 0.5 0.500938 -0.47589 0.75 0.381965 -0.2435 1 0.321089 -0.06422 1.25 0.305035 0.110575 1.5 0.332679 0.349312 1.75 0.420007 0.782262 2 0.615572 1.723602 The results can be plotted along with the analytical solution as

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
0 1 2 0 1 2 25.3 For Heun’s method, the value of the slope at x = 0 can be computed as - 0.6 which can be used to compute the value of y at the end of the interval as y ( . ) ( . ( )) . . 0 5 1 0 12 1 0 5 0 4 = + - = The slope at the end of the interval can be computed as y ' ( . ) . ( . ) . ( . ) . 0 5 0 4 0 5 12 0 4 0 38 2 = - = - which can be averaged with the initial slope to predict y ( . ) . . . . 0 5 1 0 6 0 38 2 0 5 0 605 = + - - = This formula can then be iterated to yield j y i j ε a 0 0.4 1 0.605 33.9 2 0.5563124 8.75 3 0.5678757 2.036 4 0.5651295 0.4859 The remaining steps can be implemented with the result x i y i 0.5 0.5651295 1.0 0.4104059 1.5 0.5279021 2.0 2.181574 The results along with the analytical solution are displayed below:
0 1 2 0 1 2 25.4 The midpoint method with h = 0.5 x y dy / dx ym dy / dx-mid 0 1 -1.2 0.7 -0.79625 0.5 0.601875 -0.57178 0.45893 -0.29257 1 0.455591 -0.09112 0.432812 0.156894 1.5 0.534038 0.56074 0.674223 1.255741 2 1.161909 3.253344 1.975245 7.629383 with h = 0.25 gives x y dy / dx ym dy / dx-mid 0 1 -1.2 0.85 -1.00672 0.25 0.74832 -0.85121 0.641919 -0.68003 0.5 0.578312 -0.5494 0.509638 -0.41249 0.75 0.47519 -0.30293 0.437323 -0.18996 1 0.4277 -0.08554 0.417007 0.027366 1.25 0.434541 0.157521 0.454231 0.313703 1.5 0.512967 0.538615 0.580294 0.835986 1.75 0.721963 1.344657 0.890046 2.061012 2 1.237216 3.464206 1.670242 5.537897 The results can be plotted along with the analytical solution as 0 1 2 0 1 2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
25.5 The 4 th -order RK method with h = 0.5 gives x y k1 ym k2 ym k3 ye k4 phi 0 1 -1.2 0.7 -0.79625 0.800938 -0.91107 0.544467 -0.51724 -0.85531 0.5 0.572344 -0.54373 0.436412 -0.27821 0.50279 -0.32053 0.412079 -0.08242 -0.30394 1 0.420375 -0.08407 0.399356 0.144767 0.456567 0.165505 0.503128 0.528284 0.177459 1.5 0.509104 0.534559 0.642744 1.197111 0.808382 1.505611 1.26191 3.533348 1.578892 2 1.29855 3.635941 2.207535 8.526606 3.430202 13.24915 7.923127 40.01179 14.53321 0 1 2 0 1 2 25.6 ( a ) The analytical solution can be derived by separation of variables dy y x dx = + 1 2 2 2 y x x C = + + Substituting the initial conditions yields C = 2. Substituting this value and solving for y gives the final result y x x = + + ( ) 2 2 2 4 16 The result can be plotted as 0 2 4 0 0.5 1 ( b ) Euler’s method with h = 0.5 x y dy / dx
0 1 1 0.5 1.5 1.837117 1 2.418559 3.110343 Euler’s method with h = 0.25 gives x y dy / dx 0 1 1 0.25 1.25 1.397542 0.5 1.599386 1.897002 0.75 2.073636 2.520022 1 2.703642 3.288551 The results can be plotted along with the analytical solution as 0 2 4 0 0.5 1 ( c ) For Heun’s method, the first step along with the associated iterations is j y i j ε a 0 1.500000 1 1.709279 12.243720 2 1.740273 1.780954 3 1.744698 2.536284E-01 The remaining steps can be implemented with the result x i y i 0.00E+00 1 5.00E-01 1.744698 1 3.122586 The results along with the analytical solution are displayed below:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
0 2 4 0.0 0.5 1.0 ( d ) The midpoint method with h = 0.5 x y dy / dx ym dy / dx-mid 0 1 1 1.25 1.397542 0.5 1.698771 1.955054 2.187535 2.588305 1 2.992924 3.460014 3.857927 4.419362 with h = 0.25 gives x y dy / dx ym dy / dx-mid 0 1 1 1.125 1.193243 0.25 1.298311 1.424293 1.476347 1.670694 0.5 1.715984 1.964934 1.961601 2.275929 0.75 2.284966 2.645318 2.615631 3.032421 1 3.043072 3.48888 3.479182 3.96367 The results can be plotted along with the analytical solution as 0 2 4 0 0.5 1 ( e ) The 4 th -order RK method with h = 0.5 gives x y k1 ym k2 ym k3 ye k4 phi 0 1 1 1.25 1.397542 1.349386 1.452038 1.726019 1.970671 1.444972 0.5 1.722486 1.968653 2.214649 2.604297 2.37356 2.696114 3.070543 3.504593 2.679011 1 3.061992 3.499709 3.936919 4.464376 4.178086 4.599082 5.361533 5.788746 4.569229
0 2 4 0 0.5 1 25.7 The second-order ODE is transformed into a pair of first-order ODEs as in dy dx z y = dz dx x y z = = = - ( ) ( ) 0 2 0 0 ( a ) The first few steps of Euler’s method are x y z dy / dx dz / dx 0 2 0 0 -2 0.1 2 -0.2 -0.2 -1.9 0.2 1.98 -0.39 -0.39 -1.78 0.3 1.941 -0.568 -0.568 -1.641 0.4 1.8842 -0.7321 -0.7321 -1.4842 0.5 1.81099 -0.88052 -0.88052 -1.31099 ( b ) For Heun (without iterating the corrector) the first few steps are x y z dy/dx dz/dx yend zend dy/dx dz/dx ave slope 0 2 0 0 -2 2 -0.2 -0.2 -1.9 -0.1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 20

Tema25 - CHAPTER 25 25.1 The analytical solution can be...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online