# Generalized Green function of harmonic oscillator

1. Oct 23, 2013

### Dustinsfl

1. The problem statement, all variables and given/known data
The generalized Green function is
$$G_g(x, x') = \sum_{n\neq m}\frac{u_n(x)u_n(x')}{k_m^2 - k_n^2}.$$
Show $G_g$ satisfies the equation
$$(\mathcal{L} + k_m^2)G_g(x, x') = \delta(x - x') - u_m(x)u_m(x')$$
where $\delta(x - x') = \frac{2}{\ell}\sum_{n = 1}^{\infty}\sin(k_nx)\sin(k_nx')$
and the condition that
$$\int_0^{\ell}u_m(x)G_g(x, x')dx = 0.$$

2. Relevant equations

3. The attempt at a solution
From a previous problem, I found
$$u_n(x) = \sqrt{\frac{2}{\ell}}\sin(k_nx).$$
I then end up with
\begin{gather}
(\mathcal{L} + k_m^2)G_g(x, x') = \frac{2}{\ell}\sum_{n = 1}^{\infty}\sin(k_nx)\sin(k_nx') - u_m(x)u_m(x') \\
\sum_{n\neq m}^{\infty}\sin(k_nx)\sin(k_nx') = \left(\sum_{n = 1}^{\infty}\sin(k_nx)\sin(k_nx')\right) - \sin(k_mx)\sin(k_mx')
\end{gather}
What is going wrong?
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Oct 25, 2013

### vela

Staff Emeritus
Why do you think anything is going wrong? Please explain what you did. I can't tell if you just plugged in the expression for $\delta(x-x')$ to get the first line or if you evaluated the lefthand side and got the righthand side or did something else.

3. Oct 25, 2013

### vanhees71

The Fourier method to solve differential equations is always to make an ansatz of the unknown function in terms of a Fourier series. In your case
$$G(x,x')=\sum_{n=1}^{\infty} A_n(x') u_n(x).$$
Then you apply the operator, $\mathcal{L}+k_m^2$ to this ansatz, expand the inhomogeneity of the equation also in terms of a Fourier series and then compare the coefficients on both sides, which lets you solve for $A_n(x')$.

Note that in this case, where $\lambda=-k_m^2$ is an eigenvalue of $\mathcal{L}$, the inhomoeneity must be perpendicular to the eigenfunction $u_m$ for consistency. That's why you have to subtract the part parallel to this eigenmode. Note also that any solution of the inhomogeneous equation is only determined up to a function proportional to this eigenmode!