# Derivative of -x using first principle

## Homework Statement

This is a silly question,but i have a problem.How do we solve derivative of -x using first principle of derivative. I know that if derivative of x w.r.t x is 1 then ofcourse that of -x should be -1. Also it can be solved by product rule taking derivative of -1.x .

## The Attempt at a Solution

Here is how i attempted it:
f(x)= -x
f(x+h)= -x+h
Using first principle :
dy/dx = [-x+h-(-x)]/h
= h/h
= 1
what is wrong here?please help. Thanks in advance  blue_leaf77
Homework Helper
f(x+h) = -x-h

f(x+h) = -x-h
But how does that work? Why it isn't -x+h ? PeroK
Homework Helper
Gold Member
2020 Award
But how does that work? Why it isn't -x+h ? Try ##x = 0## and see what you get.

Try ##x = 0## and see what you get.
Hey! I think i got it!
When, f(x)= x^2
f(x+h)= (x+h)^2
If, f(x)= -x
f(x+h)= -(x+h)
= -x-h
Is this right?

• PeroK
Dick
Homework Helper
Hey! I think i got it!
When, f(x)= x^2
f(x+h)= (x+h)^2
If, f(x)= -x
f(x+h)= -(x+h)
= -x-h
Is this right?

Quite right.

• rishi kesh