# Equations with Moduli

How does one go about solving equations in one variable which contain moduli? For instance, those of the form f(x,|x|)=0 or f(x,|g(x)|) more generally.

Obviously I don't expect a completely "one-size fits all" solution, but a general approach to dealing with the moduli is what I'm looking for. (i.e. let's assume that, once the moduli are gone, I will be able to deal satisfactorily with the remaining equation.)

How does one go about solving equations in one variable which contain moduli? For instance, those of the form f(x,|x|)=0 or f(x,|g(x)|) more generally.

Obviously I don't expect a completely "one-size fits all" solution, but a general approach to dealing with the moduli is what I'm looking for. (i.e. let's assume that, once the moduli are gone, I will be able to deal satisfactorily with the remaining equation.)

Get the modulus on one side, and everything else on the other side.

##|f(x)| = g(x)##

Using the definition of the absolute value, ##|a| = a## if ##a## is positive (or 0), and ##|a| = -a## if ##a## is negative, we have two equations:

##g(x) = f(x)##
##g(x) = -f(x)##

You might get extraneous solutions though, so always plug in the values you found into ##g(x)## and make sure ##g(x)## is positive (or zero). If you find that ##g(x)## is negative for a particular value, ignore this solution, since the absolute value of any real number is greater than or equal to zero by definition.

Hope this helps.

By the way, the functions ##f## and ##g## I used in my explanation are in no way related to those in your post, so don't get confused.

Get the modulus on one side, and everything else on the other side.

##|f(x)| = g(x)##

Using the definition of the absolute value, ##|a| = a## if ##a## is positive (or 0), and ##|a| = -a## if ##a## is negative, we have two equations:

##g(x) = f(x)##
##g(x) = -f(x)##

You might get extraneous solutions though, so always plug in the values you found into ##g(x)## and make sure ##g(x)## is positive (or zero). If you find that ##g(x)## is negative for a particular value, ignore this solution, since the absolute value of any real number is greater than or equal to zero by definition.

Hope this helps.

By the way, the functions ##f## and ##g## I used in my explanation are in no way related to those in your post, so don't get confused.

Thanks. So we just rearrange into the form above, and then solve the two equations

##g(x) = f(x)##
##g(x) = -f(x)##

and use the superset of the solutions, removing any solutions which lead to g(x)<0 since no modulus of f(x) can equal them.

What if it were something like

##|f(x)| + |g(x)| = h(x)##

?

Thanks. So we just rearrange into the form above, and then solve the two equations

##g(x) = f(x)##
##g(x) = -f(x)##

and use the superset of the solutions, removing any solutions which lead to g(x)<0 since no modulus of f(x) can equal them.

What if it were something like

##|f(x)| + |g(x)| = h(x)##

?
Thanks. So we just rearrange into the form above, and then solve the two equations

##g(x) = f(x)##
##g(x) = -f(x)##

and use the superset of the solutions, removing any solutions which lead to g(x)<0 since no modulus of f(x) can equal them.

What if it were something like

##|f(x)| + |g(x)| = h(x)##

?

Square both sides.

##[|f(x)| + |g(x)|]^2 = h(x)^2##
##|f(x)|^2 + 2|f(x)||g(x)| + |g(x)|^2 = h(x)^2##

Recall that ##a^2 = |a|^2## and ##|a||b| = |ab|##

##f(x)^2 + 2|f(x)g(x)| + g(x)^2 = h(x)^2##
##|f(x)g(x)| = \frac{1}{2} [h(x)^2 - f(x)^2 - g(x)^2]##

You now have the equation in the form you mentioned in your first post.