Question
Question: How do you write \[\left| {{x^2} + x - 12} \right|\] as a piecewise function?...
How do you write x2+x−12 as a piecewise function?
Solution
This problem deals with subdividing the given function into a piecewise function. A piecewise function comes into picture whenever there is a modulus present in the function. For example there is a function f(x)=∣g(x)∣, then it is written as a piecewise function as shown below:
\Rightarrow f\left( x \right) = \left\\{ {\begin{array}{*{20}{c}}
{\begin{array}{*{20}{c}}
{g\left( x \right);}&{x > 0}
\end{array}} \\\
{\begin{array}{*{20}{c}}
{ - g\left( x \right);}&{x < 0}
\end{array}}
\end{array}} \right.
Complete step-by-step solution:
In mathematics, a piecewise-defined function is a function defined by multiple sub-functions, where each sub-function applies to a different interval in the domain.
Here the given function is f(x)=x2+x−12, so dividing into the intervals as explained above which is shown below:
\Rightarrow f\left( x \right) = \left\\{ {\begin{array}{*{20}{c}}
{\begin{array}{*{20}{c}}
{{x^2} + x - 12;}&{x > 0}
\end{array}} \\\
{\begin{array}{*{20}{c}}
{ - \left( {{x^2} + x - 12} \right);}&{x < 0}
\end{array}}
\end{array}} \right.
That is rewriting the given function as given below:
\Rightarrow f\left( x \right) = \left\\{ {\begin{array}{*{20}{c}}
{\begin{array}{*{20}{c}}
{{x^2} + x - 12;}&{x > 0}
\end{array}} \\\
{\begin{array}{*{20}{c}}
{ - {x^2} - x + 12;}&{x < 0}
\end{array}}
\end{array}} \right.
But consider the given expression here which is x2+x−12, as shown below:
⇒x2+x−12
Now factoring this expression in order to divide it into actual piecewise function, as shown below:
Here the product of the x2term and the constant term is equal to 12.
The factors of 12 are 4 and 3, so expressed the term x as the difference of 4x and 3x, as shown:
⇒x2+4x−3x−12
Taking x common from the first two terms and -3 common from the second two terms.
⇒x(x+4)−3(x+4)
⇒(x+4)(x−3)
So now this expression is positive for x greater than zero else negative for x less than zero.
⇒(x+4)(x−3)>0
Which means that x+4⩽0 and x−3>0, which implies that the expression x2+x−12 is positive for x⩽−4 and x>3
And the expression x2+x−12 is negative for the values of −4<x<3.
\therefore f\left( x \right) = \left\\{ {\begin{array}{*{20}{c}}
{\begin{array}{*{20}{c}}
{{x^2} + x - 12;}&{x \leqslant - 4}
\end{array}} \\\
{\begin{array}{*{20}{c}}
{\begin{array}{*{20}{c}}
{ - {x^2} - x + 12;} \\\
{{x^2} + x - 12;}
\end{array}}&{\begin{array}{*{20}{c}}
{ - 4 < x < 3} \\\
{x > 3}
\end{array}}
\end{array}}
\end{array}} \right.
Note: Please note that while writing the piecewise function of the given expression, instead of writing the given expression of just the intervals greater than zero and less than zero for the values of x. If the given expression can be factored into two factors, then the piecewise function can be written according to the factors.