xcosx (Differentiate with respect to x,using first principle)
Find derivative by first principle method
Let f(x)=xcosx
f′(x)=limh→0(x+h)cos(x+h)−xcosx)h
[f′(x)=limh→0f(x+h)−f(x))h]
=limh→0xcos(x+h)+hcos(x+h)−xcosxh
=limh→0x[cos(x+h)−cosx]+hcos(x+h)h
=limh→02xsin(2x+h2)sin(−h2)+hcos(x+h)h
∵cosC−cosD=2sin(C+D2)sin(D−C2)
=limh→0−2xsin(2x+h2)sin(h2)h+limh→0cos(x+h)
=limh→0−xsin(2x+h2)sin(h2)(h2)+limh→0cos(x+h)
=−xsinx+cosx (∵limθ→0sinθθ=1)
hence the required answer is
f′(x)=−xsinx+cosx