19 September 2008

A surprise from differential equations

A problem which circulated among the grad students here at Penn today, which came up while somebody was teaching differential equations:

Consider the differential equation dy/dx = (y-1)2. Separate variables and integrate both sides as usual; you get y(x) = 1 - 1/(x+C), where C is determined by the initial condition. Take the limit as x goes to infinity, and you get limx -> ∞ y(x) = 1, regardless of C.

But now notice that dy/dx is positive for all y. (We're working over the reals here.) So if the initial condition is of the form y(x0) = y0 for some y0 > 1, then we start at 1 and keep going upwards; how can the limit be 1?

Of cousre there's a mistake somewhere in here. But where is it? (I know the answer, but it took annoyingly long to figure out.)

edit: the differential equation was wrong.

Jacob Fugal said...

Is it just that you (the generic you, not necessarily you personally) integrated the left hand side as dy/(y-1)^2 instead of as (y-1)^2 dy? As far as I can tell it should be the latter.

With the former I get y=1-1/(x+C); with the latter I instead get 1+(3x+C)^(1/3). The latter goes to plus or minus infinity as x goes to infinity, so appears to work.

unapologetic said...

To put it more bluntly than jacob, that's not remotely what you get when you integrate, and it leapt right out at me that it didn't sound at all right.

In other puzzlers: "4 and 5 is 7" or "4 and 5 are 7"?

unapologetic said...

On the other hand if you MEANT (y-1)^2 instead of (y-1)^{-2}:

The problem is that any solution has a pole. In particular, if y_0>1, then the pole is to the right of x_0, and so as you increase x the solution blows up in finite time.

Come on, Michael. I'm even allergic to analysis!

Michael Lugo said...

Jacob,

thanks for pointing out the error; it's fixed now. The error is not that I can't integrate.

Anonymous said...

If y_0 > 1, then the solution is not defined for all positive times.

tk said...

y_0 - 1 positive implies that
x_0 + C is negative.
Hope this doesn't spoil too much.

Steve said...

The graph of the solution explains everything. Put in another way, "we start at 1 and keep going upwards" is not how we calculate limits.

K said...

dy/dx > 0 only means that y(x) increases monotonically - it doesn't say anything about how y(x) is bounded.

The limit of y(x) as x approaches infinity is 1; we could take this to mean that y(x) is bounded above by 1.

Which leaves us with a y(x) that is greater than 0 and less than 1 for x between 0 and infinity.

I guess the bug is the assumption
"if the initial condition is of the form y(x0) = y0 for some y0 > 1" - it should've been "for some y0 > 0".

P.S: I'm not a mathematician, so there can possibly be errors in the statements that I've made above. I would be glad to have them pointed out.

K said...

Sorry bug in my comment :)

"which leaves us with a y(x) that is greater than 0 and less than 1" - not necessarily, y(x) can be negative. It's just bounded above by 1.

Brain fart.

Pat B said...

If I wanted to ask my high school pre-calc class this, I would just ask them to draw a graph that has a horizontal asymptote at y=1 and always has a positive slope, and if they couldn't draw one, I'd be a little disappointed...
but they don't know much about diff equations..

Pat B said...

Sorry, guess I would need to tell them f(2) >1... to take care of the last part.. but that wouldn't bother them much..

David said...

I'm going to add my two cents, even though John probably already articulated it. For any C, there is no x, so that 1/(x+C) = 0 [and so no x, so that y = 1 - 0 = 1]. You can't start at y_0 = 1.

Are you going to see Gelman today? I tried, to no avail, to convince my wife that we should have dinner in Philly tonight.

misha said...

Has anybody noticed that when we integrate dy/(y-1)^2 OVER REALS, we get TWO constants of integration, one for y>1 and the other for y<1. Likewise, when we integrate dx/|x| OVER REALS, we don't get ln|x|+C, but ln(x)+C+ for x>0 and ln(-x)+C- for x<0 where C+ and C- may not be equal to each other. Tell it to your calculus students.

misha said...

So, your differential equation, Isabel, viewed over reals, defines 3 separate dynamical systems: one for y>1, the other for y<1 and the third for y=1.

unapologetic said...

Yes, we've noticed it. Every calculus book I've taught from mentions it, or the more general fact that constants of integration only have meaning over connected domains of definition. We already do tell our calculus students this. Calculus curricula are not as broken as you think.

misha said...
This comment has been removed by the author.
misha said...

To anapologetic: I am glad you do, but why "we?" Why do you act as a true believer defending your venerable institution and not just speak for yourself?

unapologetic said...

why "we?"

Because every calculus instructor with whom I've ever worked, at any institution, has also made this point in his or her class.

Why do you act as a true believer defending your venerable institution?

Why do you act as a parasitic crank, using other people's comment threads to rail against an institution he seems to think has wronged him in some way?

misha said...

unapologetic said...

criticism != censorship

misha said...

Going back to the question of integration constants, I haven't seen this particular fact about integral of dx/x^2 or dx/x mentioned explicitly in a calculus book, and I have seen quite a few of them. Some students that I talked to, found it amusing, it looks like this idea is not as widely known as it should be. Can anybody give me any references (like book names and page numbers)? I've checked a few popular texts that I have in pdf or djvu, and none of them mentioned it.

Dave Marain said...

Coming late to this...

Here's how I see this:

dy/dx>0 would imply y is increasing for all reals if we knew the function was continuous for all reals. However, as it turns out,the function is discontinuous at x = -C (vertical asymptote, infinite discontinuity). Also, y never attains the value y = -1.
y certainly is increasing on each of its disconnected branches.

If we were to define an initial condition, say y(0) = 1, we would obtain a particular solution of y = -1/(x-0.5) -1. The left-branch of the hyperbola passes through (0,1) and y incr without bound as x approaches 1/2 from the left. As x-->±∞, y approaches -1 (horiz asymptote).
Pls correct any careless errors I may have made.

A wonderful calc instructor (Doug shaw I believe is his name), has created a web site with a whole set of "Find the Calculus Errors". You may find it from Googling. Of course students who don't want to be bothered with the restrictions or conditions (hypotheses) of theorems, see no point to these kinds of logic exercises. Hopefully, we do!

Dave Marain
MathNotations

Dave Marain said...

Minor correction in my last comment...
I was working with dy/dx = (y+1)^2. Basic argument remains the same with appropriate sign change, I think.
Dave

Anonymous said...

buy photoshop 5 [url=http://sunkomutors.net/]discount software microsoft office[/url] software to store photos