Mister Exam

Other calculators

|x-4|+|x+4|=a equation

The teacher will be very surprised to see your correct solution 😉

v

Numerical solution:

Do search numerical solution at [, ]

The solution

You have entered [src]
|x - 4| + |x + 4| = a
x4+x+4=a\left|{x - 4}\right| + \left|{x + 4}\right| = a
Detail solution
For every modulo expressions in the equation
allow cases, when this expressions ">=0" or "<0",
solve the resulting equation.

1.
x40x - 4 \geq 0
x+40x + 4 \geq 0
or
4xx<4 \leq x \wedge x < \infty
we get the equation
a+(x4)+(x+4)=0- a + \left(x - 4\right) + \left(x + 4\right) = 0
after simplifying we get
a+2x=0- a + 2 x = 0
the solution in this interval:
x1=a2x_{1} = \frac{a}{2}

2.
x40x - 4 \geq 0
x+4<0x + 4 < 0
The inequality system has no solutions, see the next condition

3.
x4<0x - 4 < 0
x+40x + 4 \geq 0
or
4xx<4-4 \leq x \wedge x < 4
we get the equation
a+(4x)+(x+4)=0- a + \left(4 - x\right) + \left(x + 4\right) = 0
after simplifying we get
8a=08 - a = 0
the solution in this interval:

4.
x4<0x - 4 < 0
x+4<0x + 4 < 0
or
<xx<4-\infty < x \wedge x < -4
we get the equation
a+(4x)+(x4)=0- a + \left(4 - x\right) + \left(- x - 4\right) = 0
after simplifying we get
a2x=0- a - 2 x = 0
the solution in this interval:
x2=a2x_{2} = - \frac{a}{2}


The final answer:
x1=a2x_{1} = \frac{a}{2}
x2=a2x_{2} = - \frac{a}{2}
The graph
Rapid solution [src]
         //-a            \     //-a            \
         ||---  for a > 8|     ||---  for a > 8|
x1 = I*im|< 2            | + re|< 2            |
         ||              |     ||              |
         \\nan  otherwise/     \\nan  otherwise/
x1=re({a2fora>8NaNotherwise)+iim({a2fora>8NaNotherwise)x_{1} = \operatorname{re}{\left(\begin{cases} - \frac{a}{2} & \text{for}\: a > 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)} + i \operatorname{im}{\left(\begin{cases} - \frac{a}{2} & \text{for}\: a > 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)}
         // a             \     // a             \
         || -   for a >= 8|     || -   for a >= 8|
x2 = I*im|< 2             | + re|< 2             |
         ||               |     ||               |
         \\nan  otherwise /     \\nan  otherwise /
x2=re({a2fora8NaNotherwise)+iim({a2fora8NaNotherwise)x_{2} = \operatorname{re}{\left(\begin{cases} \frac{a}{2} & \text{for}\: a \geq 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)} + i \operatorname{im}{\left(\begin{cases} \frac{a}{2} & \text{for}\: a \geq 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)}
Eq(x2, re(Piecewise((a/2, a >= 8), (nan, True))) + i*im(Piecewise((a/2, a >= 8), (nan, True))))
Sum and product of roots [src]
sum
    //-a            \     //-a            \       // a             \     // a             \
    ||---  for a > 8|     ||---  for a > 8|       || -   for a >= 8|     || -   for a >= 8|
I*im|< 2            | + re|< 2            | + I*im|< 2             | + re|< 2             |
    ||              |     ||              |       ||               |     ||               |
    \\nan  otherwise/     \\nan  otherwise/       \\nan  otherwise /     \\nan  otherwise /
(re({a2fora>8NaNotherwise)+iim({a2fora>8NaNotherwise))+(re({a2fora8NaNotherwise)+iim({a2fora8NaNotherwise))\left(\operatorname{re}{\left(\begin{cases} - \frac{a}{2} & \text{for}\: a > 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)} + i \operatorname{im}{\left(\begin{cases} - \frac{a}{2} & \text{for}\: a > 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)}\right) + \left(\operatorname{re}{\left(\begin{cases} \frac{a}{2} & \text{for}\: a \geq 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)} + i \operatorname{im}{\left(\begin{cases} \frac{a}{2} & \text{for}\: a \geq 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)}\right)
=
    // a             \       //-a            \     // a             \     //-a            \
    || -   for a >= 8|       ||---  for a > 8|     || -   for a >= 8|     ||---  for a > 8|
I*im|< 2             | + I*im|< 2            | + re|< 2             | + re|< 2            |
    ||               |       ||              |     ||               |     ||              |
    \\nan  otherwise /       \\nan  otherwise/     \\nan  otherwise /     \\nan  otherwise/
re({a2fora>8NaNotherwise)+re({a2fora8NaNotherwise)+iim({a2fora>8NaNotherwise)+iim({a2fora8NaNotherwise)\operatorname{re}{\left(\begin{cases} - \frac{a}{2} & \text{for}\: a > 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)} + \operatorname{re}{\left(\begin{cases} \frac{a}{2} & \text{for}\: a \geq 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)} + i \operatorname{im}{\left(\begin{cases} - \frac{a}{2} & \text{for}\: a > 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)} + i \operatorname{im}{\left(\begin{cases} \frac{a}{2} & \text{for}\: a \geq 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)}
product
/    //-a            \     //-a            \\ /    // a             \     // a             \\
|    ||---  for a > 8|     ||---  for a > 8|| |    || -   for a >= 8|     || -   for a >= 8||
|I*im|< 2            | + re|< 2            ||*|I*im|< 2             | + re|< 2             ||
|    ||              |     ||              || |    ||               |     ||               ||
\    \\nan  otherwise/     \\nan  otherwise// \    \\nan  otherwise /     \\nan  otherwise //
(re({a2fora>8NaNotherwise)+iim({a2fora>8NaNotherwise))(re({a2fora8NaNotherwise)+iim({a2fora8NaNotherwise))\left(\operatorname{re}{\left(\begin{cases} - \frac{a}{2} & \text{for}\: a > 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)} + i \operatorname{im}{\left(\begin{cases} - \frac{a}{2} & \text{for}\: a > 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)}\right) \left(\operatorname{re}{\left(\begin{cases} \frac{a}{2} & \text{for}\: a \geq 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)} + i \operatorname{im}{\left(\begin{cases} \frac{a}{2} & \text{for}\: a \geq 8 \\\text{NaN} & \text{otherwise} \end{cases}\right)}\right)
=
/                  2            
|-(I*im(a) + re(a))             
|--------------------  for a > 8
<         4                     
|                               
|        nan           otherwise
\                               
{(re(a)+iim(a))24fora>8NaNotherwise\begin{cases} - \frac{\left(\operatorname{re}{\left(a\right)} + i \operatorname{im}{\left(a\right)}\right)^{2}}{4} & \text{for}\: a > 8 \\\text{NaN} & \text{otherwise} \end{cases}
Piecewise((-(i*im(a) + re(a))^2/4, a > 8), (nan, True))