Solution-HW6

# Solution-HW6 - HW#6 Solution 25.1 The analytical solution...

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

HW#6 Solution 25.1 The analytical solution can be derived by separation of variables dy y xd x ∫∫ =− 2 12 . ln . y x xC + 3 3 Substituting the initial conditions yields C = 0. Taking the exponential give the final result ye x x = 3 3 1.2 The result can be plotted as 0 1 2 012 25.2 Euler’s method with h = 0.5 x y dy / dx 01- 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 01 - 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

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

View Full Document
The results can be plotted along with the analytical solution as 0 1 2 012 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 (.) ( .() ). . 05 1 0 12 1 05 04 =+ − = The slope at the end of the interval can be computed as y '(.) .(.) . 04 05 12 04 038 2 =− = which can be averaged with the initial slope to predict y .. 1 06 038 2 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:
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/20/2011 for the course ENG 115 taught by Professor Rocke during the Spring '10 term at UC Davis.

### Page1 / 5

Solution-HW6 - HW#6 Solution 25.1 The analytical solution...

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

View Full Document
Ask a homework question - tutors are online