Boundary Conditions and Trig Identities in Solving Differential Equations

mhazelm
Messages
41
Reaction score
0

Homework Statement



I have the solution to the differential equation : Phi = A*sin(x) + B*cos(x) and need to apply the boundary conditions Phi(-a/2) = Phi(a/2) = 0.

Homework Equations





The Attempt at a Solution



I am confused. If I plug these in, then I get

A*sin(-ka/2) = - B*cos(-ka/2) and since cos is even, cos(-x) = -cos(x) and sin is odd, so using these we get

Asin(ka/2) = B cos(ka/2).

Similarly, with ka/2 we get that Asin(ka/2) = - B cos(ka/2). But Asin(ka/2) = B cos(ka/2) as well, so doesn't this imply that B=-B so that B must be 0?

That's what I thought...

but the answer to my original problem gives both a sine and cosine solution to Phi. I'm very confused about how this is possible if B = 0, I must be making a mistake somewhere. Am I supposed to infer instead that ka/2 = n*Pi/4?? I'm quite confused.
 
Physics news on Phys.org
That's really confusing. If the boundary conditions are symmetric around zero, and the solution is A*sin(x)+B*cos(x) then A must vanish, not B. Can you state the exact problem and the given solution?
 
Sure. The differential equation is given by (Phi)" + (k^2)Phi = 0, so I found that a solution would be Phi = A*sin(kx) + B*cos(kx). I left out the k in my first question, because it's just a detail. My boundary conditions are Phi(-a/2) = Phi(a/2) = 0. From what you said, is A supposed to be 0 due to the fact that the sine term is odd?

This is actually a modern physics question, with a particle in a 1d box. I've done the same problem for the boundary values Phi(0) = Phi(a) = 0, which was quite easy (for those boundary conditions).

In general, since I have just shifted my potential by 1/2, should I expect a different answer? Maybe it is supposed to be the same as the Phi(0) = Phi(a) case. How does a translation change anything physically?
 
It doesn't change anything physically. But sin and cos differ only by a translation. Right?
 
Aha, I see where we are going. This is very true. So it is entirely feasible that I get a different answer.
 
Right. If you change the coordinates sin's change into cos's.
 
Ok. This makes sense. I'm still not clear on how to get the answer in my book, though. Apparently what I am supposed to get is

Phi = sqrt(2/a)*sin(n*Pi*x/a) for n = 2j (where j is some integer),

Phi = sqrt(2/a)*cos(n*Pi*x/a) for n = 2j+1 (j in Z).

The sqrt of 2/a comes from normalizing the |Phi|^2 - since |Phi|^2 is a probability density function, we can integrate it over its whole domain and set the integral equal to 1, then solve for constant in my solution... supposedly. But from what we just concluded wouldn't A be 0 (since now the sine term should vanish after the translation)?
 
I was wrong. It's a boundary value problem. Sorry. E.g. cos(-pi/2)=cos(pi/2)=0. sin(pi)=sin(-pi)=0. cos(3*pi/2)=cos(-3*pi/2)=0. sin(2*pi)=sin(-2*pi)=0. Do you see how this even-odd thing applies to your problem? Sorry I got all muddled.
 
Kind of. So rather than using my boundary conditions to solve the constants A and B, I should use them to deduce the information about the sine and cosine arguments. Then, I should be able to find A and B in the normalization step?

Thanks for so much help by the way ;)
 
  • #10
Gack. The point is that phi=a*cos(kx)+b*sin(kx). That's the same as sqrt(a^2+b^2)*sin(kx+phase) or sqrt(a^2+b^2)*cos(kx+phase-pi/2) by trig identities. The book has chosen to write different values of k using cos and sin with zero total phase. They are both still sinusoidal functions. I can't believe I'm balling up this explanation so badly.
 
  • #11
Your explanation is good - it's my ODE memory that's making this hard ;) but it kind of makes sense. In other words, they've just manipulated the answer with a trig. identity. Well, now that it's morning, I'm going to track down my professor and ask him about this!

Thank you though!
 
Back
Top