# l'Hopital's rule

#### aruwin

##### Member
I just want to know how to fiind the derivative of the denominator. The question is as below:
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.
Help

#### Jameson

Staff member
If you differentiate $f(a)$ or $a$ then that is 0 since those are both constants.

So $$\displaystyle \frac{d}{dx} \sin(x)-\sin(a)=\cos(x)-0=\cos(x)$$ and $$\displaystyle \frac{d}{dx} x-a=1-0=1$$

Thus the derivative of the numerator divided by the derivative of the denominator is $$\displaystyle \frac{\cos(x)-0}{1-0}=\cos(x)$$ which intuitively makes sense because we know that $$\displaystyle \frac{d}{dx}\sin(x)=\cos(x)$$

• Sudharaka

#### aruwin

##### Member
If you differentiate $f(a)$ or $a$ then that is 0 since those are both constants.

So $$\displaystyle \frac{d}{dx} \sin(x)-\sin(a)=\cos(x)-0=\cos(x)$$ and $$\displaystyle \frac{d}{dx} x-a=1-0=1$$

Thus the derivative of the numerator divided by the derivative of the denominator is $$\displaystyle \frac{\cos(x)-0}{1-0}=\cos(x)$$ which intuitively makes sense because we know that $$\displaystyle \frac{d}{dx}\sin(x)=\cos(x)$$

Hi there, can you explain to me something? I just don't understand the ONE 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 he said:
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!.
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)?

Staff member
Last edited:

#### aruwin

##### Member
I'm guessing that a lot of your post was copied from your professor's explanation or did you write that yourself and want me to comment on it? For now I'll just address the two lines I've quoted.

1) Yes, the derivative of (x-a) with respect to x is 1.

2) $$\displaystyle \frac{d}{dx} \left[ f(x)-f(a) \right] = f'(x)-f'(a)$$. $f(a)$ is a constant so $f'(a)=0$.

Does that clear things up?
I copied it from my teacher's explanation but I dont understand this part:
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!.

If f'(a) = 0 like you said, then the limit for that factor would just be -sin(a) but the answer to that question as stated there is
- (sina)/2. Please explain it to me.

#### Sudharaka

##### Well-known member
MHB Math Helper
I copied it from my teacher's explanation but I dont understand this part:
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!.

If f'(a) = 0 like you said, then the limit for that factor would just be -sin(a) but the answer to that question as stated there is
- (sina)/2. Please explain it to me.
Hi aruwin, I think you have confused this trying to compare what Jameson had said with what your lecturer had said.

With reference to post #3,

$f(x) = \frac{\cos(a)}{1!} - \frac{\sin(a)}{2!}(x - a) - \frac{\cos(a)}{3!}(x - a)^2 + \frac{sin(a)}{4!}(x - a)^3 +\cdots$

Therefore,

$f'(x)=-\frac{\sin(a)}{2!}- 2\frac{\cos(a)}{3!}(x - a) + 3\frac{sin(a)}{4!}(x - a)^2 +\cdots$

$\Rightarrow f'(a)=-\frac{\sin(a)}{2}$

Here, think about what is meant by $$f'(a)$$. It means, $$\left.\dfrac{d}{dx}f(x)\right|_{x=a}$$

What Jameson meant in his post, #4 is that, since $$f(a)$$ is a constant,

$\frac{d}{dx}f(a)=0$

He had used the notation, $$f'(a)$$ to denote, $$\dfrac{d}{dx}f(a)$$ whereas it should not be confused with, $$\left.\dfrac{d}{dx}f(x)\right|_{x=a}$$

I am sure this does not answer all your questions. If so, don't hesitate to ask. Kind Regards,
Sudharaka.

• Jameson

#### aruwin

##### Member
Hi aruwin, I think you have confused this trying to compare what Jameson had said with what your lecturer had said.

With reference to post #3,

$f(x) = \frac{\cos(a)}{1!} - \frac{\sin(a)}{2!}(x - a) - \frac{\cos(a)}{3!}(x - a)^2 + \frac{sin(a)}{4!}(x - a)^3 +\cdots$

Therefore,

$f'(x)=-\frac{\sin(a)}{2!}- 2\frac{\cos(a)}{3!}(x - a) + 3\frac{sin(a)}{4!}(x - a)^2 +\cdots$
$\Rightarrow f'(a)=-\frac{\sin(a)}{2}$

Here, think about what is meant by $$f'(a)$$. It means, $$\left.\dfrac{d}{dx}f(x)\right|_{x=a}$$

What Jameson meant in his post, #4 is that, since $$f(a)$$ is a constant,

$\frac{d}{dx}f(a)=0$

He had used the notation, $$f'(a)$$ to denote, $$\dfrac{d}{dx}f(a)$$ whereas it should not be confused with, $$\left.\dfrac{d}{dx}f(x)\right|_{x=a}$$

