Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Laplace equation in 2d problem, Dirichlet problem

  1. Jan 2, 2012 #1


    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    Consider a circle of radius a whose center is in (0,0). Let [itex](r, \phi)[/itex] be the polar coordinates and (x,y) the corresponding rectangular coordinates of the plane. Calculate the solution to Dirichlet problem (interior) for Laplace equation [itex]\nabla ^2 u =0[/itex] with the following boundary conditions:
    2)[itex]u(r=a)=A \cos \phi[/itex]
    5)[itex]u(r=a)=A+B \sin \phi[/itex]
    6)[itex]u(r=a)=A \sin ^2 \phi +B \cos ^2 \phi[/itex]
    where A and B are constants.

    2. Relevant equations
    Already given I think.

    3. The attempt at a solution
    So I've been checking out internet to confirm my result so far but I've a few questions.
    I wrote the Laplacian in polar coordinates [itex]\triangle u = \frac{u_r}{r}+u_{rr}+\frac{u_{\phi \phi}}{r^2}=0[/itex].
    I use separation of variables, proposing a solution of the form [itex]u(r, \theta )= \varphi (\phi )R(r)[/itex].
    Plugging this back into the Laplace equation I reached 2 ODE's.
    [itex]r^2 R''+rR'-k^2R=0[/itex] and [itex]\varphi '' +k^2 \varphi =0[/itex].
    The second ODE is easy to me to solve, I reached [itex]\varphi (\phi )=c_1e^{ik \phi }+c_2e^{-i k \phi}[/itex]. However on the Internet they prefer to keep all real values if I understood well, though I don't know how it's possible to do this.
    I kind of cheated to solve the first ODE and one solution (I checked out and it indeed is a solution) is of the form [itex]R(r)=c_3 r^k+c_4 r^{-k}[/itex]. Now for R(r) remains finite when r tends to 0, [itex]c_4[/itex] must vanish so that [itex]R(r)=c_3r^k[/itex].
    So my solution so far is [itex]u(r, \phi )=c_3 r^k(c_1e^{ik \phi }+c_2e^{-i k \phi} )[/itex].
    I've also found out that it's possible to get another form of solution for the first ODE, namely [itex]R(r)=c_5+c_6\ln r[/itex] which would really complicate the number of possible solutions to the PDE. I don't understand what it means physically to have 2 different possible solutions.
    Also, how do I deal with the solution that contains complex numbers?
    Last edited: Jan 2, 2012
  2. jcsd
  3. Jan 2, 2012 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The log solution is possible when [tex]k=0[/tex]. There's nothing mysterious about it.

    Write the complex exponentials in terms of sin and cos.
  4. Jan 2, 2012 #3
    Regarding the solution only containing real values for phi. Think about the physical nature of the system you're solving. Since your solution exists on a disk what can you say about the boundary conditions on phi?
  5. Jan 3, 2012 #4


    User Avatar
    Gold Member

    Ok thanks to both.
    I reach [itex]u(r, \phi )=c_3 r^k [A \cos (k\phi ) + B \sin (k \phi ) ][/itex].
    To answer CN's question, I don't know what you mean by "boundary conditions on phi". Do you mean that [itex]u(a,0)=u(a, 2 \pi )[/itex]?
    k is worth [itex]\pm \sqrt {\frac{R'-r^2R''}{R}}[/itex].
    Edit: I can even write [itex]u(r, \phi )=r^k[A \cos (k \phi )+B \sin (k \phi )][/itex]. But this solution doesn't look good to me, indeed [itex]u(0 ,\phi )=0[/itex] no matter what the boundary conditions are. This means that if I heat the boundaries of the disk, the center will always be at 0K unless I'm mistaken (when the temperature reaches a steady state).
    Last edited: Jan 3, 2012
  6. Jan 3, 2012 #5
    Yes, that is what I meant for the BC's on phi. With periodic Boundary Conditions on phi we can write:

    For k = 0
    \varphi_{0} = \frac{1}{2}A_{0} [/tex]
    R_{0} = D_{0}ln(r) + C_{0}
    \varphi_{k}(\phi) = A_{k}cos(k\phi) + B_{k}sin(k\phi) [/tex]
    [tex] R_{k}(r) = C_{k}r^{k} + D_{k}r^{-k} [/tex]

    You have to be careful here though to ensure your solution is bounded. Think about the physical nature of your solution.

    Edit - I notice above you are already almost at the final solution. You need to also consider the condition for k = 0 and include that in the final form of your solution.
  7. Jan 3, 2012 #6


    User Avatar
    Gold Member

    Ok thank you.
    Hmm why this particular value? I mean why not [itex]A_0[/itex]?
    I trust you but this function isn't definied for r=0. I don't understand why such a function is possible physically.
    Ok. Your [itex]D_k[/itex] coefficient must equal 0 otherwise the function isn't bounded when r tends to 0.
    Last edited: Jan 3, 2012
  8. Jan 3, 2012 #7
    Eh, it's just a matter of convention, I believe it comes from solving for the coefficients of the fourier sine/cos series. ultimately it doesnt matter.

    It isnt, but the math initially requires it, your intuition tells you that you cant have this function, i.e. set the coefficient to 0. This will generally always be the case, which is why its so important to think physically about your solution instead of just assuming that because the math is right then the solution is right.

    I think you're ready to piece it all together and determine your final solutions for each initial condition
  9. Jan 3, 2012 #8


    User Avatar
    Gold Member

    Ah ok I understand.
    However if [itex]u(r, \phi )=r^k [A_k \cos (k \phi )+B_k \sin (k \phi ) ][/itex], I don't see why I have to separate the special case of [itex]k=0[/itex] since if I plug [itex]k=0[/itex] into this, I get exactly what I should, i.e. [itex]A_0[/itex].
    So I used the fact that the angular part of the solution is periodic and I reached that [itex]A_k=B_k[/itex]. (I will show my work if this is wrong). Thus [itex]u(r, \phi )=r^k A_k [\cos (k \phi )+ \sin (k \phi ) ][/itex].
    Applying boundary condition, I reach [itex]A_k=\frac{A}{a^k [\cos (k \phi )+ \sin (k \phi) ]}[/itex].
    This gives as final answer (looks too simple in my opinion): [itex]u(r, \phi )=\frac{r^kA}{a^k}[/itex]. There's no dependence on phi which looks good. Also the boundary condition is/are satisfied.
    What do you think?
  10. Jan 3, 2012 #9
    You should always evaluate the separate cases for k<0, k=0 and k>0 from the start point of the differential equation. This is because as evident with the DE for R it wont be the same thing. For k>0 R(r) ends up being a function of r^k and r^-k. but for k=0 the DE yields ln(r). While this solution isn't physically valid it demonstrates my point that just plugging in k=0 for a solution given for k>0 wont always yield the correct solution, however in this case it does for your phi solution.

    Edit - k is an integer > 0 so the periodic boundary conditions just tell you that A = A, so you can't be setting A = B. e.g.
    phi(0) = A
    phi(2pi) = Acos(2pi k) + Bsin(2pi k)
    phi(0) = phi(2pi) is true if k is an integer. The sin term will disappear and you're left with A = A
    Your final solution should be
    u(r,\phi) = A_{0} + C_{0} + \sum_{k = 1}^{\infty} r^{k}(A_{k}cos(k\phi) + B_{k}sin(k\phi))

    Now I would just use observation to determine your solution for each 1 through 6, for example:
    1) [itex] u(r=a) = A [/itex]
    It's easy to see that the following is true
    A_{0} = A[/tex]
    C_{0} = 0[/tex]
    A_{k} = 0\ \forall\ k > 0[/tex]
    B_{k} = 0\ \forall\ k > 0[/tex]
    Last edited: Jan 3, 2012
  11. Jan 3, 2012 #10


    User Avatar
    Gold Member

    Thank you very much for all this useful information, I indeed made an error and can't get [itex]A_k=B_k[/itex].
    However I do not know why k is an integer >0 nor how to get the final answer. I'm stuck at [itex]u(r, \phi )=r^k [A_k \cos (k\phi )+B_k \sin (k\phi )][/itex].
  12. Jan 3, 2012 #11
    k is an integer because of what you need from the boundary condition [itex] \varphi(0) = \varphi(2\pi)[/itex]

    We have then:

    [tex]\varphi(0) = A_{k} = A_{k}cos(2\pi k) + B_{k}sin(2\pi k) = \varphi(2pi)[/tex]

    So we need the following to be true:

    [tex]A_{k} = A_{k}cos(2\pi k) + B_{k}sin(2\pi k) [/tex]

    After taking a course in PDE's it just comes naturally to me that we should make the cos term = 1 and everything else will fall out. So if k is an integer then it should be evident that we are just left with [itex] A_{k} [/itex]
    If it isn't evident then plug in k = 1,2,3... and you'll see.

    Now, for your final answer you need to take the summation over all k values, including k = 0.

    so we have the solution for k = 0: A + C,
    and k = 1, A_1 cos(phi) + B_1 sin(phi)
    and k = 2.... etc etc

    so ultimately we have:

    [tex] u(r,\phi) = \frac{1}{2}A_{0} + \sum_{k = 1}^{\infty} r^{k}(A_{k}cos(k\phi) + B_{k}sin(k\phi)) [/tex]

    This time I just combined the first two k = 0 constants, it really doesn't matter because a constant plus a constant is a constant, I don't know why I didn't do it the first time.
  13. Jan 4, 2012 #12


    User Avatar
    Gold Member

    Thank you very much for your time and useful information Clever Name.
    This is starting to click a bit in my head now.
    I understood all your steps, except the idea that if I have a solution say for k=2 and for k=50, the sum of these solutions is also a solution. I know this is true for linear ODE's (and probably PDE's), but this one isn't linear as far as I know. So why is this true, I do not know. I'd appreciate if you have a few words to say about this.
    I expressed the solution as [itex]u(r, \phi )= \sum _{k=0}^{\infty } r^k [A_k \cos (k\phi )+B_k \sin (k\phi )][/itex] which I think is equivalent to yours.
    Ok for 1). The solution looks good. If I heat the contours of a disk with a uniform temperature and I wait an infinite amount of time (time required for steady state temperature), the disk will have a uniform temperature, the one I use to heat it up/cool it down, A.
    I'm going to try the other i)'s.

    Edit: For 2): [itex]A_k=B_k=0[/itex] for [itex]k \neq 1[/itex]. [itex]B_1=0[/itex]. [itex]A_1=A/a[/itex].
    Thus [itex]u(r, \phi ) =\frac{rA \cos \phi }{a}[/itex].
    Edit 2: Hmm not sure this makes sense physically, probably made an error. Oh I see your new post now.
    Last edited: Jan 4, 2012
  14. Jan 4, 2012 #13
    Surprisingly yes, your form of the solution is equivalent, though I would stress caution in doing something like that. The k=0 solution will not always be present, and sometimes having the k=0 solution outside of the sum will make it easier to see (by simple observation) what the final solution will be when given initial conditions. Also, the k=0 solution might end up being something like [itex] A_{0} + B_{0}t [/itex]. Which would not fall under the sum. So again, just be careful when doing that.

    As for why it's true that you can do the sum. Laplace's equation is linear. http://mathworld.wolfram.com/LaplacesEquation.html Thus the solutions obey the principle of superposition.
  15. Jan 4, 2012 #14


    User Avatar
    Gold Member

    Ok thanks once again.
    For 2), I edited my last post.
    For 3):
    [itex]A_0=A[/itex]. [itex]A_k=0 \forall k \neq 0[/itex].
    [itex]B_k =0 \forall k \neq 1[/itex]. [itex]B_1=B/a[/itex]. Thus [itex]u(r, \phi )=A_0+ \frac{rB \sin (\phi )}{a}[/itex].
    So far so good?
    Edit: I'm having a hard time with the 3 last boundary conditions. Inspection doesn't work for me, is there any other way I can get [itex]u(r, \phi )[/itex] for those cases?
  16. Jan 4, 2012 #15
    For 3, [/itex] for\ r=a,\ y = asin(\phi) [/itex], thus [itex] u(r=a) = A + Basin(\phi) [/itex]
    So [itex] B_{1} = B [/itex] gives the right answer, because with what we have now:
    [tex] u_{0} = A [/tex]
    [tex] u_{1} = a^{1}B_{1}sin(\phi) = aBsin(\phi) [/tex]
    Thus all together we have [itex] u(r=a) = A + Basin{\phi} = A + By[/itex]
    Or [itex] u(r,\phi) = A_{0} + rBsin(\phi) [/itex]
    At least that's how I'm interpreting the I.C.

    For the other cases you'll need to do some trig substitutions. I.e. for 4) we have:
    [tex] u(r=a) = Axy = Aa^{2}cos(\phi)sin(\phi)[/tex]
    Using the sine double angle identity this give sus:
    [tex] u(r=a) = \frac{Aa^{2}sin(2\phi)}{2} [/tex]

    The solution should be evident now, you just need [itex] B_{2} = A [/itex] which is no big deal.

    For problems like this since you haven't come across the actual method for solving the fourier sine or cosine series I would strongly suggest you keep to the method of inspection. Going the other route might make it more complicated than it needs to be. Wait until you come across it in your studies.

    5 Doesn't look too hard.

    6) use the identities [tex] sin^{2}(u) = \frac{1}{2}( 1-cos(2u))[/tex] and the respective one for cos^2.
  17. Jan 4, 2012 #16


    User Avatar
    Gold Member

    Okay. I get:
    4)[itex]B_2=\frac{A}{2}[/itex] so [itex]u(r, \phi )=B_2 r^2 \sin (2 \phi )[/itex]. All other coefficients are null.
    5)[itex]u(r, \phi )=A_0+r B_1 \sin \phi[/itex] with [itex]A_0=A[/itex] and [itex]B_1=B/a[/itex].
    6)[itex]u(r, \phi )=A_0+A_2 r^2 \cos (2\phi )[/itex]. With [itex]A_0=\frac{A+B}{2}[/itex] and [itex]A_2=\frac{B-A}{2a^2}[/itex].
    I'm going to dig into Fourier series stuff. I'm self studying this course and the final exam is around mid February, I want to be really ready. I am in holidays till early March so I have time to study hard this course. :)
  18. Jan 5, 2012 #17
    I don't have the means to work it out right now (sitting on a train), but at first glance it looks fine.

    Good luck!
  19. Jan 5, 2012 #18


    User Avatar
    Gold Member

    Thanks for all and have a nice trip!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook