Skip to lesson content

Lesson 2 of 8

Continuity and Differentiability · Lesson 2 of 8

Differentiability and the Chain Rule

“Connect derivatives to limiting slopes, understand why continuity is necessary, and differentiate functions built from several layers.”

Learning Objectives

• Decide differentiability by comparing finite left and right derivatives. • Explain and prove why differentiability implies continuity. • Use a counterexample to show why continuity does not guarantee differentiability. • Apply sum, product, quotient, and standard derivative rules accurately. • Identify inner and outer functions and apply the chain rule through several layers. • Check the domain and the points where a derivative formula applies.

From nearby values to nearby slopes

Continuity asks whether outputs approach the assigned value. Differentiability asks whether the ratio of a change in output to a change in input approaches one finite number. A graph may have no break and still have a corner, where the approaching slopes disagree. We begin with that distinction before learning a more efficient differentiation rule.

For y=f(x), start at an input c and move to c+h. The input change is h and the output change is f(c+h)−f(c). Their quotient is the slope of the line joining the two graph points. As h tends to zero, the second point approaches the first. If the slopes approach a finite limit, that limit is the derivative at c.

Definition
Derivative and differentiability

The derivative f′(c) is the finite limit of [f(c+h)−f(c)]/h as h→0, if that limit exists. A function is differentiable at c when this derivative exists. Differentiation means finding the derivative as a function of the input.

The derivative at a pointLaTeX
The nonzero number h is an input increment. The quotient is evaluated before taking its limit. The prime symbol in f′(c) means a derivative, not an exponent.

With c replaced by a variable input x, the same construction defines f′(x) wherever the finite limit exists. Equivalent notations are d(f(x))/dx and, when y=f(x), dy/dx or y′. The symbol d/dx tells us which variable is changing. It is an operation on a function, not an instruction to divide the two letters d and x.

One-sided derivatives at an interior pointLaTeX
Differentiability at an interior input requires both one-sided derivative limits to be finite and equal. Equality of one-sided function limits is a different test: it concerns continuity.
Intervals and endpoints

A function is differentiable on an open interval if it is differentiable at every point there. With the one-sided convention used for a closed interval [a,b], the left endpoint a uses the right derivative and the right endpoint b uses the left derivative. At interior points both approaches are required. Always state if an endpoint conclusion uses a one-sided derivative.

Example — A derivative obtained from its definition

Problem
Find the derivative of f(x)=x² at an arbitrary real input c.

  1. 1.The difference quotient is [(c+h)²−c²]/h for h≠0.
  2. 2.Expand the numerator to get [c²+2ch+h²−c²]/h=(2ch+h²)/h=2c+h.
  3. 3.Now take h→0. The quotient tends to 2c, so f′(c)=2c.
  4. 4.Since c was arbitrary, f′(x)=2x on the real line. Substituting h=0 before cancelling would have produced an undefined quotient instead of a derivative.

Why a derivative guarantees continuity

A finite derivative puts strong control on the change in the function. A change in output is the difference quotient multiplied by the change in input. As that input change shrinks to zero, a quotient approaching a finite number forces the output change to shrink to zero too.

Assume f is differentiable at c. For x≠c, write f(x)−f(c)=[(f(x)−f(c))/(x−c)](x−c). The first factor tends to f′(c), while the second tends to zero. The product tends to f′(c)·0=0. Hence f(x) approaches f(c), exactly the continuity condition. The finiteness of the derivative is what allows this limit argument.

The implication and its limitLaTeX
The reverse implication is not valid in general. A counterexample must be continuous at the point but have no finite two-sided derivative there.
Example — A continuous corner with no derivative

Problem
Show that f(x)=|x| is not differentiable at zero.

  1. 1.Continuity at zero has already been checked: both sides approach f(0)=0.
  2. 2.The difference quotient is |h|/h. When h<0, |h|=−h, so the quotient is −1.
  3. 3.When h>0, the quotient is 1. The left derivative is −1 and the right derivative is 1.
  4. 4.The slopes disagree, so no two-sided derivative exists at zero. This proves that continuity alone is not enough for differentiability.
Continuity does not remove a cornerxy-1112Left slope = −1Right slope = 1Both sides meet, but their limiting slopes do not match.
A corner separates continuity from differentiability— The two branches of |x| meet, while the left and right slopes remain different.
Use the implication in the correct direction

A discontinuity rules out differentiability at that point, because differentiability would force continuity. Continuity does not settle the derivative question; slopes still need checking. A corner is one reason the derivative may fail even when the function values join.

Example — Two ways to rule out differentiability

