Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

L'Hopital's rule

  1. Jul 10, 2012 #1
    How can I find the limit for [f(x)-cosa]/(x-a) using l'Hopital's rule?

    Note: when x≠a, f(x)= [sinx-sina]/ (x-a)
    when x=a, f(x)= cosa

    So,here's what I know,

    Since f(x)= cosa, then f(a)= cosa and therefore, substituting this into [f(x)-cosa]/(x-a) gives [f(x)-f(a)]/(x-a)

    l'Hopital's rule says that to find the limit, we can differentiate the numerator and denominator seperately. How do I do that?

    Is it like this?

    for the numerator =>[f'(x) - f'(a)]
    for the denominator, should I differentiate it with respect to x or a?? I don't know how to differentiate x-a.
  2. jcsd
  3. Jul 10, 2012 #2

    If I understood correctly, you want
    [tex]\lim_{x\to a}\frac{f(x)-\cos a}{x-a}\,\,,\,\,f(x):=\left\{ \begin{array} \frac \frac{\sin x-\sin a} {x-a}\,&\,\text{for}\;\;\,x\neq a\\{}\\ \cos a\,&\,\text{for}\;\;\,x=a\end{array}\right.[/tex]
    Applying L'Hospital's rule, we get:
    [tex]\lim_{x\to a}\frac{f(x)-\cos a}{x-a}=\lim_{x\to a}\frac{f'(x)}{1}=\lim_{x\to a}\cos x=\cos a[/tex]

  4. Jul 10, 2012 #3


    User Avatar
    Homework Helper

    differentiate it with respect to x
    You do not need l'Hopital's rule because
    limit for [f(x)-cos a]/(x-a)=[f(x)-f(a)]/(x-a)=f'(a) by the definition (newton quotient)
    so find f'(a)
    you can either work through it directly of recognize f as a familiar function.
  5. Jul 10, 2012 #4
    But cosa is equals to f(a). I think we should differentiate that too.So the limit is going to be for [f(x)-f(a)]/ (x-a) ,right?

    The answer here is -(sina)/2. But I don't know how to get that.
  6. Jul 10, 2012 #5
    But if I just fiind f'(a), won't it be -sina?? The answer given is -(sina)/2 .
  7. Jul 10, 2012 #6
    Hi there, can you explain to me something? I just don't understand the bolded part(the last part) of this problem. Actually, this is a solution to the question on finding the limit of 1/(sin(x) - sin(a)) - 1/((x - a)cos(a)).

    The solution is:
    Clearly we can't use l'Hopital's rule yet, so let's use the hint. We need a Taylor series for sin(x) centred at x = a. We know the successive derivatives of sin(x), so this should be fairly simple. Moreover, since the derivatives are all still everywhere bounded by -1 and 1, Taylor's theorem will still prove that the series will converge to sin(x) for all x. So, we get that, for all x:

    sin(x) = (sin(a)/0!) + (cos(a)/1!)(x - a) - (sin(a)/2!)(x - a)^2 - (cos(a)/3!)(x - a)^3 + (sin(a)/4!)(x - a)^4 + ...

    sin(x) - sin(a) = (x - a)(cos(a)/1! - (sin(a)/2!)(x - a) - (cos(a)/3!)(x - a)^2 + (sin(a)/4!)(x - a)^3 + ...)

    Let f(x) = cos(a)/1! - (sin(a)/2!)(x - a) - (cos(a)/3!)(x - a)^2 + (sin(a)/4!)(x - a)^3 + ...

    i.e. (sin(x) - sin(a)) / (x - a) if x is not equal to a, or cos(a) if it is. The important thing to realise is that, as a function defined by a power series, it is infinitely differentiable everywhere on the interior of its domain (in this case, everywhere), and therefore continuous and differentiable everywhere. Then:

    1 / (sin(x) - sin(a)) - 1 / ((x - a)cos(a))
    = 1 / ((x - a)f(x)) - 1 / ((x - a)cos(a))
    = (1 / (x - a))(1 / f(x) - 1 / cos(a))
    = -(f(x) - cos(a)) / ((x - a)cos(a)f(x))

    -(f(x) - cos(a)) / ((x - a)cos(a)f(x))

    Here's where we could use l'Hopital's rule, but I think it would be redundant. We can separate the factors like so:

    -1 / (cos(a)f(x)) * (f(x) - cos(a)) / (x - a)

    The first factor is continuous so long as the limit of f(x) as x approaches a is not 0. But, f(x) is continuous, so the limit is f(a), which is clearly equal to cos(a). Since cos(a) appears in the denominator, we already presuppose that cos(a) is non-zero, so the limit of the first factor is -1 / cos^2(a).

    The second factor can be rewritten as such:

    (f(x) - f(a)) / (x - a)

    The limit as x approaches a could be determined by differentiating top and bottom, or by simply noticing that this is a definition of the derivative of f at a point a. We know it exists because f is defined as a power series. We can determine the limit either by differentiating term by term and substituting x = a, or by recalling that power series are their own Taylor expansion around their centre, which means the derivative, divided by 1!, will be the coefficient of (x - a)^1, which is -sin(a)/2!. Thus:

    f'(a) = -sin(a) / 2

    Therefore, the limit is:

    -1 / cos^2(a) * -sin(a) / 2
    = sec(a)tan(a) / 2

    OK,back to my question. Can you explain this part where the bolded part?

    If I use l'Hopital's rule, I must differentiate the numerator and the denominator,right? The denominator is just x-a so the derivative would be 1 with respect to x,isn't it?What about the numerator?How do I differentiate f(x)-f(a)?
  8. Jul 10, 2012 #7

    No, we don't have. Of course, you can differentiate that with respect to x and you'll get zero as it is a constant.

  9. Jul 10, 2012 #8


    User Avatar
    Homework Helper

    "But if I just fiind f'(a), won't it be -sina??"
    If you apply l'Hopital's rule to
    limit [f(x)-cos a]/(x-a)=limit [f(x)-f(a)]/(x-a)=f'(a)
    That does not really help, the problem remains to find f'(a)

    If use of series expansion is allowed as you note it helps to use
    "How do I differentiate f(x)-f(a)?"
    Last edited: Jul 10, 2012
  10. Jul 10, 2012 #9
    Can you explain to me the bolded part?
  11. Jul 10, 2012 #10


    User Avatar
    Homework Helper

    If use of series expansion is allowed as you note it helps to use
    in particular try to write a Taylor series for
    f(x) then use it to compute f'(a)
    Last edited: Jul 10, 2012
  12. Jul 10, 2012 #11
    Oh, so the result of the l'hopital's rule is [0 - f'(a)]/1,right?
    Now how do I find f'(a)? Can't I just differentiate cosa??Why not?
  13. Jul 10, 2012 #12
    The taylor series is already written in the solution as you see. But how do I relate that to finding f'(a)?
  14. Jul 10, 2012 #13


    User Avatar
    Homework Helper

    the result of the l'hopital's rule is f'(a)/1=f'(a)
    we have

    f(x)=(sin x-sin a)/(x-a) x!=a
    f(x)=cos(a) x=a

    using sin(x)=sin(a)+(x-a)cos(a)-(1/2)(x-a)^2sin(a)-(1/6)(x-a)^3cos(a)+...
    we find
    this for all x (x=a and x!=a)
    and makes it easy to find
  15. Jul 10, 2012 #14
    Wait, before going further, how is it the result of the lhopital's rule f'(a)?
    I thought it would be negative f'(a) since we were find the limit of [f'(x) - f'(a)]/[x-a]
    where f'(x) = 0 since f(x) = cosa. I'm confused here :confused:
  16. Jul 10, 2012 #15


    User Avatar
    Homework Helper

    we have
    limit (f(x)-cos(a))/(x-a)=limit (f(x)-f(a))/(x-a)
    since f(a)=cos(a)
    f'(a)=limit (f(x)-f(a))/(x-a)
    is the definition of the derivative, but if we must use l'Hopital's rule
    limit (f(x)-f(a))/(x-a)=limit (f(x)-f(a))'/(x-a)'
    limit (f(x)-f(a))/(x-a)=limit (f(x)-f(a))'/(x-a)'=lim f'(x)/1=f'(a)
  17. Jul 10, 2012 #16
    Oh,yes, now I got the limit. But why is f'(a)=limit (f(x)-f(a))/(x-a) the definition of the derivative?
  18. Jul 11, 2012 #17


    User Avatar
    Homework Helper

    That is the definition. It comes from the slope of a secant line
    Geometrically the derivative is the limit as x->a of the secant line, which is then (when it exists) a tangent line.
  19. Jul 11, 2012 #18
    So f'(a) is just the derivative of f(x) and substitute x with a,correct??

    Oh,ok,now I see it. :) Thanks!
    Last edited: Jul 11, 2012
  20. Jul 11, 2012 #19

    To apply L'Hospital's rule we must derivate wrt the variable of the function. If we've agreed the variable is x then

    ANYTHING different from x must be taken as a constant, and that is why [itex]\sin a\,,\, \cos a\,,\,a^{18}\,,\,[/itex] etc. is a constant number and thus its derivative is zero.

  21. Jul 11, 2012 #20
    Yes,I understand it now,thanks guys!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook