Diff. eq. with square root

In summary: I know the numerical solution is correct, I just want to know why the exact one is not...In summary, the conversation discusses a problem involving 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. The main question is how to determine the height of the liquid in the vessel at a given time. The equation for this problem is given as \frac{dz}{dt} = a - b\sqrt{z(t)},~~~z(0)=0, and the conversation explores different methods for solving it. One method is to use a substitution, u(t) = \sqrt{z(t)}, which leads to an
  • #1
bomanfishwow
27
0
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...)
 
Physics news on Phys.org
  • #2
bomanfishwow said:
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...)
Well, this one is separable:
[tex]\int\frac{1}{a-b\sqrt{z}}\frac{dz}{dt}dt=\int{dt}[/tex]
Simply set [tex]z=u^{2}\to\frac{dz}{du}=2u\to{dz}=2udu[/tex]
Thereby, we get:
[tex]\int\frac{2u}{a-bu}du=t+C[/tex]
The lefthand side may by means of:
[tex]\frac{2u}{a-bu}=-\frac{2}{b}(\frac{(a-bu)-a}{a-bu})=-\frac{2}{b}+\frac{a}{a-bu}[/tex]
Therefore, we are able to find an implicit equation for z(t):
[tex]-\frac{2}{b}\sqrt{z}+\frac{2a}{b^{2}}\ln(|a-b\sqrt{z}|)=t+C[/tex]
You will probably not be able to invert this relationship into an explicit one.
 
  • #3
arildno said:
Well, this one is separable:
[tex]\int\frac{1}{a-b\sqrt{z}}\frac{dz}{dt}dt=\int{dt}[/tex]
Simply set [tex]z=u^{2}\to\frac{dz}{du}=2u\to{dz}=2udu[/tex]
Thereby, we get:
[tex]\int\frac{2u}{a-bu}du=t+C[/tex]
The lefthand side may by means of:
[tex]\frac{2u}{a-bu}=-\frac{2}{b}(\frac{(a-bu)-a}{a-bu})=-\frac{2}{b}+\frac{a}{a-bu}[/tex]
Therefore, we are able to find an implicit equation for z(t):
[tex]-\frac{2}{b}\sqrt{z}+\frac{2a}{b^{2}}\ln(|a-b\sqrt{z}|)=t+C[/tex]
You will probably not be able to invert this relationship into an explicit one.

Is it possible that there is a typo here? I think it should read:
[tex]\frac{2u}{a-bu}=-\frac{2}{b}\left[1-\frac{a}{a-bu}\right][/tex]
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.
 
  • #4
First off:
The typo is non-existent

Secondly:
Blarrgh, you are right about the sign.

Edit:
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..
 
  • #5
coomast said:
Is it possible that there is a typo here? I think it should read:
[tex]\frac{2u}{a-bu}=-\frac{2}{b}\left[1-\frac{a}{a-bu}\right][/tex]
I think there is a minus sign wrong in the solution as well. This off course if I'm not messing things up :smile:

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 ;) ).

[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.

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]
 
  • #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:

Numerical:
https://webpp.phy.bris.ac.uk/cms/Plots/simulation.png

Exact:
https://webpp.phy.bris.ac.uk/cms/Plots/exact.png

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:
  • #7
arildno said:
Edit:
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..

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 sense kind of feeling of whether something 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:

bomanfishwow said:
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. *
[edit]* Please excuse my terminology if wrong, I'm an experimental physicist not a mathematician ;)[edit]

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:
[tex]
t=-\frac{2a}{b^2}\cdot\left[\frac{b}{a}\sqrt{z}+\ln\left(\left|1-\frac{b}{a}\sqrt{z}\right|\right)\right]
[/tex]
 
  • #8
coomast said:
You should know how many times I make mistakes like these.

I think it's fair to say we *all* make mistakes in calculations all the time ;)

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.
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.

[tex]
t=-\frac{2a}{b^2}\cdot\left[\frac{b}{a}\sqrt{z}+\ln\left(\left|1-\frac{b}{a}\sqrt{z}\right|\right)\right]
[/tex]

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!
 
  • #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?

[tex]
\frac{dz}{dt} = \frac{\dot{V}}{A} - \frac{A}{A_0}\sqrt{2\cdot g \cdot z}
[/tex]
[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:
[tex]
a=\frac{\dot{V}}{A}
[/tex]
[tex]
b=\frac{A}{A_0}\sqrt{2\cdot g}
[/tex]

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

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

Which is thus
[tex]
z_0=0.81577297038234m
[/tex]

*) 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.
 

Attachments

  • height_time.jpg
    height_time.jpg
    17.2 KB · Views: 392
Last edited:
  • #10
Hi,

coomast said:
*) Is the following equation the correct physical one?

[tex]
\frac{dz}{dt} = \frac{\dot{V}}{A} - \frac{A}{A_0}\sqrt{2\cdot g \cdot z}
[/tex]
[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
Not quite, your second term is incorrect. It should read:
[tex]
\frac{dz}{dt} = \frac{\dot{V}}{A} - \frac{A_0}{A}\sqrt{2\cdot g \cdot z}
[/tex]

Thus giving:
[tex]
a=\frac{\dot{V}}{A}
[/tex]
[tex]
b=\frac{A_0}{A}\sqrt{2\cdot g}
[/tex]

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].

Cheers,
James.
 
  • #11
bomanfishwow said:
Hi,


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

Thus giving:
[tex]
a=\frac{\dot{V}}{A}
[/tex]
[tex]
b=\frac{A_0}{A}\sqrt{2\cdot g}
[/tex]

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].

Cheers,
James.

Indeed, I switched the ratio, it was correct on my paper. A mistake :smile:
Glad to be of any assistance, Coomast
 
  • #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...

Cheers,
James.
 

1. What is a differential equation with a square root?

A differential equation with a square root is a type of mathematical equation that involves a variable and its derivative, along with a square root function. This type of equation is commonly used to model growth, decay, and other physical processes.

2. How do you solve a differential equation with a square root?

Solving a differential equation with a square root involves using techniques such as separation of variables, substitution, and integrating factors. It is important to follow the proper steps and use appropriate methods to solve the equation accurately.

3. Can a differential equation with a square root have multiple solutions?

Yes, a differential equation with a square root can have multiple solutions. This is because there are often different initial conditions or parameters that can result in different solutions to the same equation.

4. Why are differential equations with square roots important?

Differential equations with square roots are important because they allow us to model and understand various physical processes and phenomena. They are widely used in fields such as physics, engineering, economics, and biology.

5. What are some real-life applications of differential equations with square roots?

Some real-life applications of differential equations with square roots include modeling population growth, radioactive decay, chemical reactions, and electrical circuits. They are also used in fields such as fluid dynamics, mechanics, and economics.

Similar threads

Replies
2
Views
986
  • Differential Equations
Replies
1
Views
2K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
8
Views
2K
  • Calculus
Replies
3
Views
1K
  • Special and General Relativity
Replies
14
Views
3K
Replies
19
Views
2K
  • Introductory Physics Homework Help
Replies
10
Views
1K
Replies
1
Views
525
Back
Top