- #1

- 54

- 10

- TL;DR Summary
- ODE in the real domain requires calculations in the complex doman in order to yield a (real) solution

Hello,

I'm posting here since what follows is not about homework, but constitutes a personal research which underlies some more general questions.

As with the infamous "

Before explaining the problem in detail, I'd like to anticipate what I wish to understand (with the help of you knowledgeable people) for the general case: when a problem is formulated in ##\mathbb{R}## with expected solutions also in ##\mathbb{R}## but solving it requires an "intermediate journey" in ##\mathbb{C} \, ##, is there a general approach to find a way (if any exists) to bypass that "intermediate journey" in ##\mathbb{C} \,##?

Now, my personal research addresses a specific problem which is indeed very

Also, I'd like to say that what follows lead "in a certain way" (more details hereafter) to the correct solution of the problem, but I cannot get my head around it about that "in a certain way" (again, more details hereafter).

My calculations lead to an ordinary differential equation which is separable and yields the following integral:

$$ \int \frac{ dP(t) }{ \sqrt{a+b \, P(t)+c \, P^2(t) } } \, dx =-\alpha \, t + C $$

where ##a##, ##b##, ##c## and ##\alpha## are known parameters (and real numbers).

I'm not skilled enough to solve the integral myself, so I relied on a couple online solvers, which both gave the solution:

$$ \frac{1}{\sqrt{c}} \log \left( 2 \sqrt{c} \sqrt{ a+b \, P(t)+c \, P^2(t) } + b + 2c \, P(t) \right) = -\alpha \, t + C $$

where ##log## is the

Here arises the first problem: the parameter ##c## (which is under a square root) is

If I don't bother and go on with the calculations, after a couple of rearrangements, I get the following equation for ##P(t) \, ##:

$$ P(t) = \frac{k}{4 \, c} e^{ - \sqrt{c} \alpha \, t } + \frac{b^2-4 \, a \, c}{4 \, c \, k} e^{ + \sqrt{c} \alpha \, t } - \frac{b}{2 \, c} $$

where ##k## is the constant to be determined using the problem's initial conditions (it derives from the previous constant of integration ##C \, ##).

The initial condition (remember the physical problem?) is that the pressure ##P## is equal to a certain real value ##P_0## at the time ##t=0 \, ##.

