# Limits and L'Hopital

## Homework Statement

Determine the following limit in terms of the two real-valued parameters A and B:

$$lim_{x \rightarrow 0} (\frac{Ae^{A/{x^2}}+Be^{B/{x^2}}}{e^{A/{x^2}}+e^{B/{x^2}}})$$

L'Hopital's rule

## The Attempt at a Solution

I first divided by $e^{A/{x^2}}$ in both numerator and denominator, and then used L'Hopital's rule to get the limit as B. But this can't be right - surely the limit must be symmetrical in A and B since they are symmetrical in the original expression - and I can easily see how the reverse process would lead me to find the limit as A.

Some working:

$$lim_{x \rightarrow 0} (\frac{Ae^{A/{x^2}}+Be^{B/{x^2}}}{e^{A/{x^2}}+e^{B/{x^2}}}) = lim_{x \rightarrow 0} (\frac{A+Be^{B/{x^2}-A/{x^2}}}{1+e^{B/{x^2}-A/{x^2}}})$$

and A in the numerator and B in the denominator then go to 0 when differentiating using L'Hopital's Rule. Everything else cancels after differentiation to leave B.

Mark44
Mentor

## Homework Statement

Determine the following limit in terms of the two real-valued parameters A and B:

$$lim_{x \rightarrow 0} (\frac{Ae^{A/{x^2}}+Be^{B/{x^2}}}{e^{A/{x^2}}+e^{B/{x^2}}})$$

L'Hopital's rule

## The Attempt at a Solution

I first divided by $e^{A/{x^2}}$ in both numerator and denominator
That's not valid, since x is approaching 0. What you've done is pull out a factor that is undefined in the limit.
Astudious said:
, and then used L'Hopital's rule to get the limit as B. But this can't be right - surely the limit must be symmetrical in A and B since they are symmetrical in the original expression - and I can easily see how the reverse process would lead me to find the limit as A.

Some working:

$$lim_{x \rightarrow 0} (\frac{Ae^{A/{x^2}}+Be^{B/{x^2}}}{e^{A/{x^2}}+e^{B/{x^2}}}) = lim_{x \rightarrow 0} (\frac{A+Be^{B/{x^2}-A/{x^2}}}{1+e^{B/{x^2}-A/{x^2}}})$$

and A in the numerator and B in the denominator then go to 0 when differentiating using L'Hopital's Rule. Everything else cancels after differentiation to leave B.

That's not valid, since x is approaching 0. What you've done is pull out a factor that is undefined in the limit.

It's undefined in the limiting case, but surely all I've done is algebraically rewrite the expression inside the limit function?

How should the problem be done then? I can't really think of anything; L'Hopital's won't do much immediately, that I can see...

BvU
Homework Helper
I think pulling out a factor is just fine ?
I don't see much need for l'Hopital either: If A > B you get B. And vice versa. That's pretty symmetrical !

I think pulling out a factor is just fine ?
I don't see much need for l'Hopital either: If A > B you get B. And vice versa. That's pretty symmetrical !

Yeah I never learnt any rule to suggest why pulling out the factor is wrong, after all I'm not pulling the factor outside the limit!

What do you mean if A>B you get B and vice versa? I'm just getting B, if I divide by e^(Ax^(-2)), and A, if I divide by e^(Bx^(-2)). L'Hopital's presents a way of getting rid of the A and 1 and seems to yield these results ... so even if the problem can be done without it, it still begs the question, why doesn't it work this way?

PeroK
Homework Helper
Gold Member
2021 Award
Yeah I never learnt any rule to suggest why pulling out the factor is wrong, after all I'm not pulling the factor outside the limit!

What do you mean if A>B you get B and vice versa? I'm just getting B, if I divide by e^(Ax^(-2)), and A, if I divide by e^(Bx^(-2)). L'Hopital's presents a way of getting rid of the A and 1 and seems to yield these results ... so even if the problem can be done without it, it still begs the question, why doesn't it work this way?

Since you haven't shown your working, it's hard to say where you are going wrong. My guess is that you've assumed B > A somewhere when using L'Hopital.

It can't always be B, because then you could just rewrite the original expression with B first and then show the limit is A.

If you look at the expression after your first step:

$$lim_{x \rightarrow 0} (\frac{A+Be^{B/{x^2}-A/{x^2}}}{1+e^{B/{x^2}-A/{x^2}}})$$

You've just about cracked it. Just try the three cases A > B, A = B and B > A.

Dick
Homework Helper
Yeah I never learnt any rule to suggest why pulling out the factor is wrong, after all I'm not pulling the factor outside the limit!

