Expansions and L'Hôpital's rule · Mathematics Class 11–12 | StemPy Lab
Course 20.3·Lesson 3 of 3
Expansions and L'Hôpital's rule
For small x, sinx, cosx
Lesson 3 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
use the first few terms of sinx, cosx, ex, ln(1+x) and tanx to find a limit;
state L'Hôpital's rule with its conditions and use it correctly;
see when the rule fails and when a standard limit is safer.
Functions as short polynomials
Close to x=0, a smooth function looks like a polynomial. The more terms we keep, the better the match. The standard expansions, for x in radians, are
sinx=x−6x3+120x5−…
cosx=1−2x2+24x4−…
ex=1+x+2x2+6x3+…
ln(1+x)=x−2x2+3x3−…
tanx=x+3x3+…
(1+x)n=1+nx+2n(n−1)x2+…
These are the Maclaurin series, which A-Level Further Maths and IB Higher Level prove. The Indian school syllabus does not prove them. JEE Main uses them as a tool, so we use them here. The standard limits of the first course are the first terms: xsinx→1 is the x in the sine, and xex−1→1 is the x in the exponential.
The graph of y = sin x for x from -5 to 5, in black. Three coloured curves are drawn over it. The orange line y = x follows the sine only very close to zero. The green cubic y = x - x cubed over 6 follows it a little further. The red curve y = x - x cubed over 6 + x to the fifth over 120 hugs the sine closely out to about x = 2.5.
How to use them
Look at the top and the bottom. Find the lowest power of x that survives after the terms cancel.
Replace each function by enough terms to see that power.
Divide, and let x→0.
Example 1.x→0limx3x−sinx. The top is x−(x−6x3+…)=6x3−…. Dividing by x3 gives 61.
Example 2.x→0limx2ex−1−x. The top is 2x2+6x3+…. The limit is 21.
Example 3.x→0limx3tanx−x=31, because the top is 3x3+….
Example 4, a 1∞ form.x→0lim(cosx)1/x2. Here f−1=cosx−1≈−2x2, so g(f−1)=x21⋅(−2x2)=−21. The limit is e−1/2.
L'Hôpital's rule
Statement. Let f and g be differentiable near a (but not necessarily at a), with g′(x)=0 near a. Suppose that
f(x)→0 and g(x)→0 as x→a, or f(x)→±∞ and g(x)→±∞; and
x→alimg′(x)f′(x) exists, as a number or as ±∞.
Then x→alimg(x)f(x)=x→alimg′(x)f′(x). The same holds for x→±∞.
The rule differentiates the top and the bottom separately. It is not the quotient rule. If g′f′ is again 00, use the rule again.
Example 5.x→0limx2ex−1−x. This is 00. One step gives 2xex−1, again 00. A second step gives 2ex→21. This matches Example 2.
Example 6.x→∞limexx2. This is ∞∞. Two steps give ex2→0. The exponential beats every power.
Example 7.x→0+limxlnx. This is 0⋅∞. Write it as 1/xlnx, which is ∞∞. The rule gives −1/x21/x=−x→0. It follows that xx=exlnx→e0=1 as x→0+.
Why the rule works
Look at two curves that both leave the origin. Very close to the origin, each one almost coincides with its tangent line, f≈f′(0)x and g≈g′(0)x. So their ratio is almost g′(0)f′(0).
Two curves leave the origin together. The blue curve f(x) = 3x - x squared has a dashed blue tangent line y = 3x, labelled slope 3. The orange curve g(x) = x + x squared has a dashed orange tangent line y = x, labelled slope 1. Close to the origin each curve almost coincides with its tangent line. A note says that f over g tends to 3 over 1, the ratio of the slopes.
When the rule fails
Not an indeterminate form. For x→0limx+2x+1 the answer is 21 by substitution. The rule would give 11=1, which is wrong. Check the form first.
The new limit does not exist. Take x→∞limx+32x+sinx. The true limit is 2, by dividing by x. The rule gives 12+cosx, which has no limit, so the rule says nothing. The conclusion goes one way only: if g′f′ has a limit, then gf has the same limit.
A good habit. In a school exam where L'Hôpital's rule is not allowed, use standard limits and algebra. In JEE and IB Higher Level it is a standard tool. Whichever you use, the answer must agree. You can check one method with the other.
Practise with new numbers
Try it in Python
The program adds the terms of the sine series and shows how fast it approaches sin1. Then it prints x3x−sinx for smaller and smaller x.
Common mistakes
Using the rule when the form is not indeterminate. Substitute first.
Applying the quotient rule. L'Hôpital differentiates the top and the bottom separately.
Stopping the series too early. If the top becomes 0 after the first terms, keep the next term.
Trusting the rule when g′f′ has no limit. Then the rule is silent. Try another method.
behave like a few terms of a power series, and replacing each function by those terms turns a hard limit into algebra. L'Hôpital's rule says that for
00
or
∞∞
forms,
limgf=limg′f′
when the second limit exists. The Indian school syllabus leaves it out, while JEE and IB Higher Level use it, and so do some A-Level Further Maths courses.
about 30 min1 simulation2 practice questions1 Python program5 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.