How Do You Solve a Differential Equation Involving a Square Root?

Click For Summary

Discussion Overview

The discussion revolves around solving a differential equation of the form \(\frac{dz}{dt} = a - b\sqrt{z(t)}\), which models the height of liquid in a vessel over time. Participants explore various methods for solving this equation, including substitutions and numerical simulations, while addressing the challenges associated with finding an explicit solution.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant describes the problem and presents the differential equation, expressing frustration with the complexity of finding a solution.
  • Another participant suggests a separable form of the equation and derives an implicit solution, noting that it may not be invertible.
  • There is a discussion about potential typographical errors in the derived expressions, with some participants agreeing on the presence of a sign error.
  • Participants mention that the solution can be expressed in terms of the Lambert W function, which they consider valid but not exact or explicit.
  • A numerical simulation is presented, showing discrepancies between the numerical and exact solutions, prompting further discussion about the behavior of the solutions.
  • One participant reflects on the commonality of making mistakes in calculations and the challenges of self-verifying one's work.
  • Another participant emphasizes the qualitative understanding of the solution, noting the lack of an exact explicit solution in \(t\).

Areas of Agreement / Disagreement

Participants generally agree that the equation is complex and that the derived solutions may not be explicit. However, there are competing views regarding the correctness of the derived expressions and the presence of typographical errors. The discussion remains unresolved regarding the exact nature of the solutions and their implications.

Contextual Notes

Participants note that the derived implicit solution may behave differently from numerical simulations under certain conditions, highlighting the limitations of the analytical approach. The discussion also touches on the challenges of finding exact solutions for differential equations in general.

Who May Find This Useful

This discussion may be useful for those interested in differential equations, mathematical modeling, and numerical methods, particularly in the context of fluid dynamics or related engineering applications.

bomanfishwow
Messages
27
Reaction score
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
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.
 
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.
 
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..
 
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]
 
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:
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]
 
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!
 
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: 466
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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K