Finding Green's Function for u''(x) + u(x) = f(x) with Boundary Conditions

There, you've done it again! You've answered the question. The OP only wanted a summary of the conversation, not an entire new explanation.In summary, there was a discussion about finding the Green's function for a differential equation with boundary conditions. Ray suggested using the property that the Green's function satisfies a particular equation and applying continuity and jump conditions to find the constants in the Green's function. Svein then pointed out that it is not necessary to use the particular boundary conditions given and that the same Green's function could be used for different problems with different boundary conditions. Finally, Mark44 provided some additional information on Sturm-Liouville problems and their properties.
  • #1
member 428835

Homework Statement


Find Green's function for ##u''(x) + u(x) = f(x)## subject to ##u(0) = A## and ##u(\pi) + u'(\pi) = B##.

Homework Equations


No set equation.

The Attempt at a Solution


I begin by recognizing that green's function ##G## satisfies ##G''(x) + G(x) = \delta(x - x_0)## subject to ##G(0) = 0## and ##G(\pi) + G'(\pi) = 0##. Now when ##x \neq x_0## we have ##G'' + G = 0##. Thus ##G = A \sin x + B \cos x##. ##G(0) = 0 \implies B=0##. However, ##G(\pi) + G'(\pi) = 0 \implies A = 0##. Thus zero is the solution.

I know I'm doing something wrong. Any help is greatly appreciated.
 
Physics news on Phys.org
  • #2
I think you are confusing Green's function and the solution to your equation (u(x)).
 
  • #3
I don't think I am. I have gotten similar problems correct using this same technique, only the other problems had different boundary conditions. Maybe you (or someone) knows a different technique?
 
  • #4
joshmccraney said:

Homework Statement


Find Green's function for ##u''(x) + u(x) = f(x)## subject to ##u(0) = A## and ##u(\pi) + u'(\pi) = B##.

Homework Equations


No set equation.

The Attempt at a Solution


I begin by recognizing that green's function ##G## satisfies ##G''(x) + G(x) = \delta(x - x_0)## subject to ##G(0) = 0## and ##G(\pi) + G'(\pi) = 0##. Now when ##x \neq x_0## we have ##G'' + G = 0##. Thus ##G = A \sin x + B \cos x##. ##G(0) = 0 \implies B=0##. However, ##G(\pi) + G'(\pi) = 0 \implies A = 0##. Thus zero is the solution.

I know I'm doing something wrong. Any help is greatly appreciated.

For ##x < x_0## we have ##G(x) = A_1 \sin(x) + B_1 \cos(x)## and for ##x > x_0## we have ##G(x) = A_2 \sin(x) + B_2 \cos(x)##. We want ##G## to be continuous at ##x =x_0##. Furthermore, we have
[tex] \int_{x_0 - \epsilon}^{x_0+\epsilon} G''(x) \, dx + \int_{x_0 - \epsilon}^{x_0+\epsilon} G(x) \, dx = \int_{x_0 - \epsilon}^{x_0+\epsilon} \delta(x-x_0) \, dx = 1 [/tex]
The second term on the left goes to zero as ##\epsilon \to 0##, while the first term on the left goes to ##G'(x_0+0) - G'(x_0-0)##, so ##G'(x)## must have a jump discontinuity of size 1 as ##x## passes from left to right through ##x_0##. Thus:
[tex] A_1 \sin(x_0) + B_1 \cos(x_0) = A_2 \sin(x_0) + B_2 \cos(x_0) \; \text{(continuity)}\\
1+A_1 \cos(x_0) - B_1 \sin(x_0) = A_2 \cos(x_0) - B_2 \sin(x_0)\; \text{(jump disconuity)} [/tex]
If ##x_0 > 0## we can have ##G(0) = 0## by taking ##B_1 = 0## and if ##x_0 < \pi## we can have ##G(\pi) + G'(\pi) = 0## by taking ##A_2 + B_2 = 0##. This gives four equations in the four unknowns ##A_1,B_1,A_2,B_2##.
 
  • Like
Likes member 428835
  • #5
Thanks Ray! I've got to go to bed now (it's late over here) but in the morning I'll post my solution if you want? If not, thanks so much!
 
  • #6
Ohhh, and I think I see what you now mean, Svein! Thanks!
 
  • #7
