# Green's function for a BVP

## Homework Statement

Find a green's function G(x,t) for the BVP y'' + y' = f(x), y(0) = 0, y'(1) = 0.

## The Attempt at a Solution

I solved the homogeneous equation, looking for 2 linearly independent solutions, and found A (constant) and exp(-x). I am struggling with the boundary conditions though. My solution y1=A satisfies y1'(1) = 0 but I can't find a solution to satisfy y(0) = 0. If I were to find this, my method would be to write y(x) = c1(x)y1(x) + c2(x)y2(x), then find integral expressions for c1 and c2. However, as I can't find another linearly independent solution to the homogeneous equation do I need to use a different method?

Thank you.

vela
Staff Emeritus
Homework Helper

y(x) = A + B e-x

It already consists of two linearly independent solutions. You just have to set the constants so they satisfy the boundary condition, as you usually do. In this case, you get A=-B, so the solution you want is

y(x) = A(1 - e-x)

Sorry if I am being dumb, but surely when I use y(x) = A(1-exp(-x)) and try to satisfy the boundary condition y'(1) = 0, I get y'(x) = Aexp(-x) so y'(1) = Aexp(-1) so A = 0?

vela
Staff Emeritus
Homework Helper
After I posted, I thought that's what might be confusing you. The Green's function satisfies

$$y''(x)+y'(x) = -\delta(x-t)$$

So you actually have two solutions, u(x) for when x<t and v(x) for when x>t, where 0<t<1. The solution you found would be v(x)=c2. Since it's only valid for x>t, it only has to satisfy the boundary condition at x=1. Similarly, u(x)=c1(1-e-x) is valid for x<t, so it only has to satisfy the boundary condition at x=0. So you have

$$G(x,t) = \left\{\begin{array}{lr}c_1(1-e^{-x}) & \mathrm{when}~x<t \\ c_2 & \mathrm{when}~x>t\end{array}\right.$$

The idea now is to figure out what c1 and c2 need to be so that G(x,t) satisfies the requirements of a Green's function.

Do you have a textbook? It probably shows how to construct the Green's function once you have the two solutions u(x) and v(x).

Last edited:
Ah yes :) thanks!