Please note that the exponents of the two exponential terms (if we exclude the variable ##t \, ##) are

Well, applying the constraint of the initial conditions yields a value of ##k## which makes the coefficient of the two exponential terms (the ones expressed in terms of ##a##, ##b##, ##c## and ##k## itself) complex conjugate as well.

Thus, with the final expression for ##P(t)## (which is the one above but with ##k## made explicit), I can throw in

And the values of ##P(t)## are correct. They match the values I got by solving the original integral equation*** step-by-step (using very small discrete intervals).

*** I mean the original integral equation I was solving, which leads to the differential equations that in turn leads to the first equation in this post.

So far so good but, as said at the beginning, I do not know if there is a way to bypass this "intermediate journey" in ##\mathbb{C} \, ##.

Now, the odd part. If I want to find the time ##t## for which ##P(t)=P_1## (where ##P_1<P_0## is a specific pressure of interest) and I solve the equation for ##P(t)## accordingly, I get a

To double check, I used this "complex time" into the expression for ##P(t)## and it worked (it gave the

What's strange to me is that the real part of this "complex time" seems to be the actual real-world solution (again, I compared it with the step-by-step numerical solution described above), in other words the

What is happening here?

Sorry for the lenghty post. I'd appreciate if anyone could chime in and enlighten me. Thank you!

I'm posting here since what follows is not about homework, but constitutes a personal research which underlies some more general questions.

As with the infamous "

*casus irreducibilis*" (i.e. finding the real roots of a cubic function sometimes requires intermediate calculations with complex numbers), I found myself solving an ordinary differential equation which seems to require the same approach.Before explaining the problem in detail, I'd like to anticipate what I wish to understand (with the help of you knowledgeable people) for the general case: when a problem is formulated in ##\mathbb{R}## with expected solutions also in ##\mathbb{R}## but solving it requires an "intermediate journey" in ##\mathbb{C} \, ##, is there a general approach to find a way (if any exists) to bypass that "intermediate journey" in ##\mathbb{C} \,##?

Now, my personal research addresses a specific problem which is indeed very

*real*. It's about finding the pressure ##P## of a gas inside a container as a function of time ##t## when said gas is slowly flowing out from said container through an orifice. Well, the problem itself is slightly more detailed but you shouldn't bother about anything except for the math to come (the aim of this introduction is to show that it is a real-world problem whose domain is ##\mathbb{R}## and whose expected solution is in ##\mathbb{R}## as well). By the way, I apologise in advance for my possibly loose math language.Also, I'd like to say that what follows lead "in a certain way" (more details hereafter) to the correct solution of the problem, but I cannot get my head around it about that "in a certain way" (again, more details hereafter).

My calculations lead to an ordinary differential equation which is separable and yields the following integral:

$$ \int \frac{ dP(t) }{ \sqrt{a+b \, P(t)+c \, P^2(t) } } \, dx =-\alpha \, t + C $$

where ##a##, ##b##, ##c## and ##\alpha## are known parameters (and real numbers).

I'm not skilled enough to solve the integral myself, so I relied on a couple online solvers, which both gave the solution:

$$ \frac{1}{\sqrt{c}} \log \left( 2 \sqrt{c} \sqrt{ a+b \, P(t)+c \, P^2(t) } + b + 2c \, P(t) \right) = -\alpha \, t + C $$

where ##log## is the

*natural*logarithm.Here arises the first problem: the parameter ##c## (which is under a square root) is

**negative**.If I don't bother and go on with the calculations, after a couple of rearrangements, I get the following equation for ##P(t) \, ##:

$$ P(t) = \frac{k}{4 \, c} e^{ - \sqrt{c} \alpha \, t } + \frac{b^2-4 \, a \, c}{4 \, c \, k} e^{ + \sqrt{c} \alpha \, t } - \frac{b}{2 \, c} $$

where ##k## is the constant to be determined using the problem's initial conditions (it derives from the previous constant of integration ##C \, ##).

The initial condition (remember the physical problem?) is that the pressure ##P## is equal to a certain real value ##P_0## at the time ##t=0 \, ##.

Please note that the exponents of the two exponential terms (if we exclude the variable ##t \, ##) are

**purely imaginary**(because of ## \sqrt{c} ## with ##c<0## ) and they only differ by a minus sign: that means that they are also complex conjugate.Well, applying the constraint of the initial conditions yields a value of ##k## which makes the coefficient of the two exponential terms (the ones expressed in terms of ##a##, ##b##, ##c## and ##k## itself) complex conjugate as well.

Thus, with the final expression for ##P(t)## (which is the one above but with ##k## made explicit), I can throw in

*real values*of the time ##t## and indeed get*real values*of the pressure ##P(t) \, ##.And the values of ##P(t)## are correct. They match the values I got by solving the original integral equation*** step-by-step (using very small discrete intervals).

*** I mean the original integral equation I was solving, which leads to the differential equations that in turn leads to the first equation in this post.

So far so good but, as said at the beginning, I do not know if there is a way to bypass this "intermediate journey" in ##\mathbb{C} \, ##.

Now, the odd part. If I want to find the time ##t## for which ##P(t)=P_1## (where ##P_1<P_0## is a specific pressure of interest) and I solve the equation for ##P(t)## accordingly, I get a

**complex value**as a result (comprised of both non-zero real and imaginary parts).To double check, I used this "complex time" into the expression for ##P(t)## and it worked (it gave the

*real*value ##P_1 \, ##).What's strange to me is that the real part of this "complex time" seems to be the actual real-world solution (again, I compared it with the step-by-step numerical solution described above), in other words the

*real*time for which ##P(t)=P_1 \, ##.What is happening here?

Sorry for the lenghty post. I'd appreciate if anyone could chime in and enlighten me. Thank you!