What do you mean if A>B you get B and vice versa? I'm just getting B, if I divide by e^(Ax^(-2)), and A, if I divide by e^(Bx^(-2)). L'Hopital's presents a way of getting rid of the A and 1 and seems to yield these results ... so even if the problem can be done without it, it still begs the question, why doesn't it work this way?

It doesn't work that way because if ##B-A \le 0## then your second form for the expression is not indeterminant. I.e. it's not infinity/infinity. What is it?

BvU
Homework Helper
Yeah I never learnt any rule to suggest why pulling out the factor is wrong, after all I'm not pulling the factor outside the limit!
Yes, you simply multiply by 1, which is allowed.

What do you mean if A>B you get B and vice versa? I'm just getting B, if I divide by e^(Ax^(-2)), and A, if I divide by e^(Bx^(-2)). L'Hopital's presents a way of getting rid of the A and 1 and seems to yield these results ... so even if the problem can be done without it, it still begs the question, why doesn't it work this way?
Sorry, I mixed up. If A > B you get A. Vice versa follows if you just swap A and B.
PeroK points us to the special case A=B which turns out to be fine too.

Perhaps things become clearer when you write the exponent in your expression in post #1 as (B-A)/x2 :)

I see, how to solve it now! Thank you. My question still remains, why L'Hopital fails:

Since you haven't shown your working, it's hard to say where you are going wrong. My guess is that you've assumed B > A somewhere when using L'Hopital.

Differentiating the numerator and denominator of the second form of my expression removes A and 1 and directly leaves B (after cancelling terms you can be sure will be the same on both sides - the differential of $e^{x^{-2}(B-A)}$ is $e^{x^{-2}(B-A)}(-2)x^{-3}(B-A)$ and like terms will cancel). B has no dependence on x, so the "limit as x tends to 0 of B" is just B. I'm not sure I see where the assumption is that B > A, perhaps in applying L'Hopital's, but why is that disallowed for B<A ?

It doesn't work that way because if ##B-A \le 0## then your second form for the expression is not indeterminant. I.e. it's not infinity/infinity. What is it?

It's A/1=A. But why do we need it to be indeterminate to use L'Hopital's?

Dick
Homework Helper
But why do we need it to be indeterminate to use L'Hopital's?

Look up the conditions that have to be satisfied before you can use l'Hopital. The expression has to be indeterminant, 0/0 or infinity/infinity.

Ray Vickson
Homework Helper
Dearly Missed

## Homework Statement

Determine the following limit in terms of the two real-valued parameters A and B:

$$lim_{x \rightarrow 0} (\frac{Ae^{A/{x^2}}+Be^{B/{x^2}}}{e^{A/{x^2}}+e^{B/{x^2}}})$$

L'Hopital's rule

## The Attempt at a Solution

I first divided by $e^{A/{x^2}}$ in both numerator and denominator, and then used L'Hopital's rule to get the limit as B. But this can't be right - surely the limit must be symmetrical in A and B since they are symmetrical in the original expression - and I can easily see how the reverse process would lead me to find the limit as A.

Some working:

$$lim_{x \rightarrow 0} (\frac{Ae^{A/{x^2}}+Be^{B/{x^2}}}{e^{A/{x^2}}+e^{B/{x^2}}}) = lim_{x \rightarrow 0} (\frac{A+Be^{B/{x^2}-A/{x^2}}}{1+e^{B/{x^2}-A/{x^2}}})$$

and A in the numerator and B in the denominator then go to 0 when differentiating using L'Hopital's Rule. Everything else cancels after differentiation to leave B.

Easier: change the variable to ##u = 1/x^2##, so your limit is
$$\lim_{u \to \infty} \frac{A e^{Au} + B e^{Bu}}{e^{Au} + e^{Bu}}$$
The case ##A = B## is straightforward, so examine several cases with ##A < B## (if ##A > B## just swap them.)
(1) ##A < B \leq 0##
(2) ##A \leq 0 < B##
(3) ##0 < A < B##
etc. Note that you said ##A, B## were real-valued, not that they should have been > 0.

PeroK
Homework Helper
Gold Member
2021 Award
It's A/1=A. But why do we need it to be indeterminate to use L'Hopital's?

Try ##\lim_{x \rightarrow 0} \frac{1+x}{2+x}##

Look up the conditions that have to be satisfied before you can use l'Hopital. The expression has to be indeterminant, 0/0 or infinity/infinity.

Ah I see. So the numerator and denominator need to be both 0, or both infinity or both -infinity, to use L'Hopital's rule. Are there any other conditions (besides this, and that the numerator and denominator each be differentiable)?

etc. Note that you said ##A, B## were real-valued, not that they should have been > 0.

