Green's Function ODE Boundary Value Problem

Click For Summary
The discussion revolves around solving the boundary value problem defined by the differential equation u" + 2u' + u = e-x with boundary conditions u(0) = 0 and u(1) = 1 using Green's functions. Initial attempts to find the solution involved determining the homogeneous solution and constructing the Green's function, but the results did not satisfy the boundary conditions. A key breakthrough occurred when a change of variables was suggested, allowing the transformation of the problem to meet the boundary conditions more effectively. Ultimately, the correct solution was found to be u(x) = (1/2)xe-x(x + 2e - 1), which satisfies both boundary conditions. This approach highlights the importance of correctly incorporating boundary conditions when using Green's functions in differential equations.
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
5
Views
2K
Replies
6
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 16 ·
Replies
16
Views
2K