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

Diff. eq. with square root

  1. Nov 29, 2008 #1
    Hi all,

    I've been musing on a problem I came across whilst decanting some sloe gin (that time of the year here in the UK and all that). Essentially, I want to know given a vessel of known dimensions, open to the atmosphere at the top, with a hole in the bottom, and a pipe at the top filling with liquid at a steady rate, what height the liquid in the vessel will be at a given time. Anyway, the meat of this boils down to an equation of the form:

    [tex]\frac{dz}{dt} = a - b\sqrt{z(t)},~~~z(0)=0[/tex]

    I've tried a couple of methods to try and quell this beast, for example a simple substitution

    [tex]u(t) = \sqrt{z(t)},~~~\frac{dz}{dt} = 2u(t)\frac{du}{dt}[/tex]

    results in the equally horrible

    [tex]u(t)\left(2\frac{du}{dt} + b\right) = a[/tex]

    I've tried throwing it in Maple too, but no joy (ends up with a Lambert W function, which I don't count as an exact solution), am I missing some insight into this? A quick numerical simulation shows the equation behaves the way I would expect it to.

    (P.S. This isn't homework, I'm just amusing myself with a problem...)
  2. jcsd
  3. Nov 29, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    Well, this one is separable:
    Simply set [tex]z=u^{2}\to\frac{dz}{du}=2u\to{dz}=2udu[/tex]
    Thereby, we get:
    The lefthand side may by means of:
    Therefore, we are able to find an implicit equation for z(t):
    You will probably not be able to invert this relationship into an explicit one.
  4. Nov 29, 2008 #3
    Is it possible that there is a typo here? I think it should read:
    I think there is a minus sign wrong in the solution as well. This off course if I'm not messing things up :smile:

    [Edit] The solution seems to be transformable into the Lambert W-function, as stated before. This can easily be programmed and thus a valid solution it is indeed.
  5. Nov 29, 2008 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    First off:
    The typo is non-existent

    Blarrgh, you are right about the sign.

    And about the typo in the third expression.
    Hand over the bucket of water so that I can glurg myself into shame, humiliation and penitence.
    But I fear that improvement won't come after all..
  6. Nov 29, 2008 #5
    Yes, I was just plotting the implicit solution and there is a sign error. The method makes sense though - I think I had tried this method but gave up as it gave me an implicit solution. (Although I may not have, I've been toying with it on various 'napkins' whilst not doing real work, you know the way ;) ).

    Yes, it can be programmed but it is not an exact, explicit solution, relying as it does on numerical computation of the L-W function. *

    It's interesting how few DEs we can solve exactly actually...

    [edit]* Please excuse my terminology if wrong, I'm an experimental physicist not a mathematician ;)[edit]
  7. Nov 29, 2008 #6
    So, I need to check the algebra with a pencil (and that I've typed it correctly), but plotting the implicit curve shows it's not behaving the same as the numerical solution for given input parameters (which represent a 10cm x 10cm x 1m vessel, 1cm^2 hole, in flow at 0.0004m^3s^-1:



    Clearly there are many orders of magnitude differences with the exact solution, and the numerical simulation behaves in a much more physical way (i.e. swiftly asymptotic, although this may just be a scale thing - I gave up zooming out on the exact solution!).
    Last edited by a moderator: Apr 24, 2017
  8. Nov 29, 2008 #7
    You should know how many times I make mistakes like these. In the years I've been doing math (I'm an engineer with a profound liking of math) I developed a sixth sence kind of feeling of whether someting is right or not. Sometimes I leave a solution lying around for a few days and start over again to find what's wrong. In the end it all comes together, but this took me years of practice. :smile: The hardest thing to do is to find a mistake in ones own calculation, it is far more easier to check someone elses. Not worth the use of a bucket. :smile:

    As stated before I'm just a simple engineer. Normally I need the use of some program to view or study the solution and this can sometimes require the need of a programming tool and thus the solution in either way is OK. Using Newton-Raphson it just happens to be an easy function to program, from there my remark. Please, use any form you wish.

    Since the problem is solved, the solution I got in the end is:
  9. Nov 29, 2008 #8
    I think it's fair to say we *all* make mistakes in calculations all the time ;)

    Oh sure, on a qualitative level that's just fine (hence my doing a quick iterative numerical simulation to explore the equation), however I find it nice to be able to make a statement, such as "This equation has no exact explicit solution in t", which seems to be the case.

    Hmm, when I plot this it does funny things, with a clear asymptote due to the behavior of
    [tex]ln(1-\sqrt{z})[/tex], although I need to double check the derivation and my typing. Will come back after supper!
  10. Nov 29, 2008 #9
    I looked a bit further on the equation and the solution and came up with the following observations.
    *) Is the following equation the correct physical one?

    \frac{dz}{dt} = \frac{\dot{V}}{A} - \frac{A}{A_0}\sqrt{2\cdot g \cdot z}
    [tex]A[/tex] the section of the vessel
    [tex]A_0[/tex] the section of the hole
    [tex]g[/tex] gravitational constant
    [tex]\dot{V}[/tex] the in flow of liquid

    Thus giving:
    b=\frac{A}{A_0}\sqrt{2\cdot g}

    In case this is correct, you get the following numerical equation (g=9.80665m/s^2)
    \frac{dz}{dt} = 0.04 - 0.04428690551393 \sqrt{z}

    *) For large time we will have a limiting height equal to:
    \frac{dz}{dt} = 0 \qquad z_0=\left(\frac{a}{b}\right)^2

    Which is thus

    *) The solution I gave is only valid for [tex]z<z_0[/tex], giving infinite time to reach this height [tex]z_0[/tex].

    *) A graphic of this function is now:

    This looks like the first one you gave.
    Hope this helps.

    Attached Files:

    Last edited: Nov 29, 2008
  11. Nov 29, 2008 #10

    Not quite, your second term is incorrect. It should read:
    \frac{dz}{dt} = \frac{\dot{V}}{A} - \frac{A_0}{A}\sqrt{2\cdot g \cdot z}

    Thus giving:
    b=\frac{A_0}{A}\sqrt{2\cdot g}

    The rest of your analysis follows nicely. I've just come back to this after eating and I must have typed something wrong when plotting, as it indeed behaves just fine within the limits [tex]0 \leq z \leq z_0[/tex].

  12. Nov 29, 2008 #11
    Indeed, I switched the ratio, it was correct on my paper. A mistake :smile:
    Glad to be of any assistance, Coomast
  13. Nov 29, 2008 #12
    Indeed, I did notice the numerical value of b was correct. A nice little problem.

    But, still safe to say there is no exact explicit solution in terms of elementary functions...

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook