# Green's Function Solution to ODE. Boundary Conditions Problem.

1. Sep 21, 2009

### LukeMiller86

Use Green's Functions to solve:

$$\frac{d^{2}y}{dx^{2}} + y = cosec x$$

Subject to the boundary conditions:

$$y\left(0\right) = y\left(\frac{\pi}{2}\right) = 0$$

Attempt:

$$\frac{d^{2}G\left(x,z\right)}{dx^{2}} + G\left(x,z\right) = \delta\left(x-z\right)$$

For $$x\neq z$$ the RHS is zero so the complementary solution consists of sinx and cosx terms but with different superpositions on either side of x = z since the first derivative is required to have a discontinuity there.

Assume a form $$G\left(x,z\right) = A\left(z\right)sinx + B\left(z\right)cosx$$ for x < z

and $$G\left(x,z\right) = C\left(z\right)sinx + D\left(z\right)cosx$$ for x > z

I'm just following an example from a book that then continues to state that according to the boundary conditions B and C are equal to zero, seems simple but I'm unclear as to how they achieve this. I don't see how to apply this and discern B and C being zero, I seem to just find A,B,C and D all zero. Also how would one proceed in the case of the boundary conditions stating G and its first derivative equal to zero and achieve A and B zero?

Cheers

2. Sep 21, 2009

### LukeMiller86

Okay, for the first one is it the case that x is valid over the interval $$\left[0<x<\frac{\pi}{2}\right]$$, therefore z is valid over the same interval? That seems to solve my problem with the maths.

For the second boundary case would it be that it is equally possible to say A = B = 0 as it is to say C = D = 0.

Thanks.