An engineer solves the same smooth initial value problem on 0≤t≤20 \le t \le 20≤t≤2 twice with step size h=0.1h = 0.1h=0.1. Euler's method gives a global error of 0.0320.0320.032 at t=2t = 2t=2, and classical RK4 gives 2.4×10−62.4 \times 10^{-6}2.4×10−6. Both step sizes are small enough that each method's errors follow its theoretical order. If both runs are repeated with h=0.05h = 0.05h=0.05, which prediction of the new errors at t=2t = 2t=2 is best?
Euler about 0.0160.0160.016; RK4 about 1.5×10−71.5 \times 10^{-7}1.5×10−7
Euler about 0.0160.0160.016; RK4 about 1.2×10−61.2 \times 10^{-6}1.2×10−6
Euler about 0.0080.0080.008; RK4 about 1.5×10−71.5 \times 10^{-7}1.5×10−7
Euler about 0.0160.0160.016; RK4 about 3.0×10−73.0 \times 10^{-7}3.0×10−7
Unlock full course notes by signing up
Retrying an adaptive step
An embedded Runge–Kutta pair produces two endpoint approximations using shared slope evaluations. Their difference provides an estimate of the local error.
An adaptive solver's last accepted position is xn=1.20 mx_n=1.20\ \text{m}xn=1.20 m. A trial with step size h=0.20 sh=0.20\ \text{s}h=0.20 s produces a candidate position of 1.08 m1.08\ \text{m}1.08 m and an estimated absolute local error of 0.006 m0.006\ \text{m}0.006 m. The absolute error tolerance is 0.002 m0.002\ \text{m}0.002 m.
The solver uses the error ratio
Midpoint stepping for coupled temperatures
Two well-mixed reservoirs exchange heat without losing heat to their surroundings. Their temperatures satisfy
where time is measured in minutes, temperatures in °C, and both coefficients have units of min−1. Initially, T1(0)=80 ∘CT_1(0)=80\ ^\circ\text{C}T1(0)=80 ∘C and T2(0)=20 ∘CT_2(0)=20\ ^\circ\text{C}T2(0)=20 ∘C.
Stability limit of Euler's method
A reactive chemical species decays according to dcdt=−50c\dfrac{dc}{dt} = -50cdtdc=−50c, with ttt in seconds. You integrate this equation with the explicit Euler method using a fixed step size hhh. What is the largest step size for which the magnitude of the numerical solution does not grow from one step to the next? Give your answer in milliseconds, to the nearest whole number.
A nonlinear backward Euler update
A model for the concentration CCC of a reacting solute is
with k=0.010 L/(mg⋅s)k=0.010\ \text{L}/(\text{mg}\cdot\text{s})k=0.010 L/(mg⋅s). Concentration must remain nonnegative.