
Concept explainers
Solve the following initial-value problem from t=4 to 5:
dydt=−2yt
Use a step size of 0.5 and initial values of y(2.5)=0.48,y(3)=0.333333, y(3.5)=0.244898, and y(4)=0.1875. Obtain your solutions using the following techniques: (a) the non-self-starting Heun method (εS=1%), and (b) the fourth-order Adams method (εS=0.01%). [Note: The exact answers obtained analytically are y(4.5)=0.148148 and y(5)=0.12.] Compute the true percent relative errors εt for your results.
(a)

To calculate: The solution of differential equation, dydt=−2yt from t=4tot=5 using the non-self-starting Heun method with step size of 0.5 and initial values y(2.5)=0.48,y(3)=0.333333,y(3.5)=0.244898andy(4)=0.1875. Also, εs=1%. Compute the true percent relative as well.
Answer to Problem 6P
Solution:
First step:
The true error is εt=0.3028%.
Corrector yields:
jyjj+1εa10.14726832.63%20.14769940.292%
Second step:
The true error is εt=0.39%.
Corrector yields:
jyjj+1εa10.119531930.236%
Explanation of Solution
Given Information:
Differential equation, dydt=−2yt, t=4tot=5 with step size of 0.5 and initial values y(2.5)=0.48,y(3)=0.333333,y(3.5)=0.244898andy(4)=0.1875. Also, εs=1%.
Formula used:
(1) Predictor for non-self-starting Heun method is given by,
y0i+1=ymi−1+f(ti,ymi)2h
(2) Corrector for non-self-starting Heun method is given by,
yji+1=ymi+f(ti,ymi)+f(ti+1,yj−1i+1)2h
(3) Predictor modifier is given by:
y0i+1=y0i+1,u+45(ymi,u−y0i,u)
where, the subscript u designates that the variable is unmodified.
Calculation:
Consider the given differential equation, dydt=−2yt. Here, f(t,y)=−2yt.
Predictor for non-self-starting Heun method is given by,
y0i+1=ymi−1+f(ti,ymi)2h.. .. .. (1)
For the given differential equation, it can be written as
y0i+1=ymi−1+(−2yimti)2h
Substitute, i=0,m=0andh=0.5 in above equation,
y01=y0−1+(−2y00t0)2(0.5)=y0−1+(−2y00t0)
The provided initials conditions are y(2.5)=0.48,y(3)=0.333333,y(3.5)=0.244898andy(4)=0.1875.
Now, substitute y0−1=0.244898 , y00=0.1875 and t0=4.
Thus,
y01=0.244898+(−2×0.18754)=0.151148
Corrector for non-self-starting Heun method is given by,
yji+1=ymi+f(ti,ymi)+f(ti+1,yj−1i+1)2h
For the given differential equation, it can be written as,
yji+1=ymi+[(−2yimti)+(−2yi+1j−1ti+1)2]h
Substitute i=0,m=0 and j=1 in above equation,
y11=y00+[(−2y00t0)+(−2y10t1)2]h
Put y00=0.1875,y01=0.151148,t0=4,t1=4.5 and h=0.5
y11=0.1875+[(−2×0.18754)+(−2×0.1511484.5)2]0.5=0.147268277
Similarly, for i=0 and j=2 corrector gives y21=0.1476994.
Error is calculated as,
εa=|y21−y11y21|×100=|0.1476994−0.14726830.1476994|×100=0.2918766
Also, the true error can be computed as,
εt=|0.148148−0.14769940.148148|×100=0.3028
Hence, the true error is εt=0.3028%.
jyjj+1εa10.14726832.63%20.14769940.292%
Second step:
Predictor
Substitute i=1 and m=0 in equation (1),
y02=y00+(−2y10t1)2h
Substitute y00=4.762673,y01=3.913253andt1=2.5 in above equation,
y02=0.1875+(−2×0.1511484.5)1=0.12032311
Predictor modifier is given by:
y0i+1=y0i+1,u+45(ymi,u−y0i,u)
where, the subscript u designates that the variable is unmodified.
Now, substitute i=1andm=2 in above equation,
y02=y02,u+45(y21,u−y01,u)
Substitute, y02,u=0.12032311,y21,u=0.1476994 and y01,u=0.151148 in above equation,
y02=0.12032311+45(0.1476994−0.151148)=0.11756423
Corrector is given by:
yji+1=ymi+(−2yimti)+(−2yi+1j−1ti+1)2h
Substitute i=1 j=1,m=2andh=0.5, m= 2 in above formula as shown below,
y12=y21+[(−2y12t1)+(−2y20t2)2]h
Now, substitute y21=0.1476994, y02=0.11756423, t1=4.5 and t2=5 as shown below,
y12=0.1476994+[(−2×0.14769944.5)+(−2×0.117564235)2]0.5=0.11953193
Error can be computed as,
εa=|y12−y02y02|×100=|0.11953193−0.117564230.11953193|×100=1.646%
The true error can be computed as,
εt=|0.12−0.119531930.12|×100=0.39%
Hence, the true error is εt=0.39%.
Corrector yields:
jyjj+1εa10.119531930.236%
(b)

