Green's theorem is based on integration by parts. We write

= |
- x(t') + F(t')
| ||

= |
- G(t,t') + (t - t')
| (7) |

dt'G(t,t')x(t') - dt'x(t')G(t,t') = dt'G(t,t') - dt'x(t')
| (8) |

t'=t_{i}^{t' = tf} - t'=t_{i}^{t' = tf} = dt'G(t,t') - x(t) .
| (9) |

We want to solve for the case where the oscillator is at rest at the
origin at time *t*_{i} . In that case, the lower limits of the surface
terms are zero since both *x*(*t*_{i}) and
*dx*(*t*)/*dt*|_{t = ti} are zero.
If we use the retarded Green's function, the surface terms will be zero
since *t* < *t*_{f} , and the retarded Green's functions are zero at the
upper limits. We can also replace the upper limit of the integral
containing *G*(*t*,*t*') with *t* , since the retarded Green's function is
zero beyond that value. The solution in terms of the retarded Green's
function is

x(t)
| = |
dt'G^{ (R)}(t,t')
| |

= |
dt'sin([t - t'])F(t') .
| (10) |

We can also use the advanced Green's function, however in this case,
the surface terms at the upper limit do not cancel and the result is slightly
more difficult to derive. The Green's function terms are

t'=t_{f}
| = |
- sin([t - t_{f}])
| |

t'=t_{f}
| = |
cos([t - t_{f}])
| (11) |

x(t)
| = |
dt'G^{ (A)}(t,t') + sin([t - t_{f}])v(t_{f}) - cos([t - t_{f}])x(t_{f})
| |

= |
dt'G^{ (A)}(t,t') + sin([t - t_{f}])v(t_{f}) - cos([t - t_{f}])x(t_{f})
| ||

= |
- dt'sin([t - t'])F(t') + sin([t - t_{f}])v(t_{f}) - cos([t - t_{f}])x(t_{f})
| (12) |

x(t_{i}) = 0 = - dt'sin([t_{i} - t'])F(t') + sin([t_{i} - t_{f}])v(t_{f}) - cos([t_{i} - t_{f}])x(t_{f})
| (13) |

v(t_{i}) = 0 = - dt'cos([t_{i} - t'])F(t') + cos([t_{i} - t_{f}])v(t_{f}) + sin([t_{i} - t_{f}])x(t_{f}) .
| (14) |

x(t_{f})
| = |
sin([t_{i} - t_{f}])dt'cos([t_{i} - t'])F(t') - cos([t_{i} - t_{f}])dt'sin([t_{i} - t'])F(t')
| |

= |
dt'sin([t_{f} - t'])F(t')
| ||

v(t_{f})
| = |
sin([t_{i} - t_{f}])dt'sin([t_{i} - t'])F(t') + cos([t_{i} - t_{f}])dt'cos([t_{i} - t'])F(t')
| |

= |
- dt'cos([t_{f} - t'])F(t')
| (15) |

x(t)
| = |
- dt'sin([t - t'])F(t') - sin([t - t_{f}])dt'cos([t_{f} - t'])F(t')
| |

- cos([t - t_{f}])dt'sin([t_{f} - t'])F(t')
| |||

= |
- dt'sin([t - t'])F(t') + dt'sin([t - t'])F(t')
| ||

= |
dt'sin([t - t'])F(t')
| (16) |

So we see that while using the Green's function optimized for the boundary conditions at hand makes the calculation simpler, any Green's function can be used to get the correct answer.