How Do You Solve a Differential Equation Using Green's Function?

In summary, the student is trying to solve an equation for y and is having trouble with the limits of integration. They use WolframAlpha to simplify the equations and end up with a solution for G.
  • #1
BiGyElLoWhAt
Gold Member
1,622
131

Homework Statement


Find the green's function for y'' +2y' +2y = 0 with boundary conditions y(0)=y'(0)=0
and use it to solve y'' + 2y' +2y = e^(-2x)

Homework Equations


##y = \int_a^b G(x,z)f(z)dz##

The Attempt at a Solution


I'm going to rush through the first bit. If you need a specific step, I can include it later, but I think a lot of the early steps are pretty self-explanatory.
##\lambda^2 +2\lambda + 2 = 0 \to \lambda = -1 \pm i##
##G' = 1##
##G(x,z) = \left\{ \begin{array}{ll}
Ae^{-(1-i)x} + Be^{-(1+i)x} & z<x \\
Ce^{-(1-i)x} + De^{-(1+i)x} & x<z
\end{array} \right. ##
##y(0)= 0 \to A=-B##
##y'(0)=0 \to -(1-i)A = B(1+i) \to A=B=0##
Continuity:
##Ce^{-(1-i)z} + De^{-(1+i)z} = 0 \to C = -De^{-1+i)z}e^{(1-i)z} = -De^{2iz}##
##-(1-i)Ce^{-(1-i)z} -(1+i)De^{-(1+i)z} = 1 \to (1-i)De^{2iz}e^{-(1-i)z} -(1+i)De^{-(1+i)z} = 1##
##1= D[(1-i)e^{(-1+i)z} - (1+i)e^{-(1+i)z}]=1##
##D = \frac{1}{(1-i)e^{(-1+i)z} - (1+i)e^{-(1+i)z}} ##& ##C=\frac{-e^{-2iz}}{(1-i)e^{(-1+i)z} - (1+i)e^{-(1+i)z}}##

Which leaves us with

##G(x,z) = \left\{ \begin{array}{ll}
0 & z<x \\
\frac{-e^{-(2iz)}e^{-(1-i)x} + e^{-(1+i)x}}{(1-i)e^{(-1+i)z} - (1+i)e^{-(1+i)z}} & x<z
\end{array} \right. ##

Assuming this is correct thus far, I am not sure how to get y.
I'm thinking that the limits of my integral should be from 0 to infinity, but G is zero from 0 to x, so really we need to integrate from x to infinity.
I let wolfram do some simplification for me and we have:
##(\frac{1}{2} + \frac{i}{2} )\int_x^\infty \frac{e^{-(1+i)z} +e^{2iz}}{e^{2iz}-i}##
Which I am not quite sure how to evaluate. It looks like it should converge to a value, since the numerator is "smaller" than the denominator (break it up into 2 terms, and you have [e^-stuff/ e^+things] + [e^stuff/e^stuff + i]) Is there a simple way to evaluate this? Wolfram exceeds computation time.
 
Last edited:
Physics news on Phys.org
  • #2
One thing you can do to simplify your calculations is to write the homogeneous solution as ##e^{-x}(A \cos x + B \sin x)##. The Green's function I get is ##G(x,z) = e^{-(t-z)}\sin(t-z)##. Note the symmetry between x and z. That's typical of a Green's function.

I don't think you meant for ##G## to be a function of ##y##, did you? ##y## is the solution to the differential equation.

To get ##y##, you multiply ##G## by ##f(z) = e^{-2z}## and integrate.
 
  • #3
Do I integrate from 0 to infinity, though? No, that is a typo, should be G(x,z). My book actually doesn't say much about the limits.
Riley Hobson & Bense said:
Let us suppose that a function G(x, z) (the Green’s function) exists such that the
general solution to (15.59), which obeys some set of imposed boundary conditions
in the range a ≤ x ≤ b, is given by
##y(x) = \int_a^b G(x,z)f(z)dz##
where z is the integration variable.
[...shows how to solve for G...]
In addition to (15.62), we must impose two further sets of restrictions on
G(x, z). The first is the requirement that the general solution y(x) in (15.60) obeys
the boundary conditions. For homogeneous boundary conditions, in which y(x)
and/or its derivatives are required to be zero at specified points, this is most
simply arranged by demanding that G(x, z) itself obeys the boundary conditions
when it is considered as a function of x alone; if, for example, we require
y(a) = y(b) = 0 then we should also demand G(a, z) = G(b, z) = 0. Problems
having inhomogeneous boundary conditions are discussed at the end of this
subsection.
 
  • #4
