# Calculating derivative using definition for $f(x)=\frac{x - \sin x}{x^2}$

Really stuck on this one....

$\displaystyle f(x) = \frac{x - \sin{x}}{x^{2}}$ for $x \neq 0$ and $0$ when $x = 0$

Using the definition of the derivative, find $f'(0)$

I know the definition is $$\lim_{h \to 0} \frac{f(x+h)-f(x)}{h}$$

The way I did it was to say $$\lim_{h\to 0}\frac{\frac{(x+h)-\sin(x+h)}{(x+h)^2} - \frac{x - \sin x}{x^2}}{h}$$ $$=\lim_{h\to 0}\frac{\frac{1-\cos(x+h)}{(x+h)^2} - 2\left(\frac{(x+h) - \sin(x+h)}{(x+h)^3}\right)}{1}$$ (using L'Hôpitals Rule) which is $$\frac{1-\cos(x)}{x^2} -\frac{2(x-\sin x)}{x^3}.$$ But then we cant use this to find $f'(0)$ because the denominator it 0!!!

Where am I going wrong?

• @user4645: I find it increasingly disrespectful that you keep posting one question after another without responding to my comments, without accepting any answers, and without making any effort to typeset your posts in a legible manner. I will start flagging your questions for moderator attention if I don't hear back from you soon. – joriki May 27 '11 at 16:38
• @user4645: As joriki says please listen to people's opinions and try improving yourself. – user9413 May 27 '11 at 16:58
• I find it irritating that when a user comments and points out lack of effort, asking more from the OP, or reveals patterns of inappropriate use of this site, others still "jump in" to post a solution. That is disrespectful to the user trying to hold OPs to a certain standard, and it is unhelpful to the OP in the longrun...so long as such an OP gets people to do work for them, such behavior is rewarded. Note, again, the OP has not accepted any answers, despite repeated use of this site, has not upvoted answers, has not responded to users interested in helping... Is it all about rep, or what? – Namaste May 27 '11 at 21:22
• @amWhy: It's not about rep (at least, not for me); rather, it's about the idea that the Q&A isn't just for the person asking the Q, it's for anyone who might have the same or similar Q and come along here later or be brought here later by a search that hit upon this question. If the question itself is interesting and worthwhile, I am inclined to answer it (or provide error analysis and/or hints, as appropriate), regardless of who's asking the question. Generally, if I think a question is worth answering, I also think it's worth the effort to reformat and improve the question itself, too. – Isaac May 27 '11 at 22:00
• I didn't mean to sound harsh; I just came from a situation where I put in an extraordinary amount of time preparing a solution to a post, waiting for more info from the user before posting, and in the meantime another user posted an answer, step by step, which was wrong...So I think my irritation simply spilled over here...I should have taken a deep breath before posting. – Namaste May 27 '11 at 22:15

You misapplied the definition of the derivative. If you want to find $f'(0)$, you cannot apply the formula for $f$ when $x\neq 0$ in $\lim_{h \to 0} \frac{f(x+h)-f(x)}{h}$, then substitute $x=0$; you first have to substitute $x=0$ to get $$\lim_{h \to 0} \frac{f(0+h)-f(0)}{h},$$ then apply the definition for $f$, noting that $f(0)=0$ by definition.
• @user4645: In general, you should be able to do it either way. The problem is that when you tried to find $f'(x)$ in general, you used the formula for $f(x)$ that only applied when $x\neq 0$, so your formula for $f'(x)$ will only be valid when $x\neq 0$. Your method should yield a correct formula for $f'(x)$ for $x\neq 0$. For $f'(2)$, you could either put 2 instead of 0 in the formula that I used or use the formula that you found for $f'(x)$ (the problem is only at $x=0$). – Isaac May 30 '11 at 19:30
So here you have $$f'(0)= \lim_{h \to 0} \frac{f(0+h)-f(0)}{h} = \lim_{h \to 0} \biggl[\frac{h - \sin{h}}{h^{3}}\biggr]$$
Keep applying the L hospitals rule or else use expansion for the $\sin$ function which is given by $$\sin{h} = h -\frac{h^{3}}{3!} + \frac{h^{5}}{5!} - \cdots$$