Green's Function ODE Boundary Value Problem

In summary, using a change of variables, the Green's function for the given differential equation can be constructed and used to solve for the non-homogeneous boundary conditions. This results in a final solution for u(x) that satisfies the given conditions.
  • #1
bhavik22
5
0

Homework Statement



Use a Green's function to solve:

u" + 2u' + u = e-x

with u(0) = 0 and u(1) = 1 on 0[tex]\leq[/tex]x[tex]\leq[/tex]1

Homework Equations



This from the lecture notes in my course:

greensfunctions.jpg


The Attempt at a Solution



Solving for the homogeneous equation first:

u" + 2u' + u = 0

From the characteristic equation,

[tex]\lambda[/tex]2 + 2[tex]\lambda[/tex] + 1 = 0

[tex]\lambda[/tex] = -1 (repeated root)

Characteristic solution:

u1(x) = c1e-x and u2 = c2e-xx

To satisfy boundary conditions,

u(0) = c1e0 + c2e0(0)
c1 = 0

Thus take f(x) = e-xx

and

u(1) = c1e-1 + c2e-1(1)
get c1 = [tex]\frac{e}{2}[/tex] and c2 = [tex]\frac{e}{2}[/tex]

Thus take g(x) = [tex]\frac{1}{2}[/tex]e-x+1(x+1)

evaluating the wronskian, W = [tex]\frac{1}{2}[/tex]e-2x+1

I contruct green's function as per the formula provided above and carry out the integral and get final answer of,

u(x) = xe-x(x2 - 3)

which obviously doesn't satisfy the second boundary condition of u(1) = 1.

I found out the final solution from Wolfram alpha:

u = [tex]\frac{1}{2}[/tex]e-xx(x+2e-1)

I've also tried many different combinations of f(x) and g(x) but none seen to work

Any help appreciated !
 
Physics news on Phys.org
  • #2
bhavik22 said:
u(1) = c1e-1 + c2e-1(1)
get c1 = [tex]\frac{e}{2}[/tex] and c2 = [tex]\frac{e}{2}[/tex]

No, [itex]g(1)[/itex] must be zero, so you have

[tex]g(1)=c_1e^{-1}+c_2(1)e^{-2} \implies c_1=-c_2[/tex]
[tex]g(x)=c_1(1-x)e^{-x}[/tex]
 
  • #3
gabbagabbahey said:
No, [itex]g(1)[/itex] must be zero, so you have

[tex]g(1)=c_1e^{-1}+c_2(1)e^{-2} \implies c_1=-c_2[/tex]
[tex]g(x)=c_1(1-x)e^{-x}[/tex]

Apologies for the formatting, I couldn't get the proper characters to work for some reason.

Ok I used [tex]g(x)=c_1(1-x)e^{-x}[/tex] with c1 = 1 so [tex]g(x)=(1-x)e^{-x}[/tex]

and f(x) = e-x

get W = -e-2x

G(x,z) = -e-x x e-z(z-1)/-e-2z for 0<=x<=z

G(x,z) = -ze-z e-x(x-1)/-e-2z for z<=x<=1

Thus,

u(x) = (Integral from 0 to x) [-ze-z e-x(x-1)/-e-2z] dz + (Integral from x to 1) [-e-x x e-z(z-1)/-e-2z] dz

which evaluates to u(x) = 0 :confused:
 
  • #4
bhavik22 said:
Apologies for the formatting, I couldn't get the proper characters to work for some reason.

Ok I used [tex]g(x)=c_1(1-x)e^{-x}[/tex] with c1 = 1 so [tex]g(x)=(1-x)e^{-x}[/tex]

and f(x) = e-x
This is the wrong f(x). You had it right in your first post. It's f(x)=xe-x. Which f(x) did you use?
get W = -e-2x

G(x,z) = -e-x x e-z(z-1)/-e-2z for 0<=x<=z

G(x,z) = -ze-z e-x(x-1)/-e-2z for z<=x<=1

Thus,

u(x) = (Integral from 0 to x) [-ze-z e-x(x-1)/-e-2z] dz + (Integral from x to 1) [-e-x x e-z(z-1)/-e-2z] dz

which evaluates to u(x) = 0 :confused:
 
  • #5
vela said:
This is the wrong f(x). You had it right in your first post. It's f(x)=xe-x. Which f(x) did you use?

Ah I used the correct f(x) in the integral, just wrote it incorrectly in my second post
 
  • #6
Your Green's function looks correct, but in your integral for u(x), it looks like you got the x and z mixed up. Also, you still need to account for the boundary condition u(1)=1.
 
  • #7
vela said:
Your Green's function looks correct, but in your integral for u(x), it looks like you got the x and z mixed up. Also, you still need to account for the boundary condition u(1)=1.