I'm not seeing how you arrived at such a simple explanation.
Using the homogeneous boundaries, we get A=B=0
Using continuity of G we get
##C=-Dtan(z)##
Using discontinuity of G'
##e^{-z}[-(Ccos(z) + Dsin(z)) + Dcos(z)-Csin(z))] = 1##
##e^{-z}[-2Dsin(z) +Dcos(Z)-Dsin(z)tan(z)] = 1##
##e^z = D(-2sin(z)+cos(z)- sin^2(z)/cos(z))##
##D= \frac{e^z}{cos(z) - 2sin(z) - \frac{sin^2(z)}{cos(z)}} = \frac{e^z}{cos^2(z) - sin^2(z) - 2sin(z)cos(z)} = \frac{e^zcos(z)}{cos(2z)-sin(2z)}##
##C=\frac{-e^zsin(z)}{cos(2z)-sin(2z)}##
##G = \frac{e^{z-x}(cos(z)sin(x)-sin(z)cos(x))}{cos(2z)-sin(2z)}##
which can be simplified down to
##\frac{e^{z-x}sin(x-z)}{cos(2z)-sin(2z)}## or ##\frac{e^{-(x-z)}sin(x-z)}{cos(2z)-sin(2z)}##
This is pretty close to what you have, but I'm not sure what happened to your denominator.
 
  • #5
I found a - sign error in my work. I subbed in C = Dtan(z) instead of -Dtan(z). I now have the same greens function as you, which I should be able to integrate. We shall see =D.
 
  • #6
So I got -1/2e^-2x, however, shouldn't I have 2 linearly independent solutions?
 
  • #7
No, you're finding the particular solution. After all, the result you get depends of f(x).

Never mind. This is at best misleading.
 
Last edited:
  • #8
BiGyElLoWhAt said:

Homework Statement


Find the green's function for y'' +2y' +2y = 0 with boundary conditions y(0)=y'(0)=0
and use it to solve y'' + 2y' +2y = e^(-2x)

Homework Equations


##y = \int_a^b G(x,z)f(z)dz##

The Attempt at a Solution


I'm going to rush through the first bit. If you need a specific step, I can include it later, but I think a lot of the early steps are pretty self-explanatory.
##\lambda^2 +2\lambda + 2 = 0 \to \lambda = -1 \pm i##
##G' = 1##
##G(x,z) = \left\{ \begin{array}{ll}
Ae^{-(1-i)x} + Be^{-(1+i)x} & z<x \\
Ce^{-(1-i)x} + De^{-(1+i)x} & x<z
\end{array} \right. ##
##y(0)= 0 \to A=-B##
##y'(0)=0 \to -(1-i)A = B(1+i) \to A=B=0##
Continuity:
##Ce^{-(1-i)z} + De^{-(1+i)z} = 0 \to C = -De^{-1+i)z}e^{(1-i)z} = -De^{2iz}##
##-(1-i)Ce^{-(1-i)z} -(1+i)De^{-(1+i)z} = 1 \to (1-i)De^{2iz}e^{-(1-i)z} -(1+i)De^{-(1+i)z} = 1##
##1= D[(1-i)e^{(-1+i)z} - (1+i)e^{-(1+i)z}]=1##
##D = \frac{1}{(1-i)e^{(-1+i)z} - (1+i)e^{-(1+i)z}} ##& ##C=\frac{-e^{-2iz}}{(1-i)e^{(-1+i)z} - (1+i)e^{-(1+i)z}}##

Which leaves us with

##G(x,z) = \left\{ \begin{array}{ll}
0 & z<x \\
\frac{-e^{-(2iz)}e^{-(1-i)x} + e^{-(1+i)x}}{(1-i)e^{(-1+i)z} - (1+i)e^{-(1+i)z}} & x<z
\end{array} \right. ##

Assuming this is correct thus far, I am not sure how to get y.
I'm thinking that the limits of my integral should be from 0 to infinity, but G is zero from 0 to x, so really we need to integrate from x to infinity.
I let wolfram do some simplification for me and we have:
##(\frac{1}{2} + \frac{i}{2} )\int_x^\infty \frac{e^{-(1+i)z} +e^{2iz}}{e^{2iz}-i}##
Which I am not quite sure how to evaluate. It looks like it should converge to a value, since the numerator is "smaller" than the denominator (break it up into 2 terms, and you have [e^-stuff/ e^+things] + [e^stuff/e^stuff + i]) Is there a simple way to evaluate this? Wolfram exceeds computation time.

