Skip to content

Syllabus · CS Computer Science and Information Technology

All topics in this subject
C programming foundations7
Arrays and pointers9
Recursion6
Probability and statistics foundations9
Database systems foundations15
Linear algebra foundations6
Computer networks foundations9
Calculus foundations6
Theory of computation foundations9
Compiler design foundations9
Linked lists, stacks and queues5
Trees, BSTs and heaps4
Graph foundations3
Algorithms foundations15
Discrete mathematics foundations18
Digital logic foundations22
Computer organization foundations12
Operating systems foundations15

Continuity, differentiability and piecewise functions

Lesson 157 of 1795 minFree

Goals and prerequisites

Apply limits to continuity, derive derivatives from their definition, and match piecewise formulas. Work with real functions of one real variable; prerequisites are lesson 1 and elementary algebra.

1. Three continuity checks

At an interior point a, continuity means f(a) exists, lim(x→a)f(x) exists, and that limit equals f(a). On a closed interval [a,b], endpoint continuity is one-sided from within the interval. A rational function is continuous wherever its denominator is nonzero; logarithms require positive arguments and real square roots require nonnegative arguments.

For f(x)=(x²−1)/(x−1) when x≠1 and f(1)=k, continuity at 1 requires k=2. This repairs a removable discontinuity. By contrast, a jump with unequal side limits cannot be repaired by assigning one value at the point. An unbounded discontinuity likewise cannot be repaired with a finite value.

Continuity on a closed bounded interval guarantees attainment of an absolute maximum and minimum. The intermediate value theorem says that every value between f(a) and f(b) is attained, not that it is attained uniquely. Thus a continuous f with f(a)f(b)<0 has a zero in (a,b); continuity is essential.

2. Derivatives are limits of slopes

At an interior point, f′(a)=lim(h→0)[f(a+h)−f(a)]/h, when this limit exists as a finite real number. It is the tangent slope and instantaneous rate. For f(x)=x², the quotient is 2a+h, giving f′(a)=2a. One-sided derivatives must both exist, be finite and agree for the usual two-sided derivative.

Differentiability implies continuity: f(a+h)−f(a)=h times the difference quotient, and the product tends to zero if the quotient has a finite limit. The converse is false. For |x| at zero, the function is continuous but the left derivative is −1 and right derivative is 1. For the real cube root, the quotient at zero is 1/|h|^(2/3), which diverges; a vertical tangent is not a finite derivative.

3. Rules and domains

For differentiable u,v: (u+v)′=u′+v′, (uv)′=u′v+uv′, (u/v)′=(u′v−uv′)/v² where v≠0, and (g(u))′=g′(u)u′. Standard derivatives include (xⁿ)′=nxⁿ⁻¹ where defined, (eˣ)′=eˣ, (ln x)′=1/x for x>0, (sin x)′=cos x and (cos x)′=−sin x in radians.

Example: y=ln(1+x²) is defined for all real x and y′=2x/(1+x²). Example: y=x²eˣ has derivative 2xeˣ+x²eˣ, not merely 2xeˣ. Apply the product rule before simplifying.

4. Piecewise matching: value before slope

Let f(x)=ax+b for x<1 and f(x)=x² for x≥1. Continuity requires a+b=1. The left derivative, after continuity is imposed, is a; the right derivative is 2. Differentiability therefore requires a=2 and b=−1. Matching slopes without matching values is insufficient: a jump destroys differentiability even when the two branch formulas have equal slopes.

A subtler example is f(x)=x²sin(1/x) for x≠0, f(0)=0. It is continuous by squeezing. At zero, the defining quotient is h sin(1/h)→0, so f′(0)=0. For x≠0, f′(x)=2x sin(1/x)−cos(1/x), which does not have a limit at zero. A function can be differentiable at a point without having a continuous derivative there.

5. Pitfalls and solving order

At a joining point, write f(a), left/right function limits, and only then left/right difference quotients. Do not substitute a special point into a derivative formula derived only for x≠a. Distinguish continuity of f from continuity of f′. At endpoints specify a one-sided derivative if that is what the question requests; the usual interior two-sided definition does not automatically apply.

Original practice: six single-correct MCQs

These are original questions, not previous-year questions. Choose exactly one option.

CD01. For x≠1 let f(x)=(x²−1)/(x−1), and let f(1)=k. Which k makes f continuous at 1?

A. 0 B. 1 C. 2 D. No such k / कोई नहीं

Answer: C

A: The limit is 2, not 0.

B: The limit is x+1 evaluated at 1.

C: Cancellation gives limit 2, so choose k=2.

D: The discontinuity is removable.

CD02. At zero, f(x)=|x| is:

A. Differentiable / अवकलनीय B. Continuous but not differentiable / सतत पर अनवकलनीय C. Discontinuous / असतत D. Undefined / अपरिभाषित

Answer: B

A: The one-sided slopes disagree.

B: Both function limits are 0, but slopes are −1 and 1.

C: The function values approach f(0)=0.

D: Its value at zero is 0.

CD03. For f(x)=ax+b (x<1), f(x)=x² (x≥1), differentiability at 1 requires:

A. a=1,b=0 B. a=2,b=0 C. a=0,b=1 D. a=2,b=−1

Answer: D

A: This matches values but not slopes.

B: This matches branch slopes but leaves a jump.

C: This matches values but the left slope is 0.

D: Slope matching gives a=2; continuity then gives b=−1.

CD04. What is d/dx ln(1+x²) for real x?

A. 1/(1+x²) B. 2x/(1+x²) C. 2/x D. ln(2x)

Answer: B

A: This omits the inner derivative 2x.

B: Apply the chain rule; the argument is always positive.

C: The denominator is 1+x², not x².

D: Differentiating a logarithm does not give logarithm of the derivative.

CD05. Let f(0)=0 and f(x)=x²sin(1/x) for x≠0. What is f′(0)?

A. 0 B. 1 C. −1 D. Does not exist / मौजूद नहीं

Answer: A

A: The defining quotient h sin(1/h) tends to 0.

B: The quotient is squeezed to 0.

C: The quotient is squeezed to 0.

D: The derivative exists even though f′ is not continuous there.

CD06. Which implication always holds at an interior point of a real function?

A. Continuous ⇒ differentiable / सतत ⇒ अवकलनीय B. Differentiable ⇒ continuous / अवकलनीय ⇒ सतत C. Derivative exists ⇒ derivative continuous / अवकलज मौजूद ⇒ अवकलज सतत D. Limit exists ⇒ function continuous / सीमा मौजूद ⇒ फलन सतत

Answer: B

A: The absolute value at zero is a counterexample.

B: A finite derivative forces f(a+h)−f(a)→0.

C: The x²sin(1/x) example disproves this.

D: The function value must also exist and equal the limit.

Source and scope

Official continuity and differentiability heading; one-variable definitions, rules and junctions.

Official GATE 2026 CS syllabus (verified 2026-10-14).

Sign in to keep your progress. Sign in