I am sure this does not answer all your questions. If so, don't hesitate to ask. Kind Regards,
Sudharaka.
Oh yes, I got it now,thanks But there's one part that I don't get.

$f'(x)=-\frac{\sin(a)}{2!}- 2\frac{\cos(a)}{3!}(x - a) + 3\frac{sin(a)}{4!}(x - a)^2 +\cdots$

How do you get that when you diffrentiate f(x)? Ok, lets talk about the first term which is cos(a)/1!, isn't the derivative -sin(a)?
How come it becomes -sin(a)/2?

#### Jameson

Staff member
Sudharaka said:
$f(x) = \frac{\cos(a)}{1!} - \frac{\sin(a)}{2!}(x - a) - \frac{\cos(a)}{3!}(x - a)^2 + \frac{sin(a)}{4!}(x - a)^3 +\cdots$

therefore,

$f'(x)=-\frac{\sin(a)}{2!}- 2\frac{\cos(a)}{3!}(x - a) + 3\frac{sin(a)}{4!}(x - a)^2 +\cdots$

$\rightarrow f'(a)=-\frac{\sin(a)}{2}$
Take a look at the quoted part of Sudharaka's post. Let's start with f(x).

$f(x) = \frac{\cos(a)}{1!} - \frac{\sin(a)}{2!}(x - a) - \frac{\cos(a)}{3!}(x - a)^2 + \frac{sin(a)}{4!}(x - a)^3 +\cdots$

If we want to find $f'(x)$ we can differentiate this above expression term by term to do so. When we do that we'll see a convenient pattern for the case when $x=a$.

The first term $$\displaystyle \frac{\cos(a)}{1!}$$ is a constant so it's derivative is 0.

The next term $$\displaystyle - \frac{\sin(a)}{2!}(x - a)$$ has a derivative of $$\displaystyle -\frac{\sin(a)}{2!}$$. This might be tricky to see at first but remember that $$\displaystyle - \frac{\sin(a)}{2!}$$ is just a constant term and the only variable we are worrying about is x. If that's tricky to see then try distributing $$\displaystyle - \frac{\sin(a)}{2!}$$ and then taking the derivative.

The third term has a derivative of $$\displaystyle - 2\frac{\cos(a)}{3!}(x - a)$$. This is just using the power rule. It has an exponent of 2 so we bring that exponent down in front of the expression, reduce the exponent by 1 and then multiply by the derivative of the inner function (chain rule). In this case the inner function is $(x-a)$ so it's derivative is just 1.

If you keep going like this you'll get the same thing that Sudharaka posted. Now here's the important thing to notice. Look at $f'(x)$. Do you notice how all of the terms except for the first one contain $(x-a)$ in them? What happens when you look at $f'(a)$? You should take f'(x) and replace all of the x's with a. This causes all of the terms with $(x-a)$ in them to be $(a-a)=0$ and they all cancel out. Thus you are only left with the first term.

• Sudharaka

#### aruwin

##### Member
Take a look at the quoted part of Sudharaka's post. Let's start with f(x).

$f(x) = \frac{\cos(a)}{1!} - \frac{\sin(a)}{2!}(x - a) - \frac{\cos(a)}{3!}(x - a)^2 + \frac{sin(a)}{4!}(x - a)^3 +\cdots$

If we want to find $f'(x)$ we can differentiate this above expression term by term to do so. When we do that we'll see a convenient pattern for the case when $x=a$.

The first term $$\displaystyle \frac{\cos(a)}{1!}$$ is a constant so it's derivative is 0.

The next term $$\displaystyle - \frac{\sin(a)}{2!}(x - a)$$ has a derivative of $$\displaystyle -\frac{\sin(a)}{2!}$$. This might be tricky to see at first but remember that $$\displaystyle - \frac{\sin(a)}{2!}$$ is just a constant term and the only variable we are worrying about is x. If that's tricky to see then try distributing $$\displaystyle - \frac{\sin(a)}{2!}$$ and then taking the derivative.

The third term has a derivative of $$\displaystyle - 2\frac{\cos(a)}{3!}(x - a)$$. This is just using the power rule. It has an exponent of 2 so we bring that exponent down in front of the expression, reduce the exponent by 1 and then multiply by the derivative of the inner function (chain rule). In this case the inner function is $(x-a)$ so it's derivative is just 1.

If you keep going like this you'll get the same thing that Sudharaka posted. Now here's the important thing to notice. Look at $f'(x)$. Do you notice how all of the terms except for the first one contain $(x-a)$ in them? What happens when you look at $f'(a)$? You should take f'(x) and replace all of the x's with a. This causes all of the terms with $(x-a)$ in them to be $(a-a)=0$ and they all cancel out. Thus you are only left with the first term.
Ah, now I see it!! Thank you so much!