Determining the Green's function and solution for $f''(x)=-g(x)$ with boundary conditions $f(0)=f(1)=0$.

253 Views Asked by At

I am trying to solve the Poisson's equation in one dimension using Green's function: $$f''(x)=-g(x)$$ With the boundary conditions $f(0)=f(1)=0$.

I know that the Green's function is going to satisfy the same boundary conditions and de ODE: $$\frac{d^2G(x,t)}{dx^2}=\delta(x-t)$$ And I also know that $\frac{d^2G(x,t)}{dx^2}=0$ for $x\neq y$. So I first solved the ODE on the region $0\leq x<t$: $$G(x,t)=Ax+B$$ Apllying the boundary condition $G(0,t)=0$, it implies $B=0$ and thus $G(x,t)=Ax$

For the region $t<x\leq 1$: $$G(x,t)=Cx+D$$ Applying the boundary condition $G(1,t)=0$, it implies $C=-D$ and thus $G(x,t)=C(x-1)$.

$$ G(x,t) = \begin{cases} Ax & \text{if $x<t$} \\ C(x-1) & \text{if $x>t$} \\ \end{cases} $$ To determine $A$ and $C$, I integrated $\frac{d^2G(x,t)}{dx^2}=\delta(x-t)$ over a small iterval that included $x=t$: $$\lim_{\epsilon\to0}\int_{t-\epsilon}^{t+\epsilon}\frac{d^2G(x,t)}{dx^2}=\frac{dG(x,t)}{dx}\Bigg\rvert_{x=t^+}-\frac{dG(x,t)}{dx}\Bigg\rvert_{x=t^-}=C-A=1$$ thus $C=1+A$. Since both sides pieces of $G(x,t)$ must be equal at $x=t$: $$At=C(t-1)=(1+A)(t-1)\Rightarrow A=t-1\ \text{and}\ C=t$$ Thus the Green's function is: $$ G(x,t) = \begin{cases} x(t-1) & \text{if $x<t$} \\ t(x-1) & \text{if $x>t$} \\ \end{cases} $$

After finding the Green's function, I have to find the solution for de ODE when $g(x)=\sin(\pi x)$, thus: $$f(x)=\int_{0}^{1}G(x,t)g(t)dt=(x-1)\int_{0}^{x}t\sin(\pi t)dt+x\int_{x}^{1}(t-1)\sin(\pi t)dt$$ After computing the integral, I got: $$f(x)=-\frac{1}{\pi^2}\sin(\pi x)$$ But it isn't the correct answer, according to my book it should be $$f(x)=\frac{1}{\pi^2}\sin(\pi x)$$ I'm just missing the minus sign, what am I doing wrong? Thanks for helping me.

1

There are 1 best solutions below

1
On

You should've gotten a positive 1/pi^2 sinpix. The first integral vanishes at zero and the x limit solution cancels with the x limit of the second integral. Thus you have IBP of the second term of which your UV[1,x] is zero (keep in mind V is negative cosPit) and -Int[VdU] is positive as the negatives cancel.

BTW the general solution for t < x is C(x-1) + D where D = 0 according to BC. Your general solution for the left side must satisfy left BC only, and same with the right.

And one more thing :O, Your condition for Gx along with G(x->t(-))=G(x->t(+)) is called the connection condition and is properly written in terms of limits x->t(+/-), getting rid of the epsilon dependence (remember that you can't take limits inside the integral)