# How to calculate with absolute value.

Calculate:$$\frac{ \left| x \right| }{2}= \frac{1}{x^2+1}$$

How do I write the whole process so it will be correct? I need some suggestions. Thank you!

-
There are two cases: (1) $x\geq 0$ and (2) $x<0$. You could consider each separately. – poirot Jan 20 '14 at 16:33
Calculate what?? – Alexey Jan 20 '14 at 22:47
I think you mean "solve for $x$", not "calculate". – Jack M Jan 20 '14 at 23:21
Why is this tagged calculus? – 1110101001 Jan 21 '14 at 4:27
$\large x^{2} = \left\vert\,x\,\right\vert^{2}$ and you get a cubic equation for $\large\left\vert\,x\,\right\vert$. – Felix Marin Jan 23 '14 at 16:48

Split it into two cases. First case is $$\frac{x}{2}=\frac{1}{x^2+1}.$$ If it has a positive solution (or more than one), it is a valid solution. Second case is $$\frac{-x}{2}=\frac{1}{x^2+1}.$$ If it has a negative solution (or more than one), then it is a valid solution.

The valid solutions from both cases are all your solutions to the original problem.

-
so, you assume $x$ to be real? – lab bhattacharjee Jan 20 '14 at 16:34
I did because of the tags: calculus, and absolute-value. No mention of complex or modulus. – Jeff Snider Jan 20 '14 at 16:58

Let $y = \vert x \rvert \ge 0$. Then you have

$$y(y^2+1)=2 \implies y^3 +y - 2 = 0 \implies (y-1)(y^2+y+2)=0$$

The second factor cannot be zero for non-negative $y$, so you have only one solution $y=1 \implies x = \pm1$.

-
+1 Doing cases $|x| = x$ or $|x| = -x$ is nice, but noting that $|x|^2 = x^2$ saves work at the end checking to make sure $x$ has the right sign. I like this answer best. – 6005 Jan 21 '14 at 3:42

If $x=a+ib$ where $a,b$ are real

We have $$\frac{\sqrt{a^2+b^2}}2\left(a^2-b^2+2abi+1\right)=1$$

Equating the imaginary parts, $\displaystyle ab=0$

If $\displaystyle a=0, \frac{|b|}2(1-b^2)=1$

Use for real $b,|b|=\begin{cases} +b &\mbox{if } b\ge0 \\ -b & \mbox{if } b<0\end{cases}$

If $\displaystyle b=0, \frac{|a|}2(1+a^2)=1$

Set $x=r(\cos\phi+i\sin\phi)$ where $r>0, \phi$ are real

So using de Moivre's formula, $x^2=r^2(\cos2\phi+i\sin2\phi)$

So we have $\displaystyle \frac r2\left(r^2(\cos2\phi+i\sin2\phi)+1\right)=1$

Equating the imaginary parts, $\displaystyle r^3\sin2\phi=0$

Clearly, $\displaystyle r\ne0\implies \sin2\phi=0\implies2\cos\phi\sin\phi=0$

If $\displaystyle\sin\phi=0, r^3+r-2=0$

Clearly, $r=1$ is a solution, so please solve the Quadratic Equation $\displaystyle\frac{r^3+r-2}{r-1}=0$

If $\displaystyle\cos\phi=0, r^3-r+2=0$ whose solution is not so smooth

-
I got only the following solutions (and none of them are real) $x=\frac{1}{2}(1-i\sqrt{7})$ and $x=\frac{1}{2}(1+i\sqrt{7})$. Is this even correct? – L_McClain Jan 20 '14 at 16:45
@L_McClain, I'm editing my answer – lab bhattacharjee Jan 20 '14 at 16:46
@ lab bhattacharjee, No, it's not that. I calculated on 2 different ways these x-es, and I only get imaginary solutions (?) – L_McClain Jan 20 '14 at 16:48
@L_McClain, how about $x=1$. Let me add the '-' sign – lab bhattacharjee Jan 20 '14 at 16:52
It's IMHO much easier to note that since the LHS is purely real, the RHS must be also, and so $x^2$ must be purely real; this means that either $x=r$ or $x=ri$ for some $r\in\mathbb{R}$, and these two cases can quickly be checked separately. – Steven Stadnicki Jan 20 '14 at 23:42

By "calculuate", I presume you mean "solve for $x$". In that case, simply write two variations of the equation:

$$\frac{ x }{2}=\frac{1}{x^2+1}$$

and

$$\frac{ -x }{2}=\frac{1}{x^2+1}.$$

The solution set of you're original equation is the union of the solution sets of these two.

-
It is important that you note that in the first equation, x must be non-negative, and x must be negative for the second equation. Otherwise in a more complicated question you may introduce false solutions. – SimonT Jan 21 '14 at 0:03

I'd like to offer a different approach to @labbhattacharjee's attempt to solve the equation over $\mathbb C$.

$$\frac{|x|}{2}=\frac{1}{x^2+1}$$

The left hand side is real, so at minimum the right hand side has to be real. The inverse of a real number is real, so $x^2+1$ is real, and the reals are closed under addition, so $x^2$ is real. Thus $x$ is either purely imaginary or purely real. The latter case has already been solved, and in the prior case, the equation reduces to:

$$\frac{|\Im(x)|}{2}=\frac{1}{-\Im(x)^2+1}$$

Which can presumably be solved for a real variable in much the same way as the original equation.

-

Here's a plot of $\frac{ \left| x \right| }{2}-\frac{1}{x^2+1}$ in the complex plane (with corners at $-5-5i$ and $5+5i$):

The zeros at $x=\pm 1$ are visible as black sinks. The colorizing is such that modulus is encoded as brightness and phase is encoded as hue. Not meant to be taken as a serious answer, but meant to be a visual supplement.

-