joshmccraney said:
Thanks Ray! I've got to go to bed now (it's late over here) but in the morning I'll post my solution if you want? If not, thanks so much!

Actually, the previous approach is too complicated. The problem is your insistence on the boundary conditions ##G(0) = 0## and ##G(\pi) + G'(\pi) = 0##. These are unnecessary, as the place you want the BCs to apply is on the whole solution ##u(x)##, which you can do by selecting the appropriate constants in the homogeneous solution.

More importantly, if you forget about the BCs on ##G(x)## you can re-use the same ##G## in many different problems, rather than developing a new one every time you change the BCs on the solution ##u##.

So, I would just re-do the stuff above by setting (for instance) ##G(x) = A \sin(x)## for ##x < x_0## and ##G(x) = B \cos(x)## for ##x > x_0##. Now the only conditions are continuity of ##G## at ##x_0## and the jump discontinuity in ##G'(x)## at ##x_0##.
 
  • #8
Thanks, and I see your point. This is great!
 
  • #9
I'm going to disagree a bit with Ray's last post. You need to apply homogeneous boundary conditions when finding the Green's function. In fact, that's what you've done when you say that ##G(x)=A_1\sin x## for ##x<x_0##. You can only discard the cosine term because you require that G(0)=0.

The solution u(x) to the differential equation with the inhomogeneous boundary conditions consists of a particular solution, which you can write in terms of ##f## and the Green's function, and a homogeneous solution, with its arbitrary constants. You set the values of those constants so that the inhomogeneous boundary conditions are satisfied.
 
  • #10
vela said:
I'm going to disagree a bit with Ray's last post. You need to apply homogeneous boundary conditions when finding the Green's function. In fact, that's what you've done when you say that ##G(x)=A_1\sin x## for ##x<x_0##. You can only discard the cosine term because you require that G(0)=0.

The solution u(x) to the differential equation with the inhomogeneous boundary conditions consists of a particular solution, which you can write in terms of ##f## and the Green's function, and a homogeneous solution, with its arbitrary constants. You set the values of those constants so that the inhomogeneous boundary conditions are satisfied.

We could have obtained a perfectly good Green's function for this problem if we had taken, instead, ##G(x) = A \cos(x)## for ##x < x_0## and ##G(x) = B \sin(x)## for ##x > x_0##. We would get a different ##G##, of course, and hence a different inhomogeneous solution ##\int_0^{\pi} G(x,x_0) f(x_0) \, dx_0##, whose conditions at 0 and ##\pi## would also be different. But to get the whole solution ##u(x)## we would just need to use altered boundary conditions on the homogeneous solution.
 
  • #11