In all the examples we're given you 'swap' the green's functions over to the other limits on the integral (so the green's function for x<=z<=1 is evaluated in the integral from 0 to x and the green's function for 0<=z<=x is evaluated in the integral from x to 1)?

So I went over the integral again and I did make some errors (forgot to write r(z) into the integral as well) so it becomes (i bolded the part I left out before):

u(x) = (Integral from 0 to x) [-ze-z e-x(x-1) e-z]/-e-2z dz + (Integral from x to 1) [-e-xx e-z(z-1) e-z]/-e-2z dz

which evaluated to u(x) = (1/2)e-xx(x-1) which is getting closer to the solution I posted in my original post.

Also, you still need to account for the boundary condition u(1)=1.

This is the crux of my misunderstanding and what's missing in the solution, in constructing Green's function I need to make g(x) vanish at the boundary but I don't know at what point or how I incorporate that I need u(1)=1 ?

Thanks
 
  • #8
bhavik22 said:
In all the examples we're given you 'swap' the green's functions over to the other limits on the integral (so the green's function for x<=z<=1 is evaluated in the integral from 0 to x and the green's function for 0<=z<=x is evaluated in the integral from x to 1)?
Yes, you're right (though you swapped the x and z when you wrote the limits here).
This is the crux of my misunderstanding and what's missing in the solution, in constructing Green's function I need to make g(x) vanish at the boundary but I don't know at what point or how I incorporate that I need u(1)=1?
You can change variables so that the problem meets the boundary condition requirement, in effect, converting the non-homogeneous boundary condition into non-homogenous terms in the differential equation. For example, w(x)=u(x)-x would vanish at both endpoints. Solving for u(x), you'd get u(x)=w(x)+x. Plug this into the differential equation to get the differential equation for w(x):

w''(x)+2w'(x)+w'(x) = e-x-x-2

Both u(x) and w(x) satisfy the same homogeneous equation, so the Green's function remains unchanged. Now you can integrate to solve for w(x) and then solve for u(x).
 
  • #9
vela said:
Yes, you're right (though you swapped the x and z when you wrote the limits here).

You can change variables so that the problem meets the boundary condition requirement, in effect, converting the non-homogeneous boundary condition into non-homogenous terms in the differential equation. For example, w(x)=u(x)-x would vanish at both endpoints. Solving for u(x), you'd get u(x)=w(x)+x. Plug this into the differential equation to get the differential equation for w(x):

w''(x)+2w'(x)+w'(x) = e-x-x-2

Both u(x) and w(x) satisfy the same homogeneous equation, so the Green's function remains unchanged. Now you can integrate to solve for w(x) and then solve for u(x).

It works! Using the change of variables the final result is u(x) = (1/2)xe-x(x + 2e - 1) which satisfies the BCs

Thanks a ton :smile:
 

Related to Green's Function ODE Boundary Value Problem

1. What is a Green's Function in the context of an ODE Boundary Value Problem?

A Green's Function is a mathematical tool used to solve a type of differential equation called a boundary value problem. It represents the response of the system to an impulse, or a localized disturbance, at a specific point in the domain of the problem.

2. How is a Green's Function used to solve an ODE Boundary Value Problem?

A Green's Function is used to solve an ODE Boundary Value Problem by first finding the Green's Function for the specific differential equation, which involves solving an auxiliary problem. Then, the Green's Function is convolved with the boundary conditions of the original problem to find the solution.

3. What is the importance of Green's Functions in solving ODE Boundary Value Problems?

Green's Functions are important in solving ODE Boundary Value Problems because they provide a systematic way to solve these types of equations, which may not have analytical solutions. They also allow for the solution to be expressed in terms of an easily calculated function, rather than a complex integral.

4. Can a Green's Function be used to solve any type of ODE Boundary Value Problem?

No, a Green's Function can only be used to solve linear ODE Boundary Value Problems. Nonlinear problems do not have Green's Functions, and therefore require different methods of solution.

5. Are there any limitations to using Green's Functions to solve ODE Boundary Value Problems?

Yes, one limitation is that Green's Functions can only be used for linear problems. Additionally, they may not exist for some problems or may be difficult to obtain. They also may not provide an explicit solution, as the solution may be expressed as an integral involving the Green's Function.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
785
  • Calculus and Beyond Homework Help
Replies
5
Views
729
  • Calculus and Beyond Homework Help
Replies
14
Views
544
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
805
  • Calculus and Beyond Homework Help
Replies
2
Views
878
  • Calculus and Beyond Homework Help
Replies
3
Views
501
  • Calculus and Beyond Homework Help
Replies
11
Views
860
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
Back
Top