• Support PF! Buy your school textbooks, materials and every day products Here!

PDE - Separation of Variables

  • Thread starter erok81
  • Start date
  • #1
464
0

Homework Statement



Solve the boundary value problem for a string of unit length, subject to the given conditions.

[tex]f(x)=0.05sin \pi x, g(x)=0, c=\frac{1}{\pi}[/tex]

Homework Equations



Model: u(x,t)=X(x)T(t)

Which yields two separated equations by the one dimensional wave equation.

X''-kX=0 and T''-kc2T=0

The Attempt at a Solution



This is my first problem using this new tool to solve PDE's, so I'll probably need a few tips along the way.

So I start by solving X''-kX=0 since my boundary conditions are in x. (is this right? the book's example starts like that)

This is the point I am stuck on. I think in order to start solving I need to apply the boundary conditions, I assume to avoid non trivial solutions? I can start solving my new ODE in x, but I think I am missing a step in-between?
 

Answers and Replies

  • #2
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
X''-kX=0 and T''-kc2T=0
If k>0, then you have a sign error. The equations should read

X''+kX=0 and T''+kc2T=0

otherwise you won't get periodic solutions.

This is the point I am stuck on. I think in order to start solving I need to apply the boundary conditions, I assume to avoid non trivial solutions? I can start solving my new ODE in x, but I think I am missing a step in-between?
Find the most general solution to the odes first and then apply the boundary condition.
 
  • #3
464
0
If k>0, then you have a sign error. The equations should read

X''+kX=0 and T''+kc2T=0

otherwise you won't get periodic solutions.
Is it just set that way in order to get periodic solutions?

I got the sign that way from setting (X''/X)=k then X''=kX, setting equal to zero let me to X''-kX=0.

But then again my book sets k=mu2 where mu is > 0. But in the books example that leads to a trivial solution.Then with k=0, again trivial. So they then try, k=-mu2 < 0.

This then gives the sign switch like you mentioned and then a non-trivial answer. Does that follow with what you said - switching the sign makes it periodic, assuming that avoids the non-trivial solution. Or should all three cases be examined every time?


Oh wait....I think they just do it backwards from what I think you are doing. They use BC first to find which are non-trivial, then solve. With your method do you solve first, then apply the BC?

Find the most general solution to the odes first and then apply the boundary condition.
I'll give this a try.

Thanks for the help.
 
  • #4
464
0
I guess my whole issue is I don't know how to use the boundary conditions. I can do the three cases, when k>0, k=0, and k<0. But then I am lost.
 
  • #5
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
But then again my book sets k=mu2 where mu is > 0. But in the books example that leads to a trivial solution.Then with k=0, again trivial. So they then try, k=-mu2 < 0.

This then gives the sign switch like you mentioned and then a non-trivial answer. Does that follow with what you said - switching the sign makes it periodic, assuming that avoids the non-trivial solution. Or should all three cases be examined every time?


Oh wait....I think they just do it backwards from what I think you are doing. They use BC first to find which are non-trivial, then solve. With your method do you solve first, then apply the BC?
In the case of a general PDE, it can be tough to apply the boundary conditions without either knowing the solution or at least some of its properties. In this case, we can find the solutions for each class of [tex]k[/tex] value and then compare to the boundary conditions. (which you still haven't completely described in your posts).

For X'' = k X, when k>0, the solutions look like real exponentials, when k=0 we have a linear function and when k<0 we get sinusoids. It would be a good exercise for you to determine exactly what boundary conditions apply to the string in this problem and determine why the k>0 and k=0 cases can't satisfy them.

Rereading your first post, you haven't really defined what the functions f(x) and g(x) refer to. Are they the values of u(x,0)? The boundary value problem also requires some information about the values of the solution at the ends of the string, which would probably be u(0,t) and u(L,t) or something similar. You should check your class notes or text to determine the proper context for this problem.
 
  • #6
464
0
Ok, looking at it again it refers to examples that were previously in the section. I thought the problem replaced the example stuff. Here is everything that pertains to the problem.

(1) [tex]\frac{\partial^2u}{\partial t^2}=c^2 \frac{\partial^2u}{\partial x^2}, 0 < x < L, t > 0[/tex]

(2) Boundary conditions: u(0,t)=0 and u(L,t)=0 for all t>0

(3) Initial conditions: u(x,0)=f(x) and ut=g(x) for 0 < x < L

Problem: solve the boundary value problem (1)-(3) for a string of unit length, subject to the given conditions.

[tex]f(x)=0.05sin \pi x, g(x)=0, c=\frac{1}{\pi}[/tex]

I stupidly assumed those replaced the conditions (1)-(3), but now I see they don't.

So three cases. Solving for X''-kX=0

1. When k is positive, say k=mu2, with mu>0. Equation X becomes: X''-mu2X=0

General solution is X(x)=c1emux+c2e-mux

2. When k=0, X becomes X''=0

General solution X(x)=c1+xc2

3. When k=-mu2 with mu<0. Equation X becomes X''+muX=0.

General solution X(x)=c1cos(mux)+c2sin(mux)

So now I can apply (2) Boundary conditions: u(0,t)=0 and u(L,t)=0 for all t>0 to see which give real/trivial solutions?
 
  • #7
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
So now I can apply (2) Boundary conditions: u(0,t)=0 and u(L,t)=0 for all t>0 to see which give real/trivial solutions?
Right, you want to see if there are any values of the parameters ([tex]\mu[/tex] included) such that the boundary conditions are satisfied. After treating the 3 cases, you can solve for the time dependence and then examine the initial conditions.
 
  • #8
464
0
Well...I got it. But I am not even remotely close to the back of the book answer.

Here's what I have.

The only one that didn't yield a trivial solution was when k=-µ2 with µ<0.

General solution X(x)=c1cos(µx)+c2sin(µx)

Applying the given boundary conditions.

X(0)=0 implies that c1=0, X(L)=0 then implies that c2sin(µL)=0.

In order for that to be true µ must equal integer values of π. Therefore µ becomes n*π/L.

Hence X(x)=sin(n*π*x/L). So inserting this value of k from before (k=-µ2) I obtain:

[tex]T''+(\frac{c n \pi}{L})^2 T=0[/tex]

This then gives a general solution of [tex]b_n cos(\frac{c n \pi}{L}t)+b^{*}_{n}sin(\frac{c n \pi}{L})[/tex]

Then...

[tex]u(x,t)=\sum^{\infty}_{n=1} sin(\frac{n \pi x}{L})*(b_n cos(\frac{c n \pi}{L}t)+b^{*}_{n}sin(\frac{c n \pi}{L})[/tex]

So...now to solve for my bn's.

[tex]b_{n}=\frac{2}{L}\int^{L}_{0}0.05sin(\pi x)*sin(\frac{n \pi x}{L})dx[/tex]

This gives me a huge answer from Maple. The solution manual says my bn should be 0. So I have made a mistake somewhere, because that definitely doesn't equal zero.

I hope this post makes sense. This problem is getting long.:confused:
 
Last edited:
  • #9
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
[tex]b_{n}=\frac{2}{L}\int^{L}_{0}0.05sin(\pi x)*sin(\frac{n \pi x}{L}dx[/tex]

This gives me a huge answer from Maple. The solution manual says my bn should be 0. So I have made a mistake somewhere, because that definitely doesn't equal zero.

I hope this post makes sense. This problem is getting long.:confused:
One thing that will simplify the integral is the part of the problem that said we had a unit string, so L=1. We're still left with a kind of nontrivial integral. The easiest way to do it is use

[tex]\sin \theta = \frac{e^{i\theta} - e^{-i\theta}}{2i}.[/tex]

You should find that [tex]b_1[/tex] is nonzero, but all the other [tex]b_{n>1}=0[/tex]. This is a special case of orthogonal functions that you'll no doubt see more of in the future.
 
  • #10
464
0
Oh hey, what do you know. That made a huge difference. I'm getting closer.

Thanks again for the help. Typing this up and your pointers have helped me tremendously. I'd still be stuck at step one if not for the help. :approve:
 
  • #11
464
0
Now that I've done a few of these they are making sense. I do however have one final question...I hope. It is regarding when b1 is non-zero and the remaining bn's are zero.

Here is an example from a problem I just finished.

[tex]b^{*}_{n}=\frac{-2sin(n\pi)}{n\pi^{2}(n^{2}-1)}[/tex]

The solution manual claims b1*=1/Π and the remaining bn's are zero.

First if I put in n=1 I get a singularity. Discounting that (for illustration purposes only) any integer I put in the top will yield zero.

What am I missing?
 
  • #12
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
First off, you could see if you can make sense of

[tex]\lim_{n\rightarrow 1} b_n^*[/tex]

via l'Hopital's rule. Second, you could examine the integral that lead to [tex]b_n^*[/tex] and see if you get a nonsingular answer when you set [tex]n=1[/tex] explicitly.
 
  • #13
464
0
First off, you could see if you can make sense of

[tex]\lim_{n\rightarrow 1} b_n^*[/tex]

via l'Hopital's rule. Second, you could examine the integral that lead to [tex]b_n^*[/tex] and see if you get a nonsingular answer when you set [tex]n=1[/tex] explicitly.
Oh hey, what do you know. If I set n=1 in the original integral, I get 1/pi like the solution manual.

Does this usually only apply to n=1? I want to make sure I don't miss these in the future. Is the best method just to set n=1 (if that is the only case it happens) and just integrate again to check? Or is there a trick to seeing it?

Or just take [tex]\lim_{n\rightarrow 1} b_n^*[/tex] of the final answer and check that way? That seems easier to me, and I can see that it would equal 1/Pi as well.

So I guess the main question is, does that just apply to n=1?
 
  • #14
fzero
Science Advisor
Homework Helper
Gold Member
3,119
289
It's a general property of integrals of the form

[tex]\int_0^1 \sin (n\pi x) \sin(m \pi x) dx = \frac{1}{\pi(m^2-n^2)} [ n \sin( m \pi) \cos(n\pi) - m \cos(m\pi)\sin(n\pi)].[/tex]

This is zero whenever [tex]n\neq m[/tex], but if we set [tex] n=m[/tex] on the RHS we find an indeterminate form. It's well-defined in a limit as 1/2, which is what we'd have obtained if we took [tex]n=m[/tex] before integrating.
 

Related Threads on PDE - Separation of Variables

  • Last Post
Replies
2
Views
482
  • Last Post
Replies
8
Views
1K
  • Last Post
Replies
9
Views
1K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
994
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
11
Views
1K
Replies
8
Views
622
Replies
9
Views
1K
Top