1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving a second order DE via Green's function

  1. Nov 8, 2012 #1

    fluidistic

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    Hello guys. I've been stuck on a problem when searching for the Green function.
    Here is the problem: Find the solution of [itex]x^2 y''-2y=x[/itex] for [itex]1 \leq x < \infty[/itex] with the boundary conditions [itex]y(1)=y(\infty ) =0[/itex], using the appropriate Green function.


    2. Relevant equations
    The general solution will be under the form [itex]y(x)= \int _1^\infty G(x,x')f(x')dx'[/itex].
    Where f(x') is the non homogeneous term, namely x' here. Therefore if I get the Green function G(x,x') I'm basically done with the problem (well it reduces to solving an integral).

    3. The attempt at a solution
    For all [itex]x \neq x'[/itex] in the domain, the Green function satisfies the homogeneous DE [itex]x^2 G''-2G=0[/itex]. Where the derivative is with respect to x. It's a Cauchy-Euler DE. I solve it and the general solution is [itex]G(x)=\frac{c_1}{x}+c_2 x^2[/itex]. So that the dependence of G on x' is via the constants [itex]c_1[/itex] and [itex]c_2[/itex].
    Now I know that for the region [itex]1 \leq x <x'[/itex], the boundary condition G(1)=0 implies that [itex]c_1=-c_2[/itex]. And in the region [itex]x'<x[/itex], [itex]y(\infty ) =1[/itex] implies that [itex]c_2=0[/itex].
    Therefore the Green function takes the form [itex]G(x)=c_1 \left ( \frac{1}{x} -x^2 \right )[/itex] for when [itex]1 \leq x <x'[/itex]. And [itex]G(x)=\frac{c_1}{x}[/itex] when [itex]x'<x[/itex].
    Now in order to solve for the constant [itex]c_1[/itex] I think I must use the continuity of the Green function at [itex]x=x'[/itex]. But this imply that [itex]c_1=0[/itex] which would give the trivial solution to the DE.
    I don't see what I did wrong so far. Any help would be immensily appreciated.
     
  2. jcsd
  3. Nov 9, 2012 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    The arbitrary constants aren't the same. That is, what you have is
    $$ G(x) = \begin{cases}
    A\left(\frac{1}{x}-x^2\right) & 1 \le x < x' \\
    \frac{B}{x} & x > x'
    \end{cases}$$ Continuity will allow you to eliminate one of the constants, and then you have to figure out what the discontinuity in the first derivative should be to solve for the remaining constant.
     
  4. Nov 9, 2012 #3

    fluidistic

    User Avatar
    Gold Member

    Thanks a bunch!
    So if [itex]G(x)= \begin{cases} c_1 \left ( \frac{1}{x} -x^2 \right ) \text{for } 1 \leq x <x' \\ \frac{c_2}{x} \text{for } x'< x \end{cases}[/itex] I reach that [itex]c_2=c_1(1-x'^3)[/itex] because of the continuity of the Green's function at [itex]x=x'[/itex].
    According to my book (Courant's mathematical methods) if the DE is under the form [itex]pu''+p'u'+qu=L[/itex] then the discontinuity of [itex]\frac{dG}{dx}[/itex] at [itex]x=x'[/itex] is worth [itex]\frac{1}{p(x')}[/itex]; in my case this would be [itex]\frac{1}{x'^2}[/itex].
    So that I reached that [itex]c_1=\frac{1}{3x'^3}[/itex] and [itex]c_2=\frac{1}{3} \left ( \frac{1}{x'^3} -1 \right )[/itex].
    Giving me finally that [itex]G(x,x')= \begin{cases} \frac{1}{3x'^3} \left ( \frac{1}{x} -x^2 \right ) \text{for } 1 \leq x <x' \\ \frac{1}{3x} \left ( \frac{1}{x'^3} -1 \right ) \text{for } x'< x \end{cases}[/itex].
    Now this is where I'm stuck. Now a particular solution to the non homogeneous DE is under the form [itex]y_p(x)=\int G(x,x')f(x')dx'[/itex]. Where I don't really know what are the limits of the integral. I guess I have to split the integral into 2 because the Green function changes after x=x'. So the first integral's lower limit would be 1 (I don't know what would be its upper limit) and the upper limit of the second integral would be infinity (but I don't know what would be its lower limit).
    I'd appreciate some more help and if what I did so far is ok. Thanks again!
     
  5. Nov 9, 2012 #4

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You messed up the algebra somewhere. I found that
    $$c_1 = \frac{1}{3x'}$$ so that
    $$G(x,x') = \begin{cases}
    \frac{1}{3x'}\left(\frac{1}{x}-x^2\right) & 1 \le x < x' \\
    \frac{1}{3x}\left(\frac{1}{x'}-x'^2\right) & x > x'
    \end{cases}.$$ Note the symmetry between x and x'. G(x,x') will always exhibit this kind of symmetry.
     
  6. Nov 9, 2012 #5

    fluidistic

    User Avatar
    Gold Member

    Thanks once again vela, I now reach exactly the same result as yours.
    However I am still stuck on the limits of the integral of [itex]y_p(x)=\int x' G(x,x')dx'[/itex].
    Because if it's worth [itex]\int _1 ^x x' \left ( \frac{1}{3x'} \right ) \left ( \frac{1}{x} -x^2 \right ) dx'+ \int _x ^{\infty}x' \left ( \frac{1}{3x} \right ) \left ( \frac{1}{x'} -x'^2 \right )[/itex] then I see that the second integral diverges, namely because I have to integrate [itex]x'^3[/itex] from x to infinity. Thus, I'm guessing my limits of integration are wrong.
     
  7. Nov 9, 2012 #6

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You have the integrals backwards. In the first integral, you have x'<x, so the form for G(x,x') is the second case.

    Either way, though, the integral to infinity diverges. I'm not sure what's going on.
     
  8. Nov 9, 2012 #7

    Mute

    User Avatar
    Homework Helper

    That symmetry is not a general property of Green's functions. The conditions under which the symmetry holds are given in this section of the wikipedia article on Green's functions.

    For the problem at hand, it may be instructive to solve the problem using variation of parameters or method of undetermined coefficients ("method of educated guessing") to see if you can identify what might be causing the issue. Once you find the solution, I suspect you may see why the Green's function approach isn't working. (I cheated and solved the DE with Mathematica; there is an issue with the problem as stated which will become obvious upon inspecting the general solution to the ODE).
     
    Last edited: Nov 9, 2012
  9. Nov 9, 2012 #8

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    It looks like the problem doesn't have a solution satisfying the boundary conditions. According to Wolfram alpha, the general solution is given by
    $$y = c_1 x^2 + \frac{c_2}{x} - \frac{x}{2},$$ which can't satisfy ##y(\infty)=0##.
     
  10. Nov 9, 2012 #9

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

  11. Nov 9, 2012 #10

    fluidistic

    User Avatar
    Gold Member

    Ok thank you very much guys. I've rechecked the problem statement and indeed, it's written "[itex]y(\infty ) =0[/itex]".
    But I have one question. The general solution is supposed to be the complementary ones (that I found solving the homogeneous DE via a substitution because it was a Cauchy-Euler equation) + a particular one (found via Green's function).
    Since we have "cheated" by looking at the general solution, we can see that the solution I'm supposed to find via the Green function is [itex]-\frac{x}{2}[/itex]. So I understand that we cannot find the general solution such that [itex]y(\infty ) =0[/itex] but I do not understand why the Green function method fails to find the "[itex]-\frac{x}{2}[/itex]" term.
     
  12. Nov 9, 2012 #11

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You might try finding a solution for boundary conditions that do work and see how it works out. Perhaps that'll yield some insights.
     
  13. Nov 10, 2012 #12

    fluidistic

    User Avatar
    Gold Member

    I see, our/my construction of the Green function depended strongly on the behavior of y on the boundaries (thus at infinity). So if we/I assume something impossible (that y at infinity is worth 0), no wonder we can't find a Green function that makes sense.
     
  14. Nov 10, 2012 #13

    Mute

    User Avatar
    Homework Helper

    Yes, that seems to be the case. I did a cursory search for something which might explain the situation more thoroughly, but didn't find anything.

    For a case which should work, you can use your Green's function to solve

    $$x^2 y'' - 2 y = \frac{1}{x}.$$

    I believe that should have a general, closed form solution which satisfies the desired boundary conditions.
     
  15. Nov 10, 2012 #14

    fluidistic

    User Avatar
    Gold Member

    I thought about the same equation (with the non homogeneous term equal to 1/x) but then I remembered that for my construction of the Green function, I had to assume that [itex]y(\infty )=0[/itex]. So that my [itex]G(x,x') = \begin{cases}
    \frac{1}{3x'}\left(\frac{1}{x}-x^2\right) & 1 \le x < x' \\
    \frac{1}{3x}\left(\frac{1}{x'}-x'^2\right) & x > x'
    \end{cases}[/itex] already assumes that [itex]y(\infty ) =0[/itex].
    However the complementary solution of [itex]x^2 y'' - 2 y = \frac{1}{x}[/itex] does not satisfy [itex]y(\infty ) =0[/itex] so I think that my Green function is useless for any equation of the type [itex]x^2 y'' - 2 y = f(x)[/itex] because [itex]y (\infty ) \neq 0[/itex], regardless of what f(x) is.
     
    Last edited: Nov 10, 2012
  16. Nov 10, 2012 #15

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    It turns out, you need to tweak the differential equation so that the differential operator is in self-adjoint form. In this case, you'll have
    $$y'' - \frac{2}{x^2} y = \frac{1}{x}.$$ The Green's function is as you found, but now the particular "solution" is given by
    $$y_p(x) = \int_1^\infty \frac{G(x,x')}{x'}\,dx' = \frac{1}{2x}-\frac{x}{2}.$$ You still can't satisfy the boundary conditions, but at least the x/2 term appears now.
     
  17. Nov 10, 2012 #16

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    I don't follow your reasoning here. The Green's function method does yield a valid solution if the righthand side is equal to 1/x.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook