Find derivative by first principle method
Let f(x)=cos(x2+1)
f'(x)=limh→0cos[(x+h)2+1]−cos(x2+1)h
[f′(x)=limh→0f(x+h)−f(x)h]
=limh→02sin⎛⎜
⎜
⎜
⎜⎝2x2+h2+2xh+22⎞⎟
⎟
⎟
⎟⎠sin(−h2−2xh2)h
[∵cosC−cosD=2sinC+D2sinD−C2]
=limh→0−2sin⎛⎜⎝x2+xh+h22+1⎞⎟⎠sin(2xh+h22)h
=limh→0−2sin⎛⎜⎝x2+xh+h22+1⎞⎟⎠.limh→0sin(h(2x+h)2h
=−2sin(x2+1)limh→0sin[h(2x+h)2]h.h(2x+h2)
×h(2x+h)2
=−2sin(x2+1)limh→0sin[h(2x+h)2]h(2x+h2) ×limh→0(2x+h)2
=−2sin(x2+1).2x2 (∵limθ→0sinθθ=1)
=−2xsin(x2+1)
Hence the required answer is
−2xsin(x2+1)