# Write f as piecewise defined function

Let f(x)=x+|x| and g be defined by the rule "g(x) is the slope of the graph pf f at x".

Write f as piecewise defined function. Related Introductory Physics Homework Help News on Phys.org
Can I write it just like

f(x)={ x+|x| if x>1

TD
Homework Helper
Where x > 0, you get f(x) = 2x.
Where x < 0, you get f(x) = 0.

Does that help?

O, got you. Thanks.

honestrosewater
Gold Member
TD said:
Where x > 0, you get f(x) = 2x.
Where x < 0, you get f(x) = 0.

Does that help?
Minor point: don't forget x = 0 in your definition. So should I put that also?

TD
Homework Helper
Make the first one $$\ge$$ then ;o)

And If I want to find g I use derivative???

TD
Homework Helper
Sure, you could do that. Should be quite simple in this case!

Yeah. Thanks for help.

Just remember that your derivative doesn't exist at x=0. I've gotten points taken off because I wrote the derivative with less than or equal signs, even though it's supposed to have just a less than sign.