Green's Function ODE Boundary Value Problem

Click For Summary

Homework Help Overview

The discussion revolves around solving a boundary value problem using Green's functions for the ordinary differential equation \( u'' + 2u' + u = e^{-x} \) with boundary conditions \( u(0) = 0 \) and \( u(1) = 1 \) over the interval \( 0 \leq x \leq 1 \.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Participants explore the construction of Green's functions and the implications of boundary conditions on the solution. There are attempts to derive the homogeneous solution and construct the Green's function, with some questioning the choice of functions used in the process.

Discussion Status

Multiple interpretations and approaches are being discussed, with participants providing feedback on each other's attempts. Some guidance has been offered regarding the correct form of the Green's function and the need to satisfy boundary conditions, but no consensus has been reached on a complete solution.

Contextual Notes

Participants note the importance of ensuring that the constructed Green's function satisfies the boundary conditions, particularly the condition at \( u(1) = 1 \). There is also mention of potential errors in the integration process and the need to correctly set up the integrals based on the defined limits.

bhavik22
Messages
5
Reaction score
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\leqx\leq1

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,

\lambda2 + 2\lambda + 1 = 0

\lambda = -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 = \frac{e}{2} and c2 = \frac{e}{2}

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

evaluating the wronskian, W = \frac{1}{2}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 = \frac{1}{2}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
bhavik22 said:
u(1) = c1e-1 + c2e-1(1)
get c1 = \frac{e}{2} and c2 = \frac{e}{2}

No, g(1) must be zero, so you have

g(1)=c_1e^{-1}+c_2(1)e^{-2} \implies c_1=-c_2
g(x)=c_1(1-x)e^{-x}
 
gabbagabbahey said:
No, g(1) must be zero, so you have

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

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

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

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:
 
bhavik22 said:
Apologies for the formatting, I couldn't get the proper characters to work for some reason.

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

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:
 
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
 
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.
 
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
 
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).
 
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:
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
5
Views
2K
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K