# Thread: Finding Green's Function for ODE

1. ## Finding Green's Function for ODE

[Math]u''+u = f(x)[/tex]
$\displaystyle 0<x<R$
$\displaystyle u(0) = 0 u(R) = 0$

2. 1. Solve homogeneous equation

$\displaystyle u'' + u = 0 \Rightarrow u = a\cos x + b\sin x$

2. $\displaystyle LG(x,s) = 0$ for $\displaystyle x \neq s$

$\displaystyle x < s, G_1(x,s) = a_1(s)\cos x + b_1(s) \sin x, G(0, s) = 0 \Rightarrow a_1(s) = 0$

$\displaystyle x > s, G_2(x, s) = a_2(s)\cos x + b_2(s) \sin x, G(R, s) = 0 \Rightarrow a_2(s)\cos R + b_2(s) \sin R = 0$

We note $\displaystyle R \neq n\pi$ to ensure linear independence of solutions as the Wronskian is $\displaystyle \sin R$.

Hence $\displaystyle G_2(x, s) = a_2(s) (\cos x - \sin x \cot R)$

3. $\displaystyle G(x, s)$ continuous at $\displaystyle x = s$
$\displaystyle G_1(s, s) = G_2(s, s) \Rightarrow b_1(s) \sin s = a_2(s) (\cos s - \sin s \cot R)$

Therefore Eq. 1,

$\displaystyle b_1(s) = a_2(s) (\cot s - \cot R)$

4. Jump Condition
$\displaystyle G'(x)\Big{|}^{x = s^+}_{x = s^-} = 1 \Rightarrow -a_2(s)(\sin s + \cos s \cot R) - b_1(s)\cos s = 1$

Which gives:

Eq. 2
$\displaystyle -a_2(s)(\sin s + \cos s \cot R) - b_1(s)\cos s = 1$

Now Eq. 1 and Eq. 2 together give:
$\displaystyle -a_2(s)(\sin s + \cos s \cot R + \cos s\cot s - \cos s\cot R ) = 1$

$\displaystyle \therefore a_2(s) = -\sin s$

Now using Eq. 1 again, we know $\displaystyle b_1(s) = - \sin s(\cot s - \cot R) = \frac{\sin(s - R)}{\sin R}$

Also we can simplify: $\displaystyle G_2(x, s) = -\sin s(\cos x - \sin x \cot R) = \sin s \frac{\sin(x - R)}{\sin R}$

So putting this all together, we get our Green's function:
$\displaystyle G(x, s) = \begin{cases} \frac{\sin(s - R)}{\sin R} \sin x& x < s \\\\ \sin s \frac{\sin(x - R)}{\sin R} & x > s \end{cases}$

From here you should be able to represent the solution as a sum of two integrals that utilize the Green's function. Good luck

P.S. Let me know if I made any mistakes!

many thanks!