# Thread: Finding Green's Function for ODE

1. ## Finding Green's Function for ODE

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

2. 1. Solve homogeneous equation

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

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

$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$

$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 $R \neq n\pi$ to ensure linear independence of solutions as the Wronskian is $\sin R$.

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

3. $G(x, s)$ continuous at $x = s$
$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,

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

4. Jump Condition
$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
$
-a_2(s)(\sin s + \cos s \cot R) - b_1(s)\cos s = 1
$

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

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

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

Also we can simplify: $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:
$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!