Thanks, but I'm not sure why this matters - if B-A<0 we'll get A in the limit, if B-A>0 we'll get B, if A=B then we'll get A (=B) as the limit. I'd think this works even if A,B are negative...

Ray Vickson
Homework Helper
Dearly Missed
Ah I see. So the numerator and denominator need to be both 0, or both infinity or both -infinity, to use L'Hopital's rule. Are there any other conditions (besides this, and that the numerator and denominator each be differentiable)?

Thanks, but I'm not sure why this matters - if B-A<0 we'll get A in the limit, if B-A>0 we'll get B, if A=B then we'll get A (=B) as the limit. I'd think this works even if A,B are negative...

It doesn't matter (if you do it the "right" way), but mentioning that fact shows the person marking the assignment that you have, at least, considered those possibilities.

I've found your problem really delicious to deal with. I wanted to make it clear as well.

$\lim_{x\rightarrow 0}\left ( \frac{Ae^{A/x^2}+Be^{B/x^2}}{e^{A/x^2}+e^{B/x^2}}\right )$

Let $\phi = 1/x^2$

When $x\rightarrow 0$, $\phi\rightarrow \infty$

Substitute $\phi$

$\lim_{\phi\rightarrow \infty}\left ( \frac{Ae^{A\phi}+Be^{B\phi}}{e^{A\phi}+e^{B\phi}}\right )$

$\lim_{\phi\rightarrow \infty}\left ( \frac{e^{A\phi}(A+Be^{B\phi}e^{-A\phi})}{e^{A\phi}(1+e^{B\phi}e^{-A\phi})} \right )$

$\lim_{\phi\rightarrow \infty}\left ( \frac{A+Be^{\phi(B-A)}}{1+e^{\phi(B-A)}} \right )$

Before L'Hopital we need to be sure it's really 0/0 or inf/inf. But it actually depends on (B-A)! If (B-A) is negative, exponential expression tends to 0 and it is nice because we can easily see the limit is A. If (B-A) is positive it's gonna be inf/inf, then we can use L'Hopital.

Conditions:

If $B-A< 0\Rightarrow A> B$

Then $\frac{A+Be^{-\infty}}{1+e^{-\infty}}=A$

Else If $B-A>0\Rightarrow B>A$

$\frac{A+Be^\infty}{1+e^\infty}=\frac{\infty}{\infty}$

Seems like we can try L'Hopital

Then $\lim_{\phi\rightarrow \infty}\left ( \frac{A+Be^{\phi(B-A)}}{1+e^{\phi(B-A)}} \right )=\lim_{\phi\rightarrow \infty}\left ( \frac{B(B-A)e^{\phi(B-A)}}{(B-A)e^{\phi(B-A)}} \right )=B$

Else If $A=B=\psi$

Then $\lim_{x\rightarrow 0}\left ( \frac{Ae^{A/x^2}+Be^{B/x^2}}{e^{A/x^2}+e^{B/x^2}}\right )=\lim_{x\rightarrow 0}\left ( \frac{\psi e^{\psi /x^2}+\psi e^{\psi /x^2}}{e^{\psi /x^2}+e^{\psi /x^2}}\right )=\frac{2\psi}{2}=\psi$

STEMucator
Homework Helper
Ah I see. So the numerator and denominator need to be both 0, or both infinity or both -infinity, to use L'Hopital's rule. Are there any other conditions (besides this, and that the numerator and denominator each be differentiable)?

Thanks, but I'm not sure why this matters - if B-A<0 we'll get A in the limit, if B-A>0 we'll get B, if A=B then we'll get A (=B) as the limit. I'd think this works even if A,B are negative...

Indeterminate forms include the following:

##0/0##
##\pm ∞/∞##
##0 × (\pm ∞)##
##∞ \pm ∞##
##0^0##
##1^∞##
##(\pm ∞)^0##

Indeterminate forms include the following:

##0/0##
##\pm ∞/∞##
##0 × (\pm ∞)##
##∞ \pm ∞##
##0^0##
##1^∞##
##(\pm ∞)^0##

Thanks. So, the way this works is, if we want $lim_{x \rightarrow a} (\frac{f(x)}{g(x)})$, we can use $lim_{x \rightarrow a} (\frac{f(x)}{g(x)}) = lim_{x \rightarrow a} (\frac{f'(x)}{g'(x)})$ if and only if: (1) f(x) and g(x) are differentiable and (2) $\frac{f(x)}{g(x)}$ evaluated at x=a is one of the indeterminate forms (such as those above).

Meanwhile, if $\frac{f(x)}{g(x)}$ evaluated at x=a is not one of those forms, i.e. it has a determinate value, then this is immediately the correct value of $lim_{x \rightarrow a} (\frac{f(x)}{g(x)})$ and L'Hopital's rule should not be used.