Problem
Discuss |x−1| at 1, and [x] on 0<x<3 at 1 and 2.

  1. 1.For |x−1| at 1, the value is zero and the difference quotient is |h|/h. Its left and right limits are −1 and 1, so the function is not differentiable at 1.
  2. 2.For [x], the one-sided function limits at 1 are 0 and 1; at 2 they are 1 and 2. Thus the function is discontinuous at both inputs.
  3. 3.Since differentiability would imply continuity, these discontinuities already rule out differentiability. It is unnecessary to calculate another quotient to reach that conclusion.
  4. 4.Between the integers, [x] is locally constant and has derivative zero. A function can be differentiable at many points while failing at particular inputs.

The derivative rules we will build on

The chain rule complements the arithmetic rules already learned. Each rule corresponds to the way an expression is assembled: adding functions, multiplying them, dividing them, or putting one function inside another. Identifying that structure before calculating prevents many errors.

Let u and v be differentiable functions of x. Differentiating a sum or difference means differentiating its two parts separately. A product needs two terms because either factor can change. A quotient keeps the denominator squared, with a specific order in the numerator.

Arithmetic derivative rulesLaTeX
Primes refer to derivatives with respect to x. In the product rule the undifferentiated factors remain in their terms. In the quotient numerator, differentiate the numerator first and subtract the term differentiating the denominator.
FunctionDerivativeWhere to check
xⁿnxⁿ⁻¹On the real domain where the power and derivative are defined.
sin xcos xAll real x; angles are in radians.
cos x−sin xAll real x.
tan xsec²xWhere cos x≠0.

Other familiar trigonometric derivatives follow from these rules. For example, sec x=1/cos x gives (sec x)′=sec x tan x. Similarly, (cot x)′=−cosec²x and (cosec x)′=−cosec x cot x on their domains. These formulas will be used when a trigonometric function appears as one layer of a composition.

The chain rule: differentiate one layer at a time

Suppose an output is built in two stages. An input x first produces t=u(x), and t then produces y=v(t). The change from x to y depends on the rate of the first stage and the rate of the second stage. Multiplying those rates leads to the chain rule.

Example — Seeing the rule in an expandable expression

Problem
Differentiate f(x)=(2x+1)³, then identify its inner and outer functions.

  1. 1.Expanding gives (2x+1)³=8x³+12x²+6x+1. Differentiating the polynomial gives 24x²+24x+6.
  2. 2.Factor the result: 24x²+24x+6=6(2x+1)².
  3. 3.Alternatively set t=2x+1 and y=t³. The rates are dt/dx=2 and dy/dt=3t².
  4. 4.Multiplying gives dy/dx=3t²·2=6(2x+1)², agreeing with the expansion. For a power such as (2x+1)¹⁰⁰, working by layers avoids a very long expansion.
Chain ruleLaTeX
The outer derivative v′ must be evaluated at the inner value u(x). This formula applies where the required derivatives exist; its notation records the successive rates rather than a formal cancellation of letters.

A practical method is to name the inner expression, differentiate the outer function while leaving that expression intact, and multiply by the derivative of the inner expression. Finally replace any temporary variable with the original expression if an answer in x is wanted. Forgetting the last multiplier is the most common chain-rule error.

Example — Sine of a square

Problem
Find the derivative of f(x)=sin(x²).

  1. 1.The inner function is t=x² and the outer function is sin t.
  2. 2.Differentiate the outer function with respect to t: dy/dt=cos t. Differentiate the inner function with respect to x: dt/dx=2x.
  3. 3.Multiply the rates to get dy/dx=(cos t)(2x).
  4. 4.Replace t with x²: f′(x)=2x cos(x²). The cosine is evaluated at the whole input x², not at x.
Multiply the rate at each layer of a compositionxinputt = x²inner outputy = sin touter outputdt/dx = 2xdy/dt = cos tdy/dx = cos(x²) × 2x
The rates along a composition— Trace x to x² to sin(x²), then multiply the derivative supplied by each layer.
Example — Several layers and a product

Problem
Differentiate cos(sin x) and cos(x³)·sin²(x⁵).

  1. 1.For cos(sin x), the outer cosine contributes −sin(sin x); the inner sine contributes cos x. The result is −sin(sin x) cos x.
  2. 2.For the product let u=cos(x³) and v=[sin(x⁵)]². The chain rule gives u′=−sin(x³)·3x².
  3. 3.The second factor has two layers inside its square: v′=2sin(x⁵)·cos(x⁵)·5x⁴=10x⁴sin(x⁵)cos(x⁵).
  4. 4.Apply u′v+uv′. The derivative is −3x²sin(x³)sin²(x⁵)+10x⁴cos(x³)sin(x⁵)cos(x⁵). Each factor is differentiated only in its own product-rule term.