(Lecturer mode on): The problem in the OP is what we call a Sturm-Liouville problem. It is based on a differential operator S = (p(x)⋅u'(x))' - q(x)⋅u(x). In the OP, p(x)≡1 and q(x)≡-1. The operator S is symmetrical with respect to the standard L2 scalar product.

Now, if the equation S = 0 has no solution among the twice differentiable functions with given boundary conditions, the operator S is said to be non-singular. It can be shown that if S is non-singular, an inverse operator A exists, which is a Fredholm operator with a continuous symmetric kernel. This kernel is called Green's function. Operating on the equation S = f with the operator A, we get A(S) = A(f). Since A(S)=u, we have u = A(f).
(Lecturer mode off) Whew - anybody want to finish this?
 
  • #12
Ray Vickson said:
We could have obtained a perfectly good Green's function for this problem if we had taken, instead, ##G(x) = A \cos(x)## for ##x < x_0## and ##G(x) = B \sin(x)## for ##x > x_0##. We would get a different ##G##, of course, and hence a different inhomogeneous solution ##\int_0^{\pi} G(x,x_0) f(x_0) \, dx_0##, whose conditions at 0 and ##\pi## would also be different. But to get the whole solution ##u(x)## we would just need to use altered boundary conditions on the homogeneous solution.
You're right. However, the correct solution to this particular problem depends on the definition of the Green's function the OP is supposed to use. It's not uncommon that the definition includes satisfying a set of homogeneous boundary conditions.
 
  • #13
To create Green's function, we need two solutions of S=0, fulfilling one of the boundary conditions each. Now, as has been shown already, u2(x) = sin(x) is a solution that satisfies u2(0) = 0. In the same way u1(x) = cos(x) - sin(x) satisfies u1(π) + u1'(π) = 0. Therefore, Green's function is given by [itex] \frac{1}{c_{0}}u1(x)u2(\xi)=\frac{1}{c_{0}}(cos(x)-sin(x))sin(\xi)[/itex] for ξ<x and [itex]\frac{1}{c_{0}}u1(\xi)u2(x)=\frac{1}{c_{0}}(cos(\xi)-sin(\xi))sin(x) [/itex] for ξ>x (c0 is a constant to be calculated).
 
  • #14
Svein said:
To create Green's function, we need two solutions of S=0, fulfilling one of the boundary conditions each. Now, as has been shown already, u2(x) = sin(x) is a solution that satisfies u2(0) = 0. In the same way u1(x) = cos(x) - sin(x) satisfies u1(π) + u1'(π) = 0. Therefore, Green's function is given by [itex] \frac{1}{c_{0}}u1(x)u2(\xi)=\frac{1}{c_{0}}(cos(x)-sin(x))sin(\xi)[/itex] for ξ<x and [itex]\frac{1}{c_{0}}u1(\xi)u2(x)=\frac{1}{c_{0}}(cos(\xi)-sin(\xi))sin(x) [/itex] for ξ>x (c0 is a constant to be calculated).

One perfectly good Green's function that does not satisfy both boundary conditions is
[tex] G_1(x,s) = \begin{cases} 0 & x < s \\ \sin(x-s) & x \geq s \end{cases} [/tex]
Another perfectly good Green's function would be
[tex] G_2(x,s) = \begin{cases} \sin(s-x) & x < s \\ 0 & x \geq s \end{cases} [/tex]
Each of them satisfies one of the two boundary conditions, but not the other. There are other Green's functions for the problem that do not satisfy either boundary condition, such as ##G_3(x,s) = G_1(x,s) + \cos(x-s)##. However, in all cases the solution
[tex] u(x) = A \sin(x) + B \cos(x) + \int_0^{\pi} G(x,s) f(s) \, ds [/tex]
can be made to satisfy the boundary conditions ##u(0)=0, u(\pi) + u'(\pi) = 0## by adjusting the values of ##A,B## in the homogeneous solution.
 

FAQ: Finding Green's Function for u''(x) + u(x) = f(x) with Boundary Conditions

What is the purpose of finding Green's function for u''(x) + u(x) = f(x)?

The purpose of finding Green's function for u''(x) + u(x) = f(x) is to solve a differential equation with a known forcing function f(x) and boundary conditions. Green's function is a fundamental solution that allows us to find the particular solution for any given forcing function and boundary conditions.

How is Green's function related to the solution of the differential equation?

Green's function is related to the solution of the differential equation by the fact that it is a fundamental solution that satisfies the homogeneous equation u''(x) + u(x) = 0 and the boundary conditions. By using Green's function, we can construct the particular solution for any given forcing function f(x) and boundary conditions.

What are the steps for finding Green's function for u''(x) + u(x) = f(x) with boundary conditions?

The steps for finding Green's function for u''(x) + u(x) = f(x) with boundary conditions are as follows:

  1. Solve the homogeneous equation u''(x) + u(x) = 0 with the given boundary conditions. This will be the general solution of the differential equation.
  2. Construct the Green's function g(x,t) by taking the general solution and setting the independent variable t equal to the boundary value x.
  3. Use the boundary conditions to determine the value of the constant in the Green's function.
  4. The particular solution for the given forcing function f(x) is then given by the integral of g(x,t) multiplied by f(t) with respect to t.

What are the applications of Green's function in science and engineering?

Green's function has various applications in science and engineering, including:

  • In physics, Green's function is used to solve problems involving wave propagation, heat conduction, and quantum mechanics.
  • In engineering, Green's function is used to solve problems in acoustics, electromagnetics, and structural mechanics.
  • In mathematics, Green's function is used to solve boundary value problems in different areas such as partial differential equations, integral equations, and potential theory.

Are there any limitations to using Green's function for solving differential equations?

Yes, there are some limitations to using Green's function for solving differential equations. The method can only be applied to linear differential equations with constant coefficients and homogeneous boundary conditions. Additionally, finding Green's function can be a complex and time-consuming process, and may not always be possible for certain types of differential equations.

Similar threads

Back
Top