# Why do calculus textbooks gloss over absolute values?

The archetypal example of this is in the equation $$\frac{dy}{dx}=y.$$ When solving by separation, you end up reaching the result \begin{align*} |y|&=C_1 e^x \\ \Rightarrow y&=C_2 e^x. \\ \end{align*} The justification for this step, according to a lot of sources, is the fact that the + or - from the absolute value can be combined with the constant to yield a new constant. However, this falls into the pointwise trap: what prevents the function from taking the positive branch at some points and the negative branch at others? In this case, making the function piecewise destroys continuity, violating the initial differential equation, but an extra step would be needed to rigorously confirm this result.

A bigger problem arises in the case of differential equations such as $$\frac{dy}{dx}\cdot \frac{1}{2}x=y,$$ let's say with initial condition $$(1,1).$$ Again, this equation is quite easy to solve by separation of variables to yield the result $$y=x^2$$ as your solution - or is it? As it turns out, $$y=\textbf{sgn}(x)\cdot x^2$$ also satisfies the differential equation everywhere as well as the initial condition. This, to me at least, is alarming, since I've never seen these kinds of "pathological" solutions addressed in the solving of differential equations, and I can't find anything on the internet about this either, despite this being an extremely simple differential equation which has definitely appeared in textbooks or tests before. Even WolframAlpha ignores this solution and gives only $$y=x^2.$$ Is this something that is just commonly overlooked, or did teachers/authors think it wasn't important, or... what? I have yet to find a satisfying explanation. I have also asked my teacher, again with no satisfying answer.

• As for the first part, notice that $C_2$ will take on a positive or negative value according to what initial condition $y(x_0) = y_0$ is given. According to the existence/uniqueness theorem, you are guaranteed one solution. Commented Aug 1, 2022 at 0:39
• For the second part, at $x=0$ your ODE turns into $y=0$, which doesn't even gurantee that your function is differentiable. Thus at that point you can have any two $C$'s on each side, needing two IC's to uniquely define Commented Aug 1, 2022 at 0:48
• Maybe this would better fit the Math Educators SE.
– J.G.
Commented Aug 1, 2022 at 5:46
• Differential equations textbooks are often a little sloppy and you have to figure out how to modify the argument to make it perfectly clear. Often we find a solution “by hook or by crook” and then invoke a uniqueness theorem to conclude that we have found the unique solution. Commented Aug 1, 2022 at 6:11
• This question and the $y=\textbf{sgn}(x)\cdot x^2$ example are brilliant. I think you should add to the question title that you are talking about differential equations so people have a better description and can see this good question more easily. I also do think that most textbooks are sloppy for ordinary differential equations. Treating $dy / dx$ like a fraction and just multiplying and moving the $dy$ and $dx$ terms around is nonsense in my opinion and the notation should be way different altogether and avoid the letter $d$, but that's just how it is, i don't know why. Commented Aug 1, 2022 at 21:11

Since your question asks specifically about absolute values, I would like to interrogate slightly a statement from it:

When solving by separation, you end up reaching the result $$|y| =C_1 e^x$$

Presumably this statement is based on something you learned in single-variable calculus, viz., that $$\int \frac{1}{x} \, dx = \ln |x|$$. One thing that's being glossed over here is the meaning of this latter equation. The expression $$\frac{1}{x}$$ does not define a function on $$\mathbb{R}$$, and so it doesn't morally have a single antiderivative on $$\mathbb{R}$$, as the formula suggests. Rather, it has two antiderivatives, $$\ln(x)$$ on $$(0, \infty)$$ and $$\ln(-x)$$ on $$(-\infty, 0)$$. And sure, one can summarize this by a single formula, but it's somewhat misleading to do so. (In my experience calculus textbooks handle this point fine, but it's sufficiently sophisticated that it washes over most single-variable calculus students, and it would be an eccentric instructor who focused on drilling the point.)

Given the issue above, one way to view what's going on is that by the time you have reached the statement $$|y| = C e^x$$ you have already passed through the dodgy part of the argument, which is about what happens in separation of variables at the points where one side or the other has division by zero. The same thing happens in the second example, where division by zero happens on both sides of the separated equation.

There's two possible answers to your question (at least in my mind), neither of which are particularly satisfying.

$$1)$$ The reason calculus textbooks gloss over the things you mentioned in your question is that they are providing a relatively simple description of the math. That is, they are teaching the math and adding that level of rigor and detail wouldn't provide a better/more useful understanding of differential equations.

$$2)$$ The study of differential equations can trace its roots back to solving real world physics and engineering problems. The reason the finer details might be ignored is that they simply don't matter for the vast majority of differential equations encountered in real world applications. You ask "what prevents the function from taking the positive branch at some points and the negative branch at others?" Well, reality mainly. There are not any physical processes (at least none that I can think of) that such a function would describe and so we can safely ignore such a solution.

I make no judgements on the mathematical appropriateness of either of these reasonings, just that I believe them to be the most likely answers.

As Angelica points out in her comment, this isn't really an answer, but it's too long for a comment. I agree with QC_CQAOA that the most likely explanations are those given in his or her answer.

If you only require $$\ y\$$ to be at least once differentiable at $$\ x=0\$$, then the general solution of your second example over the whole real line is $$\ y=\big(C_1H(x)+C_2H(-x)\big)x^2\ ,$$ where $$H\$$ is the Heaviside step function. To specify both $$\ C_1\$$ and $$\ C_2\$$ uniquely, you need one initial condition for some $$\ x_1>0\$$ (to determine $$\ C_1\$$) and another for some $$\ x_2<0\$$ (to determine $$\ C_2\$$). If you require $$\ y\$$ to be at least twice differentiable at $$\ x=0\$$, however, then you must have $$\ C_1=C_2\$$ and there is a unique solution for a single initial condition given at any $$\ x_3\ne0\$$.

• This information is somewhat useful and relevent, but it doesn't answer OP's main question of why education and calculators often ignore or gloss over these effects. Commented Aug 1, 2022 at 2:09
• @Angelica I think this is the underlying reason why textbooks do this. These kind of problems have a unique smooth solution and a second solution which is $C^1$ but not $C^2$. In practice we usually only care about the smooth solution. It would be more accurate to make this explicit but presumably that is skipped in the interest of an easy to understand exposition. They are hiding some technical details that are not really relevant for the main ideas, something that is very common in math teaching. Commented Aug 1, 2022 at 9:18