-2

I know that you draw an absolute value graph by writing the equation in the format of $y = a \vert x - p \vert + q$ and I know how to draw it from there, but what do you do when there is an $x$ value outside the absolute signs?

Nash J.
  • 1,235
  • 8
  • 18

6 Answers6

0

We can write absolute value as a piecewise function,

$$|x| = \begin{cases} x & x\geq 0,\\ -x & x<0\end{cases}$$

Using that for your equation will give you two functions to graph, one on the positive half of the line and the other for the negative half.

0

Use WolframAlpha or the method that @TonyS.F. said:

Code: Plot[Abs[2*x+1]+x-3,{x,-10,10}]

Jan Eerland
  • 28,671
0

Note that

  • for $x \ge -\frac 12\implies y=3x-2$
  • for $x < -\frac 12\implies y=-x-4$
user
  • 154,566
0

Let's call the function $f$, so $f(x)=|2x+1|+x-3$. You can evaluate $f$'s value for some $x$s, plot the $(x,f(x))$ points, and connect them. Since it's linear, you should connect the points with lines.

Botond
  • 11,938
0

By the definition of the absolute value, you have:

$$\left|2x+1\right| = \begin{cases} 2x+1 &\mbox{if }\; x\geq -\tfrac{1}{2} \\ -2x-1 &\mbox{if }\; x< -\tfrac{1}{2} \end{cases}$$

and thus:

$$\left|2x+1\right|+x-3 = \begin{cases} 3x-2 & \mbox{if }\; x\geq -\tfrac{1}{2} \\ -x-4 & \mbox{if }\; x< -\tfrac{1}{2} \end{cases}$$ So graphing comes down to drawing two (half)lines: one on each side of $x=-\tfrac{1}{2}$.

StackTD
  • 27,903
  • 34
  • 63
-1

Well...can you break two cases for $x \ge -\frac 12$ and $x <- \frac 12$?

Jaideep Khare
  • 19,293