1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
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: Applying boundary condition on heat equation

  1. Apr 16, 2013 #1
    1. The problem statement, all variables and given/known data
    hey, i have a heat equation question which asks to solve for u(x,t) given that u(0,t)=Q_0 + ΔQsin(ωt).

    2. Relevant equations

    d_xx u = k d_t u

    u(0,t)=Q_0 + ΔQsin(ωt)

    3. The attempt at a solution

    so you can solve the equation pretty easily with separation of variables, i.e. u(x,t) = X(x) T(t)

    then you get something like

    u(x,t) = (Fcos(βx)+Gsin(βx))e^(-tkβ^2)

    where β = X''/X = T'/kT

    but the problem is, when you apply the b.c. you get

    u(0,t) = F e^(-tkβ^2) = Q_0 + ΔQsin(ωt)

    i dont see how from this i can get a value for F or β,
    kβ^2 must be a positive real number to assure a physically correct expression (i.e. that u -> 0 as t-> ∞)

    is there some trick that i am not seeing, or maybe more information is required?

    just noticed, u(0,0) = A = Q_0


    u(0,t) =Q_0 e^(-tkβ^2) = Q_0 + ΔQsin(ωt)

    which doesn't help very much
    Last edited: Apr 16, 2013
  2. jcsd
  3. Apr 16, 2013 #2


    User Avatar
    2017 Award

    Staff: Mentor

    Are you sure that the separation of variables works?
    I think you need some weird u(x,t) to get endless oscillations of u(x=0).
  4. Apr 16, 2013 #3


    User Avatar
    Science Advisor

    Separation of variables certainly will work when the domain of definition, in x, is an interval. But that raises the question, were you not given any boundary conditions? The solutions for a finite interval and an infinite interval are very different.
  5. Apr 16, 2013 #4
    the only conditions are that
    u(0,t)=Q_0 + ΔQsin(ωt)
    and its a semi-infinite rod

    is there a way to get the solution to the T equation in terms of complex numbers?

    T' + kβ^2T = 0

    if you treat k as a complex number?

    you get

    u(x,t) = (Fcos(βx)+Gsin(βx))(cos(kβ^2 t) - i sin(k β^2 t))

    but its still not helpful,

    the closest you can get is, since F = Q_0, and if you let k be proportional to β as in k = a/β

    (Q_0 cos(βx)+Gsin(βx))(cos(aβ t) - i sin(a β t))

    u(0,t)=Q_0(cos(aβ t) - i sin(a β t)) =Q_0 + ΔQsin(ωt)
    ω=a β and you can kind of get a value for ΔQ bit you the cos(ω t) is still there...

    I tried using β as a complex number, after realising K is a positive real number for the heat equation,
    also instead of β^2 i picked iβ
    so T'/T = -ikβ

    then T(t) = e^(-ikβt) = cos(kβt)-isin(kβt)

    but then the solution for X(x) is really ugly, it has like e^-(1)^(3/4) kind of things in it and its still not gonna give a T_0
    Last edited: Apr 17, 2013
  6. Apr 17, 2013 #5


    User Avatar
    2017 Award

    Staff: Mentor

    Oh, that condition is forced and heat propagates from there to one side. Okay, that makes sense.

    As the boundary condition is periodic, I would look for a periodic solution as well. I still think that you cannot separate the whole system, but it should be possible if you subtract Q_0. The time-dependence is easy to guess then.
  7. Apr 17, 2013 #6
    easy to guess, but im finding its not so easy to get the solution, the closest i have come is

    T(t) = e^(-ikβt) = cos(kβt)-isin(kβt)

    do you know how i would get rid of the i?
  8. Apr 17, 2013 #7


    User Avatar
    Science Advisor

    That's an awkward way of doing this problem but you do NOT have "T(t) = e^(-ikβt) = cos(kβt)-isin(kβt)"
    You have, rather, that T(t) = Ce^(-ikβt) = Acos(kβt)- Bsin(kβt) for C some complex number. And the fact that all the conditions here involve only real numbers tells you that C must be such that A and B are real numbers.
  9. Apr 17, 2013 #8
    ah i see,

    but still, using this you get

    u(0,t) = Acos(kβt)- Bsin(kβt) = Q_0 + ΔQsin(ωt) (ignoring the X component)

    clearly B = ΔQ (pretending B includes the constants from the X solution)

    but theres no way to make Acos(kβt)=Q_0

    if it were evaluated at some particular t i could see how its possible, but otherwise i dont see how you can do that.

    does that imply A = 0? but if you use u(0,0) =0 = Q_0 so this suggests the A isn't actually zero
    seeing how you get Q_0 from these types of solutions has been another confusing thing,

    also in the X solution there are two arbitrary constants, and this boundary condition is only going give like, because X(x) = some linear combination of ugly e^x... things

    u(0,t)=(F+G)(Acos(kβt)+Bsin(kβt))= Q_0 + ΔQsin(ωt) so really (F+G)B=ΔQ and you have this cos term

    u(0,0) = (F+G)A = Q_0

    now this kind of hints A/B = Q_0/ΔQ

    so ideally F+G = 1

    so you'd get like, u(x,t) = (0.5 e^x.. + 0.5 e^-x..)(Q_0 cos(kβt)+ ΔQsin(kβt))

    but u(0,t) = Q_0 cos(kβt)+ ΔQsin(kβt)

    see what i mean?
  10. Apr 17, 2013 #9


    User Avatar
    2017 Award

    Staff: Mentor

    B is a function of x. B(0)=ΔQ.

    I would get rid of Q_0 with a linear transformation first, and work on the main problem afterwards.
    Otherwise, you have to add a constant term to your solution.

    With the approach HallsofIvy posted, it is possible to solve the problem in a conventional way, without any surprising steps.
    The solution has interesting degrees of freedom.
    Last edited: Apr 17, 2013
  11. Apr 17, 2013 #10
    with that approach you get a cos term aswell, that's one of the main problems ive been having,

    what your saying is to say the constant associated with that cos will be zero,

    then i guess it would work, but you'd have to add Q_0 to the solution,

    is there a way to solve the problem with hallsofivy's approach without having to add Q_0 to the solution with no proper justification, besides that it works
  12. Apr 17, 2013 #11


    User Avatar
    2017 Award

    Staff: Mentor

    You get a cos term, but it is 0 at x=0.

    Adding d+xe with constants d,e does not change the differential equation - the general solution is a sum of the solution to the heat equation (sin, cos terms) and arbitrary linear terms. You can fix the linear terms to get the right boundary conditions.
  13. Apr 17, 2013 #12
    sorry i don't follow the first thing you said,
    the cos term is cos(kβt), how is that zero at x = 0? its not zero at t = 0 either,
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted