- #1
goggles31
- 34
- 0
My notes state that the method is constructed based on the idea:
yk+1=yk+∫f(x,y)dx where the integral is taken from xk to xk+1
We can estimate the integral by considering
∫f(x)dx (from xk to xk+1) =c0fk+c1fk-1
To simplify the equation, we move xk to the origin such that
∫f(x)dx (from 0 to h) =c0f(0)+c1f(-h)
Starting from below, I start to get confused.
It says "Replace f(x) with the polynomials, we have"
f(x)=1 : h=c0(1)+c1(1)
f(x)=x : h2/2=c0(0)+c1(-h)
Solving for c0 and c1,
c0=3h/2 and c1=-h/2 giving
yk+1=yk+h/2*(3fk-fk-1) + O(h3)
I've gone through the working and understand where the numbers come from, but I have no idea why they replace f(x) with 1 and x. Why not x2 or x3? I've gone through some books but they derive this with the Taylor's series and I also understand that. I just don't understand the part I mentioned.
yk+1=yk+∫f(x,y)dx where the integral is taken from xk to xk+1
We can estimate the integral by considering
∫f(x)dx (from xk to xk+1) =c0fk+c1fk-1
To simplify the equation, we move xk to the origin such that
∫f(x)dx (from 0 to h) =c0f(0)+c1f(-h)
Starting from below, I start to get confused.
It says "Replace f(x) with the polynomials, we have"
f(x)=1 : h=c0(1)+c1(1)
f(x)=x : h2/2=c0(0)+c1(-h)
Solving for c0 and c1,
c0=3h/2 and c1=-h/2 giving
yk+1=yk+h/2*(3fk-fk-1) + O(h3)
I've gone through the working and understand where the numbers come from, but I have no idea why they replace f(x) with 1 and x. Why not x2 or x3? I've gone through some books but they derive this with the Taylor's series and I also understand that. I just don't understand the part I mentioned.