1

When solving an ODE it is very common to get factors like $e^C$ where $C$ had been an arbitrary constant. Then, if one is being rigorous, $e^C$ could be replaced by $A$ where $A>0$. However, in the end, it seems like it usually turns out that the constant, in the end, can be any real number.

If helpful, let's see a full example. Let's solve $y'=-2y$ via separation of variables. We have $$ \begin{align*} \int \frac{dy}{y} &= \int -2 dt\\ \ln|y|&=-2t+C \\ |y| &= e^{-2t+C} \\ |y| &= e^Ce^{-2t} \end{align*} $$

At this point we can replace $e^C$ with $A$ where $A$ is an arbitrary constant greater than zero. But since $|y|=d$ in general means $y=\pm d$ we have that $y=\pm Ae^{-2t}$. But then it turns out that $y=0$ is a solution (which we implicitly lost when we divided by $y$ in the first step), so in the end we can just write $y=Ce^{-2t}$ where $C$ is, as usual, any real number.

From the perspective of a student, I think it is annoying to be told to be careful tracking the constant when in the end all the examples always end up involving a constant of any sign. I am using a number of textbooks as a reference in the ODE course I am teaching, and I have yet to find one that motivates carefully following the constraints on a constant by showing an example where there are ultimately restrictions on the constant, and I find this lack of a motivating example quite surprising!

So here is my question, what is an example of a 1st order ODE (ideally solvable via separation of variables) where there is a restriction on the constant in the general family of solutions?

edit

A couple of things, first in relation to Chan Hee's answer, to be more explicit I really would like an example where clear restrictions on the parameter $C$ arise during separation of variable rather than inspection of the final solutions. Admittedly, this might just be splitting hairs.

In your example, unless I am missing something, the restrictions only come up by inspection of your final answer. In fact, from the student perspective I think it would be natural to square everything where you left your answer and then it would be tempting to think there are no possible issues for and $C$ when looking at $y=(-2x^2+c)^2$.

If it helps explain what I am looking for, I want an example that illustrates to the students that we should take the time to keep track of things like that $e^C$, for any real number $C$ can be replaced with $A$ where $A>0$, and that in the end we actually get a family of solutions with such a restriction, e.g. the constant must be positive, or cannot be 0 or something like that. So ideally, I would love an example that involves $e^C=A>0$ and that it turns out that the solutions really does only involve this $A>0$. I upvoted your answer, but I didn't accept it because I'm hoping to get an example like this.

Finally, @Angel, I enjoyed the discussion from your answer and I'm sad you deleted it (or somebody deleted it?). For one thing, it never occurred to me that an antiderivative of 1/x could be defined piece-wise with constants of different signs. For a second thing, I never got to know your final opinion. Do you agree that separation of variables only requires an antiderivative, rather than the most general antiderivative?

Fractal20
  • 1,569
  • From the perspective of a teacher, it is annoying too. I think this issue is disregarded because in practical applications (say physics) you are given an initial condition with a physical meaning, then the constant is what it is and you do not have to worry about its domain. – Miguel Jan 12 '22 at 20:08
  • What do you mean by restriction on the constant? – Chee Han Jan 12 '22 at 20:35
  • @Chee Han that the constant cannot be any real number. For example, it must be positive – Fractal20 Jan 13 '22 at 02:16
  • @Fractal20 As in, restriction(s) independent of the initial condition? – Chee Han Jan 13 '22 at 06:23
  • @Chee Han I'm only considering the ODE, there is no IC. I want the general family of solutions that is arrived at to have a constrain on the parameter that appears. – Fractal20 Jan 14 '22 at 00:44

1 Answers1

3

How about this? Consider $y' = -2x\sqrt{y}$. Separating variables, we get $$ \int \frac{y'}{2\sqrt{y}}\, dx = \int -x\, dx \implies \sqrt{y} = -\frac{x^2}{2} + C. $$ In particular, $C$ must be nonnegative.

Chee Han
  • 4,745
  • 1
    This is great, relatively simple, and has many aspects that would be good to illustrate to my students and I upvoted your asnwer. But I don't think I'm phrasing my question well in the original prompt. In hindsight, I'd really like an example where in going through the steps of separation of variables you get constraints on the parameter. In this case, unless I am missing something, you really only get the constraint on C once you are at your final answer and realize that $\sqrt{y}=$ a negative quantity will be problematic. Does that make sense? I will try to edit my question again – Fractal20 Jan 14 '22 at 15:11