- How does Euler's method give an approximate solution to a differential equation?
- Start at a known point (x₀, y₀), find the gradient f(xn, yn) there, then move a short step h along the tangent: yn₊₁ = yn + h × f(xn, yn). Repeat from each new point, always taking the gradient at the start of the step. For dy/dx = x + y with y = 1 at x = 0 and h = 0.2, the approximation is y ≈ 1.48 when x = 0.4.
- How many steps does Euler's method need, and which value should I read off?
- The number of steps is (x_end - x₀)/h. Row n gives xn = x₀ + nh, so read the time or x-value, not the step number n. For dy/dx = 3 - y with h = 0.5 and y = 0 at x = 0, the value at x = 2 takes 4 steps and gives y ≈ 2.81.
- How do I use Euler's method for a pair of linked rates, such as rabbits and foxes?
- Step all the variables forward at once, using the old values xn, yn and tn in both rates. Do not use the new xn₊₁ to work out yn₊₁. For dx/dt = 0.4x - 0.02xy and dy/dt = 0.01xy - 0.3y with x = 50, y = 10 and h = 1, you get x₁ = 60 and y₁ = 12, then x₂ = 69.6 and y₂ = 15.6.
- How do I apply Euler's method to a second order differential equation?
- Let v = dx/dt, so the equation becomes a coupled pair. First rearrange to make the second derivative the subject, dividing every term by the coefficient, including the constant. Then step x and dx/dt together. For the spring with h = 0.1 and x = 0.5 at the start, the displacement after 1 second is 4.36 m, and the mass first reaches x = 0 at t = 2 seconds.
- How do I find the maximum possible percentage error of an Euler estimate?
- Put each end of the range of the exact value into the percentage error formula, using the same unit for both values, and keep the larger answer. For a drink measured as 46 °C to the nearest degree, the ends are 45.5 and 46.5. With the estimate 37.5 °C, the errors are 19.35…% and 17.58…%, so the maximum is 19.4%.
- Why does my answer give the step number 20 instead of the time 2 seconds?
- You have read the step number n instead of the time. Row n is the value after n steps, so n = 20 with a step of 0.1 seconds gives t = 2 seconds. The question asks for the time or the x-value, so give that, and check that the number of steps is (x_end - x₀)/h.