Is this correct?

STEMucator
Homework Helper
Thanks. So, the way this works is, if we want $lim_{x \rightarrow a} (\frac{f(x)}{g(x)})$, we can use $lim_{x \rightarrow a} (\frac{f(x)}{g(x)}) = lim_{x \rightarrow a} (\frac{f'(x)}{g'(x)})$ if and only if: (1) f(x) and g(x) are differentiable and (2) $\frac{f(x)}{g(x)}$ evaluated at x=a is one of the indeterminate forms (such as those above).

Meanwhile, if $\frac{f(x)}{g(x)}$ evaluated at x=a is not one of those forms, i.e. it has a determinate value, then this is immediately the correct value of $lim_{x \rightarrow a} (\frac{f(x)}{g(x)})$ and L'Hopital's rule should not be used.

Is this correct?

Sure, as long as you mean "finite" when you say "determinant value". Take into consideration:

$$\displaystyle \lim_{x \rightarrow 0} \text{cot}(x)$$

Sure, as long as you mean "finite" when you say "determinant value". Take into consideration:

$$\displaystyle \lim_{x \rightarrow 0} \text{cot}(x)$$

What do you mean? I don't mean only "finite"; your list of indeterminate cases did not include simply infinity. Here, the method seems to work: plug in x=0 and you get cot(0) = infinity, and the limit is also infinity (could be minus if you come from below).

STEMucator
Homework Helper
When finding a limit, you can only have a few possible outcomes:

1. You plug in the limiting value and a finite number results. This includes things like ##0/1## obviously.
2. You plug in the limiting value and an outright infinity results.
3. You plug in the limiting value and an undefined result occurs. This includes things like ##1/0##. These are not necessarily determinant.
4. You plug in the limiting value and an indeterminate form results. This is when L'Hospital's rule applies.

You mentioned:

Thanks. So, the way this works is, if we want $lim_{x \rightarrow a} (\frac{f(x)}{g(x)})$, we can use $lim_{x \rightarrow a} (\frac{f(x)}{g(x)}) = lim_{x \rightarrow a} (\frac{f'(x)}{g'(x)})$ if and only if: (1) f(x) and g(x) are differentiable and (2) $\frac{f(x)}{g(x)}$ evaluated at x=a is one of the indeterminate forms (such as those above).

Meanwhile, if $\frac{f(x)}{g(x)}$ evaluated at x=a is not one of those forms, i.e. it has a determinate value, then this is immediately the correct value of $lim_{x \rightarrow a} (\frac{f(x)}{g(x)})$ and L'Hopital's rule should not be used.

Is this correct?

You were assuming that if you didn't get an indeterminate form, it automatically had to be the "determinant value"; this is not the case. You can easily find something that fits case 3. These sorts of functions usually require a little more investigation as you have already figured out.

Last edited:
3. You plug in the limiting value and an undefined result occurs. This includes things like ##1/0##. These are not necessarily determinant.

This "undefined" result is simply infinity, no?

Or is your main point, perhaps, that we may or may not be able to use L'Hopital, even though the result is an "undefined" infinity rather than "indeterminate" in the forms you listed? Can you give an example of what you mean here?

The cot(x) limit doesn't seem to work as an example - plugging in x=0 gives infinity, and the limit is also infinity. We should therefore not be able to take L'Hopital (according to the principle of only using it when the form of the function is indeterminate, which it is not here) and I see no evidence that we can.

STEMucator
Homework Helper
This "undefined" result is simply infinity, no?

Or is your main point, perhaps, that we may or may not be able to use L'Hopital, even though the result is an "undefined" infinity rather than "indeterminate" in the forms you listed? Can you give an example of what you mean here?

The cot(x) limit doesn't seem to work as an example - plugging in x=0 gives infinity, and the limit is also infinity. We should therefore not be able to take L'Hopital (according to the principle of only using it when the form of the function is indeterminate, which it is not here) and I see no evidence that we can.

There are limits that are actually infinite and not "undefined". It shouldn't be too hard to think of one. Just make a really big numerator and a smaller denominator.

L'Hospital's rule applies only to indeterminant forms.

You might wanna check your limit for ##\text{cot}(x)## again though. If ##\text{cot}(x) = \frac{\text{cos}(x)}{\text{sin}(x)}##, then the limit is actually undefined at zero. Approaching the limit from the left and right will give more insight into the nature of the function, but the limit itself at zero is undefined.

Edit: Here are all the 'cases' of what could occur, where I've used a ##1## to represent a finite quantity:

Everything else would be indeterminate, unless you count ##1/1##.

Last edited: