# Need to find Green Function to solve ODE

1. Oct 8, 2006

### romeo6

Hi,

I have a basic ODE:

$$y''(x)+\frac{1}{4}y'(x)=f(x)$$

on 0<x<L

With Boundary conditions:

$$y(0)=y(L)=0$$

For which I would like to construct a Green Function.

Rather than just plain ask for help, I'll show you what I've been thinking and maybe someone wiser can help/correct me:

We must solve:

$$G''(x,x')+\frac{1}{4}G'(x,x'')=\delta(x-x')$$

Since G vanishes at the boundaries we can expand as a fourier sine series:

$$G(x,x')=\sum_{n=1}^\infty \gamma_n sin\frac{n\pi x}{L}$$

and:

$$\delta(x-x')=\sum_{n=1}^\infty A_n(x')sin\frac{n\pi x}{L}$$

Integrating the delta function I get:

$$A_n(x')=\frac{2}{L}sin\frac{n\pi x}{L}$$

I take the first and second derivative of the equation for G

and plug everything into the differential equation for G:

$$\sum_{n=1}^\infty \gamma_n (\frac{-n^2 \pi^2}{L^2})sin\frac{n\pi x}{L}+\frac{1}{4} \sum_{n=1}^\infty \gamma_n (\frac{n \pi}{L})cos\frac{n\pi x}{L}=\sum_{n=1}^\infty \frac{2}{L}sin\frac{n\pi x'}{L}sin\frac{n\pi x}{L}$$

Now I am not sure what to do from here to get the required Green function...can someone guide me please?

2. Oct 9, 2006

### HallsofIvy

Staff Emeritus
It's not clear to me why you would use Fourier series. For all x except x', the Green's function satisfies $G"+ \frac{1}{4}G'= 0$ which has general solution
$$G(x)= A+ Be^{\frac{x}{4}}$$
The Green's function must be of the form
$$G(x, x')= \left{\begin{array}{c}A+ Be^{\frac{x}{4}} if 0\le x\le x' \\C+ De^{\frac{x}{4}} if x'\le x\le L\end{array}$$

A, B, C, D depend on x' and are chosen so that the boundary values are satisfied, the two "pieces" have the same value when x= x', and the difference in the derivative when x= x' (left side minus right) is 1: 4 conditions to determine 4 numbers.

3. Oct 9, 2006

### romeo6

Ok, let me try and from some equations from the conditions:

Condition 1.

$$G(0,x')=0=A+Be^0$$
so A=-B

Conditon 2.

$$G(L,x')=0=C+De^{L/4}$$

so$$C=-De^{L/4}$$

Conditon 3:

$$Be^{x'/4}=De^{1/4(x'-L)}$$

Condition 4.

$$\frac{Bx'(x-L)}{x-L}+B=1$$

Thanks!

Last edited: Oct 9, 2006
4. Oct 11, 2006

### HallsofIvy

Staff Emeritus
If, by "condition 1", "condition 2", etc. you mean
"A, B, C, D depend on x' and are chosen so that the boundary values are satisfied, the two "pieces" have the same value when x= x', and the difference in the derivative when x= x' (left side minus right) is 1." that I mentioned before, then your equations for "condition 1" and "condition 2" are correct.
For the third one, having the same value when x= x',
$$A+ Be^{\frac{x'}{4}}= C+ De^{\frac{x'}{4}}$$

For the fourth, that the difference in left and right derivatives at x= x' be 1,
$$\frac{B}{4}e^{{x'}{4}}- \frac{D}{4}e^{{x'}{4}}= 1$$

5. Oct 11, 2006

### romeo6

Thanks!

Yes, thats exactly what I meant by 4 conditions, but I was just borrowing your phrase '4 conditions to determine 4 numbers', so if I have used the phrase incorrectly I apologize.

I'll keep working on this.

In the last condition is that supposed to be 4e or is it a typo and supposed to be e/4?