Sketch a graph of $f(x)=|x^2-1|-|x^2-4|$

823 Views Asked by At

Sketch a graph of $f(x)=|x^2-1|-|x^2-4|$

I thought in order to graph this function, I would try to rewrite $f$ as a piece-wise defined function. The zeros of the absolute values are at $x= \pm 1$ and $x= \pm 2$.

If $x \leq -2$ then $f(x)=x^2-1-x^2+4=3$

If $ -2<x<-1$ then $f(x)=x^2-1+x^2-4=2x^2-5$

If $ -1 \leq x \leq 1$ then $f(x)=1-x^2+x^2-4=-3$

If $ 1<x<2$ then $f(x)=x^2-1+x^2-4=2x^2-5$

if $ x \geq 2$ then $f(x)=x^2-1-x^2+4=3$

My problem is that equation $2$ and $4$ didn't match up when I went to graph it with a calculator. Was this the correct approach or would there be a better way for this particular function.

2

There are 2 best solutions below

0
On

Your solution is absolutely correct. But there is an easier way to solve your problem too. In particular, set $y = x^2$ to get $$g(y)=|y-1|-|y-4|.$$ Now consider three intervals as follows.

  • For $0 \le y \le 1$ (equivalently, $-1 \le x \le 1$), $$g(y)=1-y-(4-y)=-3\implies f(x)=-3.$$

  • For $1 < y < 4$ (equivalently, $1<|x|<2$ or $x \in (-2,-1)\cup(1,2)$), $$g(y)=y-1-(4-y)=2y-5 \implies f(x)=2x^2-5.$$

  • For $y \ge 4$ (equivalently, $|x| \ge2$ or $x \in (-\infty,-2] \cup [2, \infty)$), $$g(y)=y-1-(y-4)=3 \implies f(x)=3.$$

0
On

This is called graph paper. You can plot points on it and then join them up. As far as the vertical placement relative to the smaller squares, between $1$ and $2,$ we have $$ 2 \left( \frac{3}{2} \right)^2 - 5 = - \frac{1}{2}, $$ $$ 2 \left(1 + \frac{k}{4} \right)^2 - 5 = k-3 + \frac{k^2}{8}, \; \; \; \; k = 1,3. $$ $$ 2 \left(1 + \frac{k}{8} \right)^2 - 5 = -3 + \frac{k}{2} + \frac{k^2}{32}, \; \; \; \; k = 1,3,5,7. $$

$1/8$ is half a small square, $1/32$ is an eighth of a small square.

enter image description here

https://www.printablepaper.net/