Boundary Conditions and Trig Identities in Solving Differential Equations

In summary, the student is confused because they are not understanding how the solution works when the boundary conditions are symmetric around zero. The given solution is A*sin(x)+B*cos(x), but this does not imply that B=-B. The student is supposed to use the boundary conditions to deduce information about the sin and cos arguments, and then solve for A and B.
  • #1
mhazelm
41
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
  • #2
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?
 
  • #3
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?
 
  • #4
It doesn't change anything physically. But sin and cos differ only by a translation. Right?
 
  • #5
Aha, I see where we are going. This is very true. So it is entirely feasible that I get a different answer.
 
  • #6
Right. If you change the coordinates sin's change into cos's.
 
  • #7
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)?
 
  • #8
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.
 
  • #9
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!
 

1. What is a boundary value problem?

A boundary value problem is a type of mathematical problem where the solution is required to satisfy certain conditions at the boundaries of the domain. It involves finding a function that satisfies a given set of differential equations, subject to specified boundary conditions.

2. What are the applications of boundary value problems?

Boundary value problems have a wide range of applications in physics, engineering, and other fields. They are used to model physical systems such as heat transfer, fluid dynamics, and electrostatics. They are also used in the design and optimization of structures, control systems, and electronic circuits.

3. How is a boundary value problem different from an initial value problem?

A boundary value problem differs from an initial value problem in that the former involves determining the solution at specific points on the boundary of the domain, while the latter involves finding the solution at a single point within the domain. In other words, boundary value problems involve specifying conditions at the boundaries, while initial value problems involve specifying conditions at a single starting point.

4. What are some common techniques for solving boundary value problems?

There are various techniques for solving boundary value problems, such as the shooting method, finite difference method, finite element method, and spectral methods. The choice of method depends on the type of problem and the complexity of the solution. Each method has its own advantages and limitations.

5. What are the challenges in solving boundary value problems?

Solving boundary value problems can be challenging due to the complexity of the mathematical equations involved, as well as the need for accurate and efficient numerical methods. In some cases, there may not be an exact analytical solution, and numerical approximations are required. Additionally, the choice of boundary conditions can greatly affect the difficulty of the problem and the accuracy of the solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
13
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
525
  • Calculus and Beyond Homework Help
Replies
6
Views
390
  • Calculus and Beyond Homework Help
Replies
3
Views
562
Replies
12
Views
382
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
917
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
940
  • Calculus and Beyond Homework Help
Replies
8
Views
235
Back
Top