
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
- A cantilevered rectangular prismatic beam has three loads applied. 10,000N in the positive x direction, 500N in the positive z direction and 750 in the negative y direction. You have been tasked with analysing the stresses at three points on the beam, a, b and c. 32mm 60mm 24mm 180mm 15mm 15mm 40mm 750N 16mm 500N x 10,000N Figure 2: Idealisation of the structure and the applied loading (right). Photograph of the new product (left). Picture sourced from amazon.com.au. To assess the design, you will: a) Determine state of stress at all points (a, b and c). These points are located on the exterior surface of the beam. Point a is located along the centreline of the beam, point b is 15mm from the centreline and point c is located on the edge of the beam. When calculating the stresses you must consider the stresses due to bending and transverse shear. Present your results in a table and ensure that your sign convention is clearly shown (and applied consistently!) (3%) b) You have identified…arrow_forward7.82 Water flows from the reservoir on the left to the reservoir on the right at a rate of 16 cfs. The formula for the head losses in the pipes is h₁ = 0.02(L/D)(V²/2g). What elevation in the left reservoir is required to produce this flow? Also carefully sketch the HGL and the EGL for the system. Note: Assume the head-loss formula can be used for the smaller pipe as well as for the larger pipe. Assume α = 1.0 at all locations. Elevation = ? 200 ft 300 ft D₁ = 1.128 ft D2=1.596 ft 12 2012 Problem 7.82 Elevation = 110 ftarrow_forwardHomework#5arrow_forward
- A closed-cycle gas turbine unit operating with maximum and minimum temperature of 760oC and 20oC has a pressure ratio of 7/1. Calculate the ideal cycle efficiency and the work ratioarrow_forwardConsider a steam power plant that operates on a simple, ideal Rankine cycle and has a net power output of 45 MW. Steam enters the turbine at 7 MPa and 500°C and is cooled in the condenser at a pressure of 10 kPa by running cooling water from a lake through the tubes of the condenser at a rate of 2000 kg/s. Show the cycle on a T-s diagram with respect to saturation lines, and determine The thermal efficiency of the cycle,The mass flow rate of the steam and the temperature rise of the cooling waterarrow_forwardTwo reversible heat engines operate in series between a source at 600°C, and a sink at 30°C. If the engines have equal efficiencies and the first rejects 400 kJ to the second, calculate: the temperature at which heat is supplied to the second engine, The heat taken from the source; and The work done by each engine. Assume each engine operates on the Carnot cyclearrow_forward
- A steam turbine operates at steady state with inlet conditions of P1 = 5 bar, T1 = 320°C. Steam leaves the turbine at a pressure of 1 bar. There is no significant heat transfer between the turbine and its surroundings, and kinetic and potential energy changes between inlet and exit are negligible. If the isentropic turbine efficiency is 75%, determine the work developed per unit mass of steam flowing through the turbine, in kJ/kgarrow_forwardHomework#5arrow_forwardMember AB has the angular velocity wAB = 2.5 rad/s and angular acceleration a AB = 9 rad/s². (Figure 1) Determine the magnitude of the velocity of point C at the instant shown. Determine the direction of the velocity of point C at the instant shown. Determine the magnitude of the acceleration of point C at the instant shown. Determine the direction of the acceleration of point C at the instant shown. A 300 mm WAB α AB B 500 mm 0=60° y 200 mmarrow_forward
- You are asked to design a unit to condense ammonia. The required condensation rate is 0.09kg/s. Saturated ammonia at 30 o C is passed over a vertical plate (10 cm high and 25 cm wide).The properties of ammonia at the saturation temperature of 30°C are hfg = 1144 ́10^3 J/kg andrv = 9.055 kg/m 3 . Use the properties of liquid ammonia at the film temperature of 20°C (Ts =10 o C):Pr = 1.463 rho_l= 610.2 kf/m^3 liquid viscosity= 1.519*10^-4 kg/ ms kinematic viscosity= 2.489*10^-7 m^2/s Cpl= 4745 J/kg C kl=0.4927 W/m Ca)Calculate the surface temperature required to achieve the desired condensation rate of 0.09 kg/s( should be 688 degrees C) b) Show that if you use a bigger vertical plate (2.5 m-wide and 0.8 m-height), the requiredsurface temperature would be now 20 o C. You may use all the properties given as an initialguess. No need to iterate to correct for Tf. c) What if you still want to use small plates because of the space constrains? One way to getaround this problem is to use small…arrow_forwardUsing the three moment theorem, how was A2 determined?arrow_forwardDraw the kinematic diagram of the following mechanismarrow_forward
- Principles of Heat Transfer (Activate Learning wi...Mechanical EngineeringISBN:9781305387102Author:Kreith, Frank; Manglik, Raj M.Publisher:Cengage Learning