A particular solution for ##x >## is ##y_p(x) = \int_{z=0}^{\infty} G(x,z) f(z) \, dz##, but since your ##G## vanishes when ##z < x##, the integral actually goes from ##z = x## to ##z = \infty##.

BTW: there is no reason at all to impose boundary conditions like ##G(0,z)=0## and ##G_x(0,z)=0## on the Green's function itself (and the wording of the problem left this ambiguous in my opinion). It is your final solution ##y(x) = y_0(x) + y_p(x)## that needs to satisfy that boundary condition, and that can be achieved by picking appropriate constants in the homogeneous solution ##y_0(x)##.
 
Last edited:
  • Like
Likes BiGyElLoWhAt
  • #9
Hmmm... ok. I don't disagree with what you're saying, but I was following along with the book. (Riley,hobson, bence) where you take care of them in G, and the homogeneous conditions apply directly, and for inhomogeneous you subtract a line from G. Is it easier to take care of the conditions in y? If you take care of them in y, then you have more integrals to calculate.
 
  • #10
Checking a few sources, I found the Green's function by definition is constructed to satisfy homogeneous boundary conditions, so you should apply the given boundary conditions when determining ##G##. The solution found from such a Green's function then automatically satisfies those boundary conditions.

It looks like we've all been a little careless here. The Green's function I found was
$$G(x,z) = \begin{cases}
0 & x \le z \\
e^{-(x-z)}\sin(x-z) & x > z
\end{cases}$$ with an implicit assumption that ##z>0##. In your original post, you have ##x<z## and ##x>z## switched, but your work seems to assume the opposite.

Integrating to find the solution, we then get
$$y(x) = \int_0^\infty G(x,z)f(z)\,dz = \int_0^x G(x,z)f(z)\,dz = \frac{1}{2} (e^{-2 x} + e^{-x} \sin x- e^{-x} \cos x)$$ for ##x>0##. The integral ends up being from 0 to ##x## because ##G## vanishes when ##z>x##. Note that the terms you'd expect from the homogeneous solution of the differential equation appear and that the solution indeed satisfies the boundary conditions ##y(0) = 0## and ##y'(0) = 0##.
 
  • #11
BiGyElLoWhAt said:
Do I integrate from 0 to infinity, though? My book actually doesn't say much about the limits.
Your book probably discusses boundary conditions specified at ##x=a## and ##x=b##. and in that case, you'd integrate over the interval ##[a,b]##. In this problem, you were only given conditions at ##x=a=0##. There's no other end to the interval specified, so you should just let ##b## go to ##\infty##.

I suppose you could also consider the case where you take ##b=0## and integrate from ##a=-\infty##, but I think the intent of the problem is to assume ##a=0##.
 

Related to How Do You Solve a Differential Equation Using Green's Function?

1. What is a Green's Function?

A Green's Function is a mathematical concept used to solve differential equations in physics and engineering. It represents the response of a system to a unit impulse or point source at a specific location.

2. How is a Green's Function related to integrals?

A Green's Function is often represented as an integral, where the integral represents the solution to a differential equation. It is used to solve linear differential equations with boundary conditions.

3. What is the significance of Green's Functions in physics?

Green's Functions are essential in many areas of physics, such as electrostatics, fluid dynamics, and quantum mechanics. They allow for the solution of complex differential equations and provide a way to understand the behavior of physical systems.

4. How is a Green's Function calculated?

The calculation of a Green's Function depends on the specific differential equation and boundary conditions being solved. It involves using specific mathematical techniques, such as Fourier transforms or Laplace transforms, to transform the differential equation into an integral equation, which can then be solved for the Green's Function.

5. Can Green's Functions be used for non-linear systems?

No, Green's Functions are only applicable to linear systems. Non-linear systems require different mathematical techniques for solving differential equations.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
715
  • Calculus and Beyond Homework Help
Replies
1
Views
735
  • Calculus and Beyond Homework Help
Replies
2
Views
543
  • Calculus and Beyond Homework Help
Replies
7
Views
592
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
801
  • Calculus and Beyond Homework Help
Replies
14
Views
347
  • Calculus and Beyond Homework Help
Replies
5
Views
664
  • Calculus and Beyond Homework Help
Replies
6
Views
351
Back
Top