To calculate: The solution of differential equation, dydt=−2yt from t=4tot=5 using the fourth-order Adams method step size of 0.5 and initial values y(2.5)=0.48,y(3)=0.333333,y(3.5)=0.244898andy(4)=0.1875. Also, the exact answers obtained analytically are y(4.5)=0.148148andy(5)=0.12 and εs=0.01%. Compute the true percent relative as well.
Answer to Problem 6P
Solution:
The solution obtained for the given differential equation are shown below in tabular form:
Predictor= 0.1527937
Corrector iteration:
tyεaεt4.50.147605453.5149%0.3322%4.50.148037810.292%0.074%4.50.1480017730.024350.099%
Predictor = 0.12165973
Corrector iteration:
tyεaεt50.11969011.6456%0.258%50.11983780.123%0.133%50.11982670.0092%0.142%
Explanation of Solution
Given Information:
Differential equation, dydt=−2yt, t=4tot=5 with step size of 0.5 and initial values y(2.5)=0.48,y(3)=0.333333,y(3.5)=0.244898andy(4)=0.1875. Values obtained analytically y(4.5)=0.148148andy(5)=0.12. Also, εs=0.01%.
Formula used:
(1) The fourth order Adams-Bashforth formula as predictor is given by,
y0i+1=ymi+h24(55fmi−59fmi−1+37fmi−2−9fmi−3)
(2) The fourth order Adams-Bashforth formula as corrector is given by,
yji+1=ymi+h24(9fj−1i+1+19fmi−5fmi−1+fmi−2)
(3) Error is given as,
εa=|yji+1−yj−1i+1yji+1|×100
Calculation:
Consider the given differential equation, dydt=−2yt.
Here, f(t)=−2yt.. .. .. (1)
Starting values of AdamsBash fourth method are,
At t=2.5, y=0.48. So, y−3=0.48. Substitute this value in equation (1)
Thus,
f−3=−2×0.482.5=−0.384
At t=3, y(3)=0.333333. So, y−2=0.333333. Substitute this value in equation (1)
Thus,
f−2=−2×0.3333333=−0.222222
At t=3.5, y=0.244898. So, y−1=0.244898. Substitute this value in equation (1)
Thus,
f−1=−2×0.2448983.5=−0.1399417
At t=4.0, y=0.1875. So, y0=0.1875. Substitute this value in equation (1)
Thus,
f0=−2×0.18754=−0.09375
The fourth order Adams-Bashforth formula as predictor is given by,
y0i+1=ymi+h24(55fmi−59fmi−1+37fmi−2−9fmi−3).. .. .. (2)
The fourth order Adams formula as the corrector is,
yji+1=ymi+h24(9fj−1i+1+19fmi−5fmi−1+fmi−2).. .. .. (3)
Use predictor to compute a value at t=4.5, substitute i=0 and m=0 in equation (2),
y01=y00+h24(55f0−59f−1+37f−2−9f−3)
Substitute values f0=−0.09375, f−1=−0.1399417, f−2=−0.222222, f−3=−0.384 and h=0.5.
y01=0.1875+0.524×(55(−0.09375)−59(−0.1399417)+37(−0.222222)−9(−0.384))=0.1527937
Hence, at t=4.5,y01=0.1527937
f1=−2×0.15279374.5=−0.0679083
Thus, f1=−0.0679083.
Now, use corrector,
Put i=0 , j=1 in equation (3),
y11=y00+h24(9f1+19f0−5f−1+f−2)
Substitute values f0=−0.09375, f−1=−0.1399417, f−2=−0.222222, f1=−0.0679083 and h=0.5.
y11=0.1875+0.524(9(−0.0679083)+19(−0.09375)−5(−0.1399417)+(−0.222222))=0.14760545
At t=4.5andy11=0.14760545
f1=−2×0.147605454.5=−0.0656024
Thus, f1=−0.0656024.
This result can be substituted back into equation (3) to iteratively correct the estimate,
y21=0.1875+0.524(9(−0.0656024)+19(−0.09375)−5(−0.1399417)+(−0.222222))=0.14803781
Again,
At t=4.5andy21=0.14803781
f1=−2×0.148037814.5=−0.0657946
Thus, f1=−0.0657946.
This result can be substituted back into equation (3) to iteratively correct the estimate,
y31=0.1875+0.524(9(−0.0657946)+19(−0.09375)−5(−0.1399417)+(−0.222222))=0.148001773
At t=4.5andy31=0.148001773
f1=−2×0.1480017734.5=−0.0657786
Thus, f1=−0.0657786.
Now, use the predictor to find the value at t=5.
Substitute i=1 in equation (2),
y02=y1+h24(55f1−59f0+37f−1−9f−2)
Substitute values, f1=−0.0657786 f0=−0.09375, f−1=−0.1399417 and f−2=−0.222222 in above equation, to get
y02=0.148001773+0.524×(55(−0.0657786)−59(−0.09375)+37(−0.1399417)−9(−0.222222))=0.12165973
At t=5andy02=0.12165973.
f2=−2×0.121659735=−0.0486639
Thus, f2=−0.0486639
Now error is given as,
εa=|yji+1−yj−1i+1yji+1|×100
Calculate εa as shown below,
εa=|0.14760545−0.15279370.14760545|×100=3.5149%
The true percent relative errors can be calculated as,
εt=|0.148148−0.147605450.148148|×100=0.36622%
Corrector formula is given as,
yji+1=ymi+h24(9fj−1i+1+19fmi−5fmi−1+fmi−2)
Substitute i=1andj=1 in above formula,
y12=y1+h24(9f02+19f1−5f0+f−1)
Substitute values, f1=−0.0657786 f0=−0.09375, f−1=−0.1399417 and f2=−0.0486639 in above equation, to get
y12=0.148001773+0.524(9(−0.0486639)+19(−0.0657786)−5(−0.09375)+(−0.1399417))=0.1196901
At t=5andy12=0.1196901
f2=−2×0.11969015=−0.0478760
Thus, f2=−0.0478760.
Hence,
y22=0.148001773+0.524(9(−0.0478760)+19(−0.0657786)−5(−0.09375)+(−0.1399417))=0.11983783
At t=5andy22=0.11983783
f2=−2×0.119837835=−0.0479351
Thus, f2=−0.0479351.
Hence,
y32=0.148001773+0.524(9(−0.0479351)+19(−0.0657786)−5(−0.09375)+(−0.1399417))=0.11982675
Now error is given as,
εa=|yji+1−yj−1i+1yji+1|×100
Calculate εa as shown below,
εa=|0.1196901−0.121659730.1196901|×100=1.6456%
The true percent relative errors can be calculated as,
εt=|0.12−0.11969010.12|×100=0.25825%
Results are shown below in tabular form:
Predictor= 0.1527937
tyεaεt4.50.147605453.5149%0.3322%4.50.148037810.292%0.074%4.50.1480017730.024350.099%
Corrector iteration:
Predictor = 0.12165973
Corrector iteration:
tyεaεt50.11969011.6456%0.258%50.11983780.123%0.133%50.11982670.0092%0.142%
Want to see more full solutions like this?
Chapter 26 Solutions
Numerical Methods for Engineers
- Find the closed formula for each of the following sequences (a_n)_n>=1 by realting them to a well known sequence. Assume the first term given is a_1 d. 5,23,119,719,5039 i have tried finding the differnces and the second difference and i still dont see the patternarrow_forwardYou manage a chemical company with 2 warehouses. The following quantities of Important Chemical A have arrived from an international supplier at 3 different ports: Chemical Available (L) Port 1 Port 2 Port 3 400 110 100 The following amounts of Important Chemical A are required at your warehouses: Warehouse 1 Warehouse 2 Chemical Required (L) 380 230 The cost in £ to ship 1L of chemical from each port to each warehouse is as follows: Warehouse 1 Warehouse 2 Port 1 £10 £45 Port 2 £20 £28 Port 3 £13 £11 (a) You want to know how to send these shipments as cheaply as possible. For- mulate this as a linear program (you do not need to formulate it in standard inequality form) indicating what each variable represents.arrow_forwarda) Suppose that we are carrying out the 1-phase simplex algorithm on a linear program in standard inequality form (with 3 variables and 4 constraints) and suppose that we have reached a point where we have obtained the following tableau. Apply one more pivot operation, indicating the highlighted row and column and the row operations you carry out. What can you conclude from your updated tableau? x1 12 23 81 82 83 S4 $1 -20 1 1 0 0 0 3 82 3 0 -2 0 1 2 0 6 12 1 1 -3 0 0 1 0 2 84 -3 0 2 0 0 -1 1 4 2 -2 0 11 0 0 -4 0 -8 b) Solve the following linear program using the 2-phase simplex algorithm. You should give the initial tableau and each further tableau produced during the execution of the algorithm. If the program has an optimal solution, give this solution and state its objective value. If it does not have an optimal solution, say why. maximize 21 - - 2x2 + x3 - 4x4 subject to 2x1+x22x3x4≥ 1, 5x1+x2-x3-4 -1, 2x1+x2-x3-342, 1, 2, 3, 4 ≥0.arrow_forward
- Suppose we have a linear program in standard equation form maximize c'x subject to Ax=b, x≥ 0. and suppose u, v, and w are all optimal solutions to this linear program. (a) Prove that zu+v+w is an optimal solution. (b) If you try to adapt your proof from part (a) to prove that that u+v+w is an optimal solution, say exactly which part(s) of the proof go wrong. (c) If you try to adapt your proof from part (a) to prove that u+v-w is an optimal solution, say exactly which part(s) of the proof go wrong.arrow_forward(a) For the following linear programme, sketch the feasible region and the direction of the objective function. Use you sketch to find an optimal solution to the program. State the optimal solution and give the objective value for this solution. maximize +22 subject to 1 + 2x2 ≤ 4, 1 +3x2 ≤ 12, x1, x2 ≥0 (b) For the following linear programme, sketch the feasible region and the direction of the objective function. Explain, making reference to your sketch, why this linear programme is unbounded. maximize ₁+%2 subject to -2x1 + x2 ≤ 4, x1 - 2x2 ≤4, x1 + x2 ≥ 7, x1,x20 Give any feasible solution to the linear programme for which the objective value is 40 (you do not need to justify your answer).arrow_forwardfind the domain of the function f(x)arrow_forward
- For each of the following functions, find the Taylor Series about the indicated center and also determine the interval of convergence for the series. 1. f(x) = ex-2, c = 2 Π == 2. f(x) = sin(x), c = 2arrow_forwardQUESTION 5. Show that if 0 ≤r≤n, then r+2 r r (c) + (+³) + (+³) +- + (*) -(+) n n+ = r (1)...using induction on n. (2) ...using a combinatorial proof.arrow_forwardUse a power series to approximate each of the following to within 3 decimal places: 1. arctan 2. In (1.01)arrow_forward
- For each of the following power series, find the interval of convergence and the radius of convergence: n² 1.0 (x + 1)" n=1 շո 3n 2. Σ n=1 (x-3)n n3arrow_forwardUse a known series to find a power series in x that has the given function as its sum: 1. xcos(x³) 2. In (1+x) xarrow_forwardif n is odd integer then 4 does not divide narrow_forward
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:Cengage
