Helmut Jarausch <jarau...@igpm.rwth-aachen.de> writes:
Hans Jakob Rivertz wrote:
I made an exercise for my students, where they
should solve an ODE by using Runge Kutta and compare
it to the exact solution. To my surprise the Runge Kutta
method gave the exact answer. I have made some investigations
around this but does not find any references. Are there anyone
who know what is known about phenomenons like this.
If your Runge Kutta method is exact of oder p (p=4
for the old/classical RK method) then it is exact if
the solution happens to be a polynomial of degree
at most p .
Sorry, that's not true. For example, consider the initial value problem
y' = y + 2 x - x^2, y(0) = 0, which has solution y = x^2.
But if you use classical RK4 with step size h, the result of the first
step is y_1 = h^2 - h^5/48, not h^2.
Perhaps you're thinking of the differential equation y' = f(x).
For a less trivial example, consider the initial value problem
y' = 2 x + a (y - x^2) + b (y - x^2)^2, y(0) = 0
which has solution y = x^2. Classical RK4 with step size h=1
is exact iff a and b satisfy the equation
(1/24)*b+(1/1024)*b^3+(1/4

*a^3+(1/3072)*b^4+(1/16384)*b^5
+(1/196608)*b^6+(1/6291456)*b^7+(1/24576)*b^3*a^4+(1/24576)*b^4*a^3
+(1/65536)*b^5*a^2+(1/393216)*a*b^6+(5/98304)*a*b^5+(1/8192)*b^4*a^2
-(1/6144)*b^3*a^3-(1/1536)*b^2*a^4+(1/4096)*a*b^4-(5/6144)*a^2*b^3
-(1/384)*a^3*b^2+(1/384)*a^4*b-(5/6144)*a*b^3-(5/768)*a^2*b^2
+(1/128)*b*a^3-(1/192)*a*b^2+(1/96)*b*a^2+(1/192)*b^2 = 0
describing a certain curve in the a,b plane. For example, with
a=1 there is one real solution for b, approximately −.3180400606.