What would you like to understand?

Popular destinationsCalculatorsCoursesPracticeFormulas

Unlock Premium Help

Explore every tutor and study workspace for seven days, with no daily AI cap during the trial.

Choose a billing period
Ask a parent to pay

Nothing is charged during the first seven days. Unless you cancel, the plan you selected begins when the trial ends and renews on its stated schedule. Manage cancellation from your plan page. Stripe handles the payment details.

Fourth-order Runge–Kutta formula: what it means and how to use it

Advance an initial-value solution using four slope samples. This numerical methods relationship belongs to differential equations. Read the symbols against the problem, confirm the required conditions, and estimate the scale before calculating.

\[y_{n+1}=y_n+\frac h6(k_1+2k_2+2k_3+k_4)\]

Identify what is changing in Fourth-order Runge–Kutta

Read the independent variable, dependent quantity, interval, and initial or boundary information before choosing an operation. Rebuild missing background in the differential equations subject guide, then use differential equations practice to retrieve the relationship without being told its name.

Conditions required before the rule can be used

The midpoint samples assume the slope function behaves smoothly across the step. A sudden switch in the forcing term partway through a step makes those samples describe two different problems, so the step boundaries should be lined up with the jump. Stiff equations still demand small steps despite the accuracy.

Build the derivative, integral, or model in stages

  1. Name the unknown, and the unit the answer has to come out in.
  2. Match the symbols to your values. $k_1=f(x_n,y_n)$, $k_2=f(x_n+h/2,y_n+hk_1/2)$, $k_3=f(x_n+h/2,y_n+hk_2/2)$, and $k_4=f(x_n+h,y_n+hk_3)$.
  3. Check the conditions before substituting. Use a sufficiently smooth differential equation and monitor numerical error as step size changes.
  4. Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate - The check that catches most differential equations slips.

Fourth-order Runge–Kutta through one changing case

Track what each line says about rate, accumulation, or evolution:

\[RK4 is generally much more accurate per step than Euler’s method for smooth problems.\]

Check change against behavior and units

After using Fourth-order Runge–Kutta, repeat the calculation with units attached and test the result against a boundary case or a quick numerical estimate.

Where a change calculation commonly breaks

What goes wrong: Students evaluate the middle slopes at the starting point, forgetting to advance both x and y before sampling.

Why it fails: The two midpoint readings only add information because they are taken somewhere new. Sampling at the same place four times reduces the whole scheme to Euler's method with extra arithmetic.

Repair: Move both coordinates for each sample: k₂ uses x + h/2 together with y + hk₁/2, and k₃ uses x + h/2 with y + hk₂/2. Each k feeds the next, so they must be computed in order.

Questions about change in Fourth-order Runge–Kutta

How much better is it than Euler's method?

Dramatically better. One step of size 0.1 on y' = y from y(0) = 1 gives 1.10517083 against the true 1.10517092, an error near 8 in the hundred-millionths, while Euler's 1.1 is off by about 0.0052.

Why are the two middle slopes weighted double?

Because the midpoint is the single best place to estimate the average slope across a step. The weights 1, 2, 2, 1 divided by 6 are what make the errors cancel through fourth order.

Does it cost four function evaluations per step?

Yes, so each step is four times the work of an Euler step. It still wins easily, since it reaches a given accuracy with vastly fewer steps than Euler needs.

Can I use it on a system of equations?

Yes, and the formula does not change. Treat y and each k as vectors and apply every line componentwise, which is also how a second-order equation gets solved after being split into two first-order ones.

Make it yours

Change one input, predict whether the output should rise, fall, or stay fixed, and only then recalculate.