There is no restriction to two layers. If y=w(s), s=u(t), and t=v(x), apply the two-layer rule twice. The result is dy/dx=(dy/ds)(ds/dt)(dt/dx). Further layers contribute further factors, each evaluated at the correct intermediate input.

Example — A nested trigonometric function with a root

Problem
Find the derivative of y=sec(tan√x) at inputs where all layers are differentiable.

  1. 1.Write r=√x, t=tan r, and y=sec t. For x>0, dr/dx=1/(2√x).
  2. 2.The middle layer gives dt/dr=sec²r, provided cos r≠0. The outer layer gives dy/dt=sec t tan t, provided cos t≠0.
  3. 3.Multiply all three rates: dy/dx=sec(tan√x) tan(tan√x) sec²(√x)/(2√x).
  4. 4.The restrictions x>0, cos√x≠0, and cos(tan√x)≠0 ensure that this calculation uses defined differentiable layers. A compact formula does not remove those conditions.
Example — A radical and an endpoint need separate care

Problem
Differentiate 2√(cot(x²)) where cot(x²)>0. Also examine cos√x.

  1. 1.For the first expression, differentiating 2√u gives u′/√u. Here u=cot(x²), so u′=−cosec²(x²)·2x.
  2. 2.Thus the derivative is −2x cosec²(x²)/√(cot(x²)) where these layers are defined and cot(x²)>0.
  3. 3.For cos√x at x>0, the chain rule gives −sin√x/(2√x). This displayed expression is not defined at x=0, so it cannot be substituted there.
  4. 4.To check the endpoint directly, put t=√h in [cos√h−1]/h. This becomes (cos t−1)/t²=−2[sin(t/2)/t]², which tends to −1/2 as h→0⁺.
  5. 5.Therefore cos√x has right derivative −1/2 at zero on its domain [0,∞). A singular-looking chain-rule expression at an endpoint calls for a direct limit, not an automatic conclusion that no one-sided derivative exists.
A chain rule is not a product rule

For sin(x²), the square is inside the sine, so the chain rule is required. For x²sin x, two functions are multiplied, so the product rule is required. Expressions such as cos(x³)sin²(x⁵) need both rules. Read the brackets before differentiating.

Check your understanding

Each question asks you to identify either the existence of a derivative or the structure of a derivative calculation. Keep the continuity implication in mind, and count the layers before applying a chain rule.

Quiz

Quick check

Which implication is always true at an interior input?

Quick check

A function is continuous at c, but its left derivative is −1 and its right derivative is 1. What follows?

Quick check

What is d[(3x−2)⁵]/dx?

Quick check

What is the derivative of cos(sin x)?

Quick check

What is the derivative of x sin(x²)?

Quick check

Why is [x] not differentiable at x=1?

Quick check

For x>0, which expression is the derivative of cos√x?

Quick check

Where cot(x²)>0, which is the derivative of 2√(cot(x²))?

Practice Problems

Practice Problems
  1. Use the derivative definition to find the derivative of x²+3x at a general input c. Show the cancellation before taking the limit.
  2. Give a proof that differentiability at c implies continuity there. Identify where the finite derivative is used.
  3. Show directly that |x−1| is not differentiable at 1. Then use discontinuity to rule out differentiability of [x] at 1 and 2.
  4. Differentiate sin(x²+5), sin(ax+b), and cos(sin x), identifying the inner and outer functions in each case.
  5. Differentiate sin(ax+b)/cos(cx+d). State the denominator restriction and show both quotient-rule terms.
  6. Differentiate cos(x³)sin²(x⁵). Explain which steps use the product rule and which use the chain rule.
  7. Find the derivative of sec(tan√x). List conditions under which the chain-rule factors are all defined.
  8. Differentiate 2√(cot(x²)) on intervals where the radical is positive and its trigonometric argument is defined.
  9. Find d(cos√x)/dx for x>0 and calculate the right derivative at zero from the definition.
  10. Differentiate [sin(2x+1)]⁴. Then formulate a four-layer chain rule using intermediate variables.
  11. Construct one example continuous at zero but not differentiable there, and one discontinuous at zero. Explain why neither has a finite two-sided derivative at zero.

Key Takeaways

Key Takeaways

• A derivative is a finite limit of difference quotients; at an interior point both one-sided derivatives must agree. • Differentiability implies continuity, while continuity alone does not guarantee a derivative. • The product and quotient rules handle arithmetic combinations; the chain rule handles functions inside functions. • For a composition, evaluate the outer derivative at the inner expression and multiply by the inner derivative. • Several layers give several rate factors, and some expressions need both product and chain rules. • Domain restrictions and endpoints must be checked separately when a derivative formula is not directly defined there.