128ahw10sum10

# 128ahw10sum10 - MATH 128A SUMMER 2010 HOMEWORK 10 SOLUTION...

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

MATH 128A, SUMMER 2010, HOMEWORK 10 SOLUTION BENJAMIN JOHNSON Homework 10: Due Wednesday, July 28 5.6; 1c, 14 5.7; 3a 5.8; 3a section 5.6 1. Use all the Adams-Bashforth methods to approximate the solutions to the following initial- value problems. In each case use exact starting values, and compare the results to the actual values. c. y 0 = 1 + y/t , 1 t 2, y (1) = 2, with h = 0 . 2; actual solution y ( t ) = t ln t + 2 t . Solution: There are four methods to perform here, 2-step, 3-step, 4-step, and 5-step, and in each case, we need to specify w 0 ,w 1 ,w 2 ,w 3 ,w 4 , and w 5 . For the 2-step method, we have w 0 = y (1) = 2 ,w 1 = y (1 . 2) = 1 . 2 ln(1 . 2)+2 . 4 2 . 61879; and we use the 2-step recursive formula w i +1 = w i + h 2 [3 f ( t i ,w i ) - f ( t i - 1 ,w i - 1 )] to compute w 2 ,w 3 ,w 4 , and w 5 . For the 3-step method, we have w 0 = y (1) = 2 ,w 1 = 2 . 61879, and w 2 = y (1 . 4) = 1 . 4 ln(1 . 4) + 2 . 8 3 . 27106; and we use the 3-step recursive formula w i +1 = w i + h 12 [23 f ( t i ,w i ) - 16 f ( t i - 1 ,w i - 1 ) + 5 f ( t i - 2 ,w i - 2 )] to compute w 3 ,w 4 , and w 5 . For the 4-step method, we have w 0 = 2 ,,w 1 = 2 . 61879 ,w 2 = 3 . 27106, and w 3 = y (1 . 6) = 1 . 6 ln(1 . 6) + 3 . 2 3 . 95201; and we use the 4-step recursive formula w i +1 = w i + h 24 [55 f ( t i ,w i ) - 59 f ( t i - 1 ,w i - 1 )+37 f ( t i - 2 ,w i - 2 ) - 9 f ( t i - 3 ,w i - 3 )] to compute w 4 and w 5 . For the 5-step method, we have w 0 = 2 ,w 1 = 2 . 61879 ,w 2 = 3 . 27106 ,w 3 = 3 . 95201, and w 4 = y (1 . 8) 4 . 65802; and we use the 5-step recursive formula w i +1 = w i + h 720 [1901 f ( t i ,w i ) - 2774 f ( t i - 1 ,w i - 1 )+2616 f ( t i - 2 ,w i - 2 ) - 1274 f ( t i - 3 ,w i - 3 )+251 f ( t i - 4 ,w i - 4 )] to compute w 5 . The following table records all the approximations and actual solutions. w 0 w 1 w 2 w 3 w 4 w 5 2-step 2 2.61879 3.27348 3.95671 4.66477 5.39494 3-step 2 2.61879 3.27106 3.95142 4.65692 5.38481 4-step 2 2.61879 3.27106 3.95201 4.65821 5.38665 5-step 2 2.61879 3.27106 3.95201 4.65802 5.38622 actual y ( t i ) 2 2.61879 3.27106 3.95201 4.65802 5.38629 For reference, the following is the transcript of the Mathematica session I used to compute these: Date : July 28, 2010. 1

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

View Full Document
2 BENJAMIN JOHNSON In[191]:= y[t_] = t*Log[t] + 2 t Out[191]= 2 t + t Log[t] In[193]:= y[1.2] Out[193]= 2.61879 In[194]:= y[1.4] Out[194]= 3.27106 In[195]:= y[1.6] Out[195]= 3.95201 In[196]:= y[1.8] Out[196]= 4.65802 In[198]:= y[2.0] Out[198]= 5.38629 In[199]:= f[t_, w_] = 1 + w/t Out[199]= 1 + w/t In[200]:= h := 0.2 In[208]:= AB2[ti_, wi_, ti1_, wi1_] = wi + h/2 (3 f[ti, wi] - f[ti1, wi1]) Out[208]= wi + 0.1 (-1 + 3 (1 + wi/ti) - wi1/ti1) In[209]:= AB2[1.2, y[1.2], 1, 2] Out[209]= 3.27348 In[210]:= AB2[1.4, %, 1.2, y[1.2]]
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

128ahw10sum10 - MATH 128A SUMMER 2010 HOMEWORK 10 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