Describe how the fourth-order Runge-Kutta method can be used to produce a table of values for the function

$$f(x)=\int_0^x e^{-t^2}\ \mathsf dx$$

at $100$ equally spaced points in the unit interval.

Answer: Find an appropriate initial-value problem whose solution is f. Solve df =e^{−x^2}, f(0)=0.

The answer is a little confusing and can anyone write out the full answer? I suppose my question is how after i take the derivative and transform the intergral equation into a differential equation with initial value, how do i know the step size h? n how do i know the initial value? I know what runge kutta 4th order is The runge kutta method is

$$k_1 = f(t_0,x(t_0))$$ $$k_2 = f(t_0+h/2,x(t_0)+k_1/2)$$ $$k_3 = f(t_0+h/2,x(t_0)hk_2/2)$$ $$k_4 = f(t_0+h,x(t_0)+k_3)$$ Then $$x(t_0+h)= x(t_0) + h\frac{k_1+2k_2+2k_3+k_4}{6}$$

  • $\begingroup$ Look for Simpson integration, no need to transform a simple quadrature into a differential equation. $\endgroup$ – Lutz Lehmann Apr 18 '18 at 11:56

Focus less on symbols and concentrate on the properties of the objects. A change of symbols might clarify matters. Let $y : \mathbb{R} \rightarrow \mathbb{R}$ be given by $$ y(t) = \int_0^t e^{-s^2}ds.$$ Then $y(0) = 0$ and $$ y'(t) = e^{-t^2}.$$ If we define $f : \mathbb{R} \times \mathbb{R}$ as follows, $$ f(t,y) = e^{-t^2},$$ where there is no explicit dependence on the second variable, then we can write $$ y'(t) = f(t,y).$$ You are now in a position to apply, say, the classical fourth order Runge-Kutta method.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.