# Using formal definition to find derivative

• Nov 24th 2012, 11:23 AM
zzizi
Using formal definition to find derivative
Hi

I have to find the derivative of the following function: xsinx
Using formal definition. I have tried to start this but am stuck. Can someone give me a hint to help me complete it?

What I have done so far..

lim as h approaches 0

(x+h)(sinx+h) - (xsinx)/h <---- is this correct? or have I missed something?
• Nov 24th 2012, 11:30 AM
HallsofIvy
Re: Using formal definition to find derivative
Strictly speaking, what you have is NOT correct but only because you are missing parentheses. The derivative is given by the limit of ((x+h)sinx+h- xsinx)/h. What you wrote would be (x+y)sinx+h- (xsinx/h). Even clearer would be ((x+h)sin(x+h)- xsin(x))/h. Now I would recommend that you use "-a+ a" to isolate the changes:
((x+h)sin(x+h)- xsin(x+h)+ xsin(x+h)- xsin(x))/h and separate into (((x+h)- x)/h)sin(x)+ x((sin(x+h)- sin(x))/h.
The first you should recognise as the derivative of x and the second as the derivative of sine.
• Nov 24th 2012, 11:38 AM
zzizi
Re: Using formal definition to find derivative
Thank you very much
• Nov 24th 2012, 12:20 PM
Deveno
Re: Using formal definition to find derivative
using the definition:

$\displaystyle f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$

for f(x) = xsin(x), we get:

$\displaystyle f'(x) = \lim_{h \to 0} \frac{(x+h)\sin(x+h) - x\sin(x)}{h}$

$\displaystyle = \lim_{h \to 0}\left[\frac{x\sin(x+h)- x\sin(x)}{h} + \frac{h\sin(x+h)}{h} \right]$

can you continue?
• Nov 24th 2012, 12:25 PM
zzizi
Re: Using formal definition to find derivative
Thank you Deveno!!!

Yes I can (Nod)
• Nov 24th 2012, 02:27 PM
Soroban
Re: Using formal definition to find derivative
Hello, zzizi!

I just had to try this myself . . .

We need two theorems:

. . $\displaystyle \lim_{h\to0}\frac{\sin h}{h} \:=\:1 \qquad \lim_{h\to0}\frac{\cos h - 1}{h} \:=\:0$

Quote:

Using the formal definition, differentiate: $\displaystyle f(x) \,=\,x\sin x$

$\displaystyle f(x+h) - f(x) \;=\;(x+h)\sin(x+h) - x\sin x$

. . . . . . . . . . . .$\displaystyle =\;x\sin(x+h) + h\sin(x+h) - x\sin x$

. . . . . . . . . . . .$\displaystyle =\;x\big[\sin(x+h) - \sin x\big] + h\sin(x+h)$

. . . . . . . . . . . .$\displaystyle =\;x(\sin x\cos h + \cos x\sin h - \sin x) + h(\sin x\cos h + \cos x\sin h)$

. . . . . . . . . . . .$\displaystyle =\;x\big[\sin x(\cos h -1) + \cos x\sin h\big] + h\left(\sin x\cos h + \cos x\sin h\right)$

$\displaystyle \frac{f(x+h)-f(x)}{h} \:=\:x\left[\sin x\!\cdot\!\frac{\cos h - 1}{h} + \cos x\!\cdot\!\frac{\sin h}{h}\right] +\sin x\cos h+\cos x\sin h$

$\displaystyle \lim_{h\to0}\frac{f(x+h)-f(x)}{h} \;=\;x\left[\sin x\left(\lim_{h\to0}\frac{\cos h-1}{h}\right) + \cos x\left(\lim_{h\to0}\frac{\sin h}{h}\right)\right]$

. . . . . . . . . . . . . . . . . . . $\displaystyle + \sin x\left(\lim_{h\to0}\cos h\right) + \cos x\left(\lim_{h\to0}\sin h\right)$

Therefore: .$\displaystyle f'(x) \;=\;x\big[\sin x\cdot 0 + \cos x \cdot 1\big] + \sin x\cdot 1 + \cos x\cdot 0$

. . . . . . . . .$\displaystyle f'(x) \;=\;x\cos x + \sin x$ . . ta-DAA!

Edit: Ah, too slow again!
. . . .Oh well, I simply refuse to delete all this typing.
• Nov 24th 2012, 11:01 PM
zzizi
Re: Using formal definition to find derivative
Quote:

Originally Posted by Soroban
Hello, zzizi!

I just had to try this myself . . .

We need two theorems:

. . $\displaystyle \lim_{h\to0}\frac{\sin h}{h} \:=\:1 \qquad \lim_{h\to0}\frac{\cos h - 1}{h} \:=\:0$

$\displaystyle f(x+h) - f(x) \;=\;(x+h)\sin(x+h) - x\sin x$

. . . . . . . . . . . .$\displaystyle =\;x\sin(x+h) + h\sin(x+h) - x\sin x$

. . . . . . . . . . . .$\displaystyle =\;x\big[\sin(x+h) - \sin x\big] + h\sin(x+h)$

. . . . . . . . . . . .$\displaystyle =\;x(\sin x\cos h + \cos x\sin h - \sin x) + h(\sin x\cos h + \cos x\sin h)$

. . . . . . . . . . . .$\displaystyle =\;x\big[\sin x(\cos h -1) + \cos x\sin h\big] + h\left(\sin x\cos h + \cos x\sin h\right)$

$\displaystyle \frac{f(x+h)-f(x)}{h} \:=\:x\left[\sin x\!\cdot\!\frac{\cos h - 1}{h} + \cos x\!\cdot\!\frac{\sin h}{h}\right] +\sin x\cos h+\cos x\sin h$

$\displaystyle \lim_{h\to0}\frac{f(x+h)-f(x)}{h} \;=\;x\left[\sin x\left(\lim_{h\to0}\frac{\cos h-1}{h}\right) + \cos x\left(\lim_{h\to0}\frac{\sin h}{h}\right)\right]$

. . . . . . . . . . . . . . . . . . . $\displaystyle + \sin x\left(\lim_{h\to0}\cos h\right) + \cos x\left(\lim_{h\to0}\sin h\right)$

Therefore: .$\displaystyle f'(x) \;=\;x\big[\sin x\cdot 0 + \cos x \cdot 1\big] + \sin x\cdot 1 + \cos x\cdot 0$

. . . . . . . . .$\displaystyle f'(x) \;=\;x\cos x + \sin x$ . . ta-DAA!

Edit: Ah, too slow again!
. . . .Oh well, I simply refuse to delete all this typing.

That's wonderful Soroban! :) But why was it slow? what happened?
• Nov 24th 2012, 11:07 PM
MarkFL
Re: Using formal definition to find derivative
Apparently it took soroban over two hours to type his response...(Shake)(Nod)(Giggle)(Rock)(Clapping)
• Nov 24th 2012, 11:18 PM
jakncoke
Re: Using formal definition to find derivative
Quote:

Originally Posted by MarkFL2
Apparently it took soroban over two hours to type his response...(Shake)(Nod)(Giggle)(Rock)(Clapping)

All those god damn brackets and parenthesis.
• Nov 24th 2012, 11:36 PM
MarkFL
Re: Using formal definition to find derivative
He is the man when it comes to $\displaystyle \LaTeX$!!!:cool:
• Nov 24th 2012, 11:43 PM
zzizi
Re: Using formal definition to find derivative
Oh right! (Bigsmile) Thank you very much Soroban for the effort, it has helped me understand (Yes)
• Nov 24th 2012, 11:50 PM
Prove It
Re: Using formal definition to find derivative
If I was to do this using first principles, I'd evaluate the derivatives of \displaystyle \displaystyle \begin{align*} x \end{align*} and \displaystyle \displaystyle \begin{align*} \sin{x} \end{align*} by first principles, then prove the product rule using first principles and apply it :)

\displaystyle \displaystyle \begin{align*} f_1(x) &= x \\ f_1 ' (x) &= \lim_{h \to 0}\frac{f_1(x + h) - f_1(x)}{h} \\ &= \lim_{h \to 0}\frac{x + h - x}{h} \\ &= \lim_{h \to 0}\frac{h}{h} \\ &= \lim_{h \to 0} 1 \\ &= 1 \\ \\ f_2(x) &= \sin{(x)} \\ f_2 '(x) &= \lim_{h \to 0}\frac{f_2(x + h) - f_2(x)}{h} \\ &= \lim_{h \to 0}\frac{\sin{(x+h)} - \sin{(x)}}{h} \\ &= \lim_{h \to 0}\frac{\sin{(x)}\cos{(h)} + \cos{(x)}\sin{(h)} - \sin{(x)}}{h} \\ &= \sin{(x)}\lim_{h \to 0}\frac{\cos{(h)} - 1}{h} + \cos{(x)}\lim_{h \to 0}\frac{\sin{(h)}}{h} \\ &= \sin{(x)} \cdot 0 + \cos{(x)} \cdot 1 \\ &= \cos{(x)} \end{align*}

Now as for the product rule...

\displaystyle \displaystyle \begin{align*} \left[ u(x) v(x) \right]' &= \lim_{h \to 0}\frac{u(x + h)v(x + h) - u(x)v(x)}{h} \\ &= \lim_{h \to 0}\frac{u(x+h)v(x+h) - u(x +h)v(x) + u(x +h)v(x) - u(x)v(x)}{h} \\ &= \lim_{h \to 0}u(x+h) \cdot \lim_{h \to 0}\frac{v(x+h) - v(x)}{h} + v(x)\cdot \lim_{h \to 0}\frac{u(x+h) - u(x)}{h} \\ &= u(x) v'(x) + u'(x) v(x) \end{align*}

So that means

\displaystyle \displaystyle \begin{align*} \left[ x\sin{(x)} \right]' &= x \left[ \sin{(x)} \right]' + (x)' \sin{(x)} \\ &= x\cos{(x)} + \sin{(x)} \end{align*}
• Nov 24th 2012, 11:58 PM
zzizi
Re: Using formal definition to find derivative
Quote:

Originally Posted by Prove It
If I was to do this using first principles, I'd evaluate the derivatives of \displaystyle \displaystyle \begin{align*} x \end{align*} and \displaystyle \displaystyle \begin{align*} \sin{x} \end{align*} by first principles, then prove the product rule using first principles and apply it :)

\displaystyle \displaystyle \begin{align*} f_1(x) &= x \\ f_1 ' (x) &= \lim_{h \to 0}\frac{f_1(x + h) - f_1(x)}{h} \\ &= \lim_{h \to 0}\frac{x + h - x}{h} \\ &= \lim_{h \to 0}\frac{h}{h} \\ &= \lim_{h \to 0} 1 \\ &= 1 \\ \\ f_2(x) &= \sin{(x)} \\ f_2 '(x) &= \lim_{h \to 0}\frac{f_2(x + h) - f_2(x)}{h} \\ &= \lim_{h \to 0}\frac{\sin{(x+h)} - \sin{(x)}}{h} \\ &= \lim_{h \to 0}\frac{\sin{(x)}\cos{(h)} + \cos{(x)}\sin{(h)} - \sin{(x)}}{h} \\ &= \sin{(x)}\lim_{h \to 0}\frac{\cos{(h)} - 1}{h} + \cos{(x)}\lim_{h \to 0}\frac{\sin{(h)}}{h} \\ &= \sin{(x)} \cdot 0 + \cos{(x)} \cdot 1 \\ &= \cos{(x)} \end{align*}

Now as for the product rule...

\displaystyle \displaystyle \begin{align*} \left[ u(x) v(x) \right]' &= \lim_{h \to 0}\frac{u(x + h)v(x + h) - u(x)v(x)}{h} \\ &= \lim_{h \to 0}\frac{u(x+h)v(x+h) - u(x +h)v(x) + u(x +h)v(x) - u(x)v(x)}{h} \\ &= \lim_{h \to 0}u(x+h) \cdot \lim_{h \to 0}\frac{v(x+h) - v(x)}{h} + v(x)\cdot \lim_{h \to 0}\frac{u(x+h) - u(x)}{h} \\ &= u(x) v'(x) + u'(x) v(x) \end{align*}

So that means

\displaystyle \displaystyle \begin{align*} \left[ x\sin{(x)} \right]' &= x \left[ \sin{(x)} \right]' + (x)' \sin{(x)} \\ &= x\cos{(x)} + \sin{(x)} \end{align*}

Thank you very much for your input Prove it - much appreciated! :D