# Write f as piecewise defined function

#### ludi_srbin

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

#### ludi_srbin

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?

#### ludi_srbin

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.

#### ludi_srbin

So should I put that also?

#### TD

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

#### ludi_srbin

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!

#### ludi_srbin

Yeah. Thanks for help.

#### FluxCapacitator

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.