Some examples for you to try

Try plotting   y = x-|x-3|.
Click the code below to check your answer.

In[82]:=

Plot[x - Abs[x - 3], {x, -2, 6}, Ticks→ {Range[-2, 6], Range[-7, 3]}, AspectRatio→Automatic]

Try plotting   y = 2x+1-|x+1|.
Click the code below to check your answer.

In[88]:=

Plot[2x + 1 - Abs[x + 1], {x, -2, 3}, Ticks→ {Range[-2, 3], Range[-5, 3]}, AspectRatio→Automatic]

The next one will involve fractions. (Oooohhhh...!)

y = |2x+3|-x-1

In[90]:=

Plot[Abs[2x + 3] - x - 1, {x, -3, 1}, Ticks→ {Range[-3, 1], Range[-1, 5]}, AspectRatio→Automatic]

Here are a few slightly harder ones, with several absolute values.

y=|x-1|+|2x+4|+x

In[96]:=

Plot[Abs[x - 1] + Abs[2x + 4] + x, {x, -4, 2}, Ticks→ {Range[-4, 2], Range[-1, 10]}, AspectRatio→Automatic]

y=|x-1|-|2x-4|+x

In[97]:=

Plot[Abs[x - 1] - Abs[2x - 4] + x, {x, -1, 4}, Ticks→ {Range[-1, 4], Range[-5, 3]}, AspectRatio→Automatic]

y = |x-1| - |x+2| + |x|

In[103]:=

Plot[Abs[x - 1] - Abs[x + 2] + Abs[x], {x, -4, 4}, Ticks→ {Range[-4, 4], Range[-3, 7]}, AspectRatio→Automatic]

You might even me able to handle this next one...

y = |x^2-1| - x

In[108]:=

Plot[Abs[x^2 - 1] - x, {x, -4, 4}, Ticks→ {Range[-4, 4], Range[-2, 10]}, AspectRatio→Automatic]


Created by Mathematica  (June 17, 2006) Valid XHTML 1.1!