# Homework Help: Arbitrary constant in denominator

Tags:
1. Oct 28, 2016

### humphreybogart

1. The problem statement, all variables and given/known data
Find the general solution to the differential equation:

2. Relevant equations
Separation of variables for solving 1st order separable differential equation.

3. The attempt at a solution
Using separation of variables, I can write:

My questions are:

1) Am I correct to restrict the arbitrary constant, such that C≠e^–x? I'm doing so to avoid division by zero.
2) Since I initially restricted y such that y≠0;
a) How do I restrict my arbitrary constant to reflect this initial restriction on y?
b) Should I consider the case of y=0 separately to check if it's a solution?
c) If so, am I right to conclude that since I cannot arrange the RHS to be equal to zero, y=0 is NOT a solution?
4) In general, how does one deal with arbitrary constants on the denominator? I've played around in search of simpler way to express my solution, but can't find one.

Last edited: Oct 28, 2016
2. Oct 28, 2016

### Ray Vickson

Your solution is incorrect; it should be
$$y(x) = \frac{1}{c+e^{-x}} = \frac{e^x}{1+c e^x}$$
However, the same basic issues still arise.

I think that if you work at it a bit more and do some more thinking you can answer most of these questions on your own. You will learn more by doing that first, and coming back here only after reaching a genuine impasse.

3. Oct 28, 2016

### Staff: Mentor

There is a sign error in your solution.

1) A constant should not depend on x anyway. If it could, there would be a sign error in your restriction.
2a/b) Can y=0 be true with your solution? If not, there is no problem, but you have to check it separately because it could be a solution.
2c) Check y=0 in the original differential equation - not in the solution you got assuming y≠0. Does it satisfy the original equation?
4) Not different from constants anywhere else.

4. Oct 28, 2016

### humphreybogart

Apologies, I've corrected the sign error now. Very frustrating since now, naturally, help with the questions is muddied by correction of the error. :(
And also for not being able to count to 3 :P.

Regarding:
1) If I don't restrict the constant in this way, I'm saying that y=infinity is a solution to my differential equation. I can't reason why this would make any sense (y=infinity has a slope given by the differential equation (DE)? Surely y=infinity has no slope?), hence why I believe I must restrict it. I'm confused because I've never restricted a constant using the independent variable, and I'm not sure if it's mathematically correct?

2) Substituting y=0, and so dy/dx=0, into the original DE, I get that 0=0, which means that y=0 is actually a solution to the DE after all. Correct?

5. Oct 28, 2016

### Ray Vickson

*******************************************
Is the differential equation satisfied by doing that? If so, would you not call that a solution?
*******************************************

6. Oct 28, 2016

### Staff: Mentor

Infinity is not a real number.
Correct.

7. Oct 28, 2016

### humphreybogart

…then? I'm not sure what your point was here Ray.

"Why are you asking if you are unsure? Don't you know if you are unsure? (That is the effect of using a "?" at the end.)"

I said I am not sure. You can take that to mean I'm unsure. There really isn't any other way to interpret my sentence.

Anyway, regarding:

2) a) I see that restricting the arbitrary constant in order to restrict y≠0 isn't possible. There's no restriction on C that will do this.
b) Yes, I should. Since my general solution emerged from the restriction y=0, then I must check whether y=0 is itself a solution to the DE.
c) No. Again, the general solution emerged from the restriction y≠0, so naturally, it won't be possible to arrange the general solution such that y=0. In any case, this is not how to check whether y=0 is a solution or not. To check, I substitute y=0 and dy/dx=0 into the DE.
4)
.

Please, correct me if I have misunderstood any of the above points.

Then, the only remaining question, which I will re-word, is:

1) Since division by zero is not possible, is it always necessary to place a restriction on an equation to reflect this? In my example, would this mean restricting C such that C≠–e^–x?

Last edited: Oct 28, 2016
8. Oct 28, 2016

### Staff: Mentor

What Ray meant was that if you had ended your sentence with a period, as in "...and I'm not sure if it's mathematically correct.", it would be clear that you are unsure. By ending it with a question mark, he's interpreting what you said as not being sure that you were unsure.

It's the difference between saying
5 + 4 is 11. - a declarative sentence (that happens to be false)
vs.
5 + 4 is 11? -- a declarative sentence expressing uncertainty

9. Oct 28, 2016

### humphreybogart

Well, I'm sure I was unsure. :) I think it was a wholly unnecessary digression, however.

10. Oct 28, 2016

### pasmith

You don't impose such a condition on $C$. Instead you must put a condition on the domain of $y$ (ie. a condition on the upper and lower bounds of $x$).

Informally we say that the solution "blows up" at $x_{\mathrm{crit}} = - \ln(-C)$. Now $e^{-x} > 0$ so this can only happen when $C< 0$.

But do we care about that?

If our initial condition is at $x= 0$ then we only care if $x_{\mathrm{crit}} > 0$, ie. $-1 < C < 0$. Now in this case $C = \frac{1}{y(0)} - 1$, so $x_{\mathrm{crit}} > 0$ when $y(0) > 1$. Thus our conclusion:
- If $y(0) < 1$ then $y(x)$ is bounded as $x \to \infty$ (this includes the case $y(0) = 0$ where $y(x) = 0$ is constant).
- If $y(0) = 1$ then $y(x) = e^x \to \infty$ as $x \to \infty$.
- If $y(0) > 1$ then $y(x)$ blows up in finite time $x_{\mathrm{crit}} = \ln (y(0)/(y(0) - 1))$ and so the domain of $y$ is $[0, x_{\mathrm{crit}})$.

11. Oct 28, 2016

### humphreybogart

What do you mean by the initial condition of x=0?

12. Oct 28, 2016

### Staff: Mentor

There is no initial condition given in the problem, at least as far as what was posted.

13. Oct 28, 2016

### Staff: Mentor

In a differential equation like the one you posted, you get a whole family of solutions, with one solution for each possible value of the arbitrary constant.

If an initial condition is given, such as y(0) = 1, then you can typically find the unique solution of this initial value problem (i.e., a differential equation and an initial condition).

14. Oct 28, 2016

### humphreybogart

Yes, sorry, I thought that's what was meant. It's just that I hadn't stated an initial condition. I'm just considering the general solution, not the particular solution.

I'd like to know how I can deal with situations involving "division by zero" in the future, since they arise often in solving differential equations, and presumably elsewhere.

If I write my general solution without restricting C in the way I suggested (C≠–e^–x), then aren't I wrongly implying that "there are a family of solutions to this DE of the form y(x)=1/(e^-x + C), where C can take any value"? Surely I must specify that a solution does not exist when C≠–e^–x.

15. Oct 28, 2016

### vela

Staff Emeritus
I'm not sure why you keep writing a constant $C$ as being equal to a non-constant function of $x$.

I think you're asking if the constant $C$ can be a negative value because then there's some $x=x_0$ such that $C+e^{-x_0}=0$. The answer is: yes, $C$ can be negative. In that case, $x_0$ simply isn't in the domain of the solution.

16. Oct 28, 2016

### Staff: Mentor

If this can happen, the domain is not connected any more, the differential equation does not make sense at this point, and we get two different regions which can have a different constant C.

A common example is the solution to dy/dx = -1/x2: Sure, y=1/x + C is a class of solutions, but there is also [y=1/x + C1 for x<0 and y=1/x + C2 for x>0].