Two graphs, one relation - Pt. II

March 18, 2021 | 3 minutes, 10 seconds

The Dubious Signum

Introduction

The sign function is a strange 'function' (for the purposes of laziness, I'll continue to refer to it as a function). On one hand, it relates to the absolute value function via its piecewise construction (\(\left|x\right| = x\times \operatorname{sgn}(x)\)), but on the other, if not used carefully, can introduce unforeseen restrictions.

For example, it is easy to assume that \(\operatorname{sgn}(x) = \frac{\left|x\right|}{x}\) - but that's only for \(x \neq 0\).

Similarly, dividing by the sign function will also introduce the restriction that whatever is in it cannot be 0. This follows again from its construction.

These are trivial examples. So what about our previous post? In the previous post I implied that actually, sometimes,

\[ f=g\times \operatorname{sgn}(f) \Longrightarrow \left|f\right| = g\]

And this is true. But there's also a sneaky, not initially obvious, restriction to be had here.

Restriction and Plotting Mayhem

We can consider our relation in cases - \(f \neq 0\) and \(f = 0\).

In the former case, we take \(f = g\times \operatorname{sgn}(f)\) and multiply both sides by \(\operatorname{sgn}(f)\). We therefore get \(f\times \operatorname{sgn}(f) = g\times (\operatorname{sgn}(f))^2\). Simplifying we reach \(\left|f\right|=g\) given the sign function is never zero.

In the case that \(f = 0\) - the relation always holds true irrespective of \(g\).

This means that while our full original relation holds for both of these cases, our \(\left|f\right| = g\) is actually restricted by comparison.

In essence: our new equation holds for \(f = 0 \iff g = 0\). Rather ironically, this works out for us in terms of our single relation. (Substitution by \(f\) will show this)

The Real Conclusion to Pt. I

Notice when we derived the equation describing "two" graphs with one relation, we introduced the case wherein \(y=A(x)\)? Turns out, that's an additional graph that gets plotted alongside our other graphs above it - using our signum-defined equation. We don't want that; in fact, I explicitly specified a restriction for it in the previous post.

And yet, using conventional graphing tools like Desmos, you won't actually notice this quirk. In fact, on a typical plot, not even Wolfram Alpha will show it. But, if you take a contour plot - e.g. you accept our equation as a function in two variables (such as \(f(x,y)\)) - there is a significant difference between the two plots. Graphing tools like GeoGebra do sort of show it, because they work slightly differently, but you'll find it's slow and often buggy.

Now, let's suppose that we have \(|f|=g\) - in our case, \(\left|y-A(x)\right| = \hat{A}(x)\) - our equation will hold for \(y-A(x)=0\) (or \(y=A(x)\)) iff \(\hat{A}(x) = 0\) holds. What this means is, by our previous post's definition, \(f(x) = g(x)\).

This means, conveniently:

\[ y=A(x) \iff f(x) = g(x)\]

By consequence, it closes any 'gaps' we may have had; intersection points between these graphs are actually included.