Differentiate #xsinx# using first principles?

2 Answers
Feb 6, 2018

#f'(x)=xcosx+sinx#

Explanation:

Derivation from first principles tells us that for a function #f(x)#, #f'(x)=lim_(h->0)(f(x+h)-f(x))/h#

In this case, #f(x)=xsinx#, so we have:
#f'(x)=lim_(h->0)((x+h)sin(x+h)-xsinx)/h#

We can use the identity #sin(A+B)=sinAcosB+sinBcosA#

#color(white)(f'(x))=lim_(h->0)((x+h)(sin(x)cos(h)+cos(x)sin(h))-xsinx)/h#

#color(white)(f'(x))=lim_(h->0)(xsin(x)cos(h)+xcos(x)sin(h)+hsin(x)cos(h)+hcos(x)sin(h)-xsinx)/h#

#color(white)(f'(x))=lim_(h->0)((xsin(x)cos(h))/h+(xcos(x)sin(h))/h+(hsin(x)cos(h))/h+(hcos(x)sin(h))/h-(xsinx)/h)#

#color(white)(f'(x))=lim_(h->0)((xsin(x)cos(h))/h+(xcos(x)sin(h))/h+sin(x)cos(h)+cos(x)sin(h)-(xsinx)/h)#

It is known that:
#lim_(h->0)sinh/h=1#

#color(white)(f'(x))=lim_(h->0)((xsin(x)cos(h))/h+xcos(x)+sin(x)cos(h)+cos(x)sin(h)-(xsinx)/h)#

#color(white)(f'(x))=xcos(x)+sin(x)cos(0)+cos(x)sin(0)+lim_(h->0)((xsin(x)cos(h))/h-(xsinx)/h)#

#color(white)(f'(x))=xcos(x)+sin(x)+lim_(h->0)((xsin(x)cos(h))/h-(xsinx)/h)#

#color(white)(f'(x))=xcos(x)+sin(x)+lim_(h->0)((xsin(x)cos(h)-xsinx)/h)#

#color(white)(f'(x))=xcos(x)+sin(x)+lim_(h->0)((xsin(x)(cos(h)-1))/h)#

#color(white)(f'(x))=xcos(x)+sin(x)+xsin(x)lim_(h->0)(cos(h)-1)/h#

It is also known that:
#lim_(h->0)(cos(h)-1)/h=0#

#color(white)(f'(x))=xcos(x)+sin(x)+xsin(x)0#

#color(white)(f'(x))=xcos(x)+sin(x)#

Proof:
#f(x)=xsinx#

#f'(x)=d/dx[x]sinx+xd/dx[sinx]#
#color(white)(f'(x))=1sinx+xcosx#
#color(white)(f'(x))=xcosx+sinx#

Feb 6, 2018

# d/dx xsinx = x cosx +sinx #

Explanation:

Let us define:

# f(x) = xsinx#

Using the limit definition of the derivative, we compute the derivative using:

# f'(x) = lim_(h rarr 0) (f(x+h)-f(x))/h #

# \ \ \ \ \ \ \ \ \ = lim_(h rarr 0) ((x+h)sin(x+h) - xsinx)/h #

# \ \ \ \ \ \ \ \ \ = lim_(h rarr 0) {x((sin(x+h) - sinx))/h +sin(x+h)} #

# \ \ \ \ \ \ \ \ \ = x lim_(h rarr 0) ((sin(x+h) - sinx))/h +lim_(h rarr 0)sin(x+h) #

# \ \ \ \ \ \ \ \ \ = x {lim_(h rarr 0) (sin(x+h) - sinx)/h} +sinx #

So we only need to calculate the limit:

# L = lim_(h rarr 0) (sin(x+h) - sinx)/h #

Which, coincidentally, is the limit arising from the derivative of #sinx# (by definition). Now using the trigonometric multiply angle identity:

# sin(A+B) -= sinA cosB+cosA sinB #

We get:

# L = lim_(h rarr 0) (sin x cos h + cos x sin h - sin x)/h #

# \ \ \ = lim_(h rarr 0) (sin x (cos h -1))/h+ (cos x sin h)/h #

# \ \ \ = sinx \ {lim_(h rarr 0) (cos h -1)/h } + cos x \ {lim_(h rarr 0) ( sin h)/h} #

Both of these limits are standard calculus limits, and providing #x# is in radians, we have:

# lim_(h rarr 0) (cos h -1)/h =0 \ \ # and # \ \ lim_(h rarr 0) ( sin h)/h = 1 #

With these results, we get the result:

# L = cos x => f'(x) = x cosx +sinx #