Section 1 · 8 min read

Calculus

Limits and standard limits, continuity and differentiability, mean value theorems, finding maxima and minima, and definite integration techniques for GATE.

On this page
  1. Limits
  2. Continuity and differentiability
  3. Mean value theorems
  4. Maxima and minima
  5. Integration
  6. Worked examples
  7. Common traps
  8. Quick revision

Calculus in GATE CS is mostly one-variable and mostly one-mark: evaluate a limit, decide continuity or differentiability at a point, locate a maximum, find the value promised by the mean value theorem, or compute a definite integral. The questions reward knowing a handful of standard results and a few integration tricks.

Limits

lim⁡x→af(x)=L\lim_{x \to a} f(x) = L means f(x)f(x) gets arbitrarily close to LL as xx approaches aa from either side. The limit exists iff the left limit and right limit both exist and are equal.

Standard limits

Limit Value
lim⁡x→0sin⁡xx\lim_{x \to 0} \frac{\sin x}{x} 1
lim⁡x→0tan⁡xx\lim_{x \to 0} \frac{\tan x}{x} 1
lim⁡x→01−cos⁡xx2\lim_{x \to 0} \frac{1 - \cos x}{x^2} 12\frac{1}{2}
lim⁡x→0ex−1x\lim_{x \to 0} \frac{e^x - 1}{x} 1
lim⁡x→0ax−1x\lim_{x \to 0} \frac{a^x - 1}{x} ln⁡a\ln a
lim⁡x→0ln⁡(1+x)x\lim_{x \to 0} \frac{\ln(1 + x)}{x} 1
lim⁡x→0(1+x)1/x\lim_{x \to 0} (1 + x)^{1/x} ee
lim⁡x→∞(1+ax)x\lim_{x \to \infty} \left(1 + \frac{a}{x}\right)^{x} eae^a
lim⁡x→axn−anx−a\lim_{x \to a} \frac{x^n - a^n}{x - a} nan−1n a^{n-1}
lim⁡x→∞xkex\lim_{x \to \infty} \frac{x^k}{e^x}, lim⁡x→∞ln⁡xxk\lim_{x \to \infty} \frac{\ln x}{x^k} (k>0k > 0) 0

Techniques

  1. Direct substitution. Try it first.
  2. Factor and cancel for 00\frac{0}{0} in rational functions.
  3. Rationalize when square roots appear.
  4. L'Hospital's rule. For 00\frac{0}{0} or ∞∞\frac{\infty}{\infty}, lim⁡fg=lim⁡f′g′\lim \frac{f}{g} = \lim \frac{f'}{g'} if the right side exists. Other indeterminate forms (0⋅∞0 \cdot \infty, ∞−∞\infty - \infty) must first be rewritten as a quotient.
  5. Exponent forms 1∞1^\infty, 000^0, ∞0\infty^0: write y=fgy = f^g, take ln⁡y=gln⁡f\ln y = g \ln f, find that limit, then exponentiate. For 1∞1^\infty there is a shortcut: if f→1f \to 1 and g→∞g \to \infty, then lim⁡fg=elim⁡g(f−1)\lim f^g = e^{\lim g(f - 1)}.
  6. Rational functions at infinity. Compare degrees: numerator degree smaller gives 0, equal gives the ratio of leading coefficients, larger gives ±∞\pm\infty.
  7. Series. sin⁡x=x−x36+⋯\sin x = x - \frac{x^3}{6} + \cdots, cos⁡x=1−x22+x424−⋯\cos x = 1 - \frac{x^2}{2} + \frac{x^4}{24} - \cdots, ex=1+x+x22+⋯e^x = 1 + x + \frac{x^2}{2} + \cdots, ln⁡(1+x)=x−x22+⋯\ln(1 + x) = x - \frac{x^2}{2} + \cdots. Useful when L'Hospital would need many rounds.

Continuity and differentiability

ff is continuous at aa if lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a): the limit exists and equals the value.

ff is differentiable at aa if f′(a)=lim⁡h→0f(a+h)−f(a)hf'(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h} exists, meaning the left and right derivatives exist and agree.

Differentiable implies continuous. The converse is false: ∣x∣|x| is continuous at 0 with left derivative −1-1 and right derivative +1+1.

Checks for piecewise functions at a joining point aa:

  1. Continuity: left limit, right limit and f(a)f(a) all equal.
  2. Differentiability: also left and right derivatives equal. For pieces that are differentiable on each side, compare the one-sided derivative formulas at aa.

Known examples at x=0x = 0 (with f(0)=0f(0) = 0):

f(x)f(x) Continuous Differentiable
$ x $
$x x $
xsin⁡(1/x)x \sin(1/x) yes no
x2sin⁡(1/x)x^2 \sin(1/x) yes yes, f′(0)=0f'(0) = 0, but f′f' not continuous at 0
⌊x⌋\lfloor x \rfloor no (jump) no
x1/3x^{1/3} yes no (vertical tangent)

∣f(x)∣|f(x)| can fail to be differentiable where ff crosses zero. ∣x−a∣|x - a| type terms create corners at aa; (x−a)∣x−a∣(x - a)|x - a| does not.

Mean value theorems

Rolle's theorem. If ff is continuous on [a,b][a, b], differentiable on (a,b)(a, b), and f(a)=f(b)f(a) = f(b), then f′(c)=0f'(c) = 0 for some c∈(a,b)c \in (a, b).

Lagrange's mean value theorem. If ff is continuous on [a,b][a, b] and differentiable on (a,b)(a, b), then for some c∈(a,b)c \in (a, b) f′(c)=f(b)−f(a)b−a.f'(c) = \frac{f(b) - f(a)}{b - a}. Geometric meaning: some tangent is parallel to the chord.

Cauchy's mean value theorem. Under the same conditions for ff and gg, with g′≠0g' \ne 0 on (a,b)(a, b): f′(c)g′(c)=f(b)−f(a)g(b)−g(a).\frac{f'(c)}{g'(c)} = \frac{f(b) - f(a)}{g(b) - g(a)}.

GATE questions either ask for cc or ask which function fails the hypotheses. Hypothesis failures to look for: a discontinuity or a corner inside the interval (for example ∣x∣|x| on [−1,1][-1, 1] fails Rolle's conditions at 0, and indeed no cc has f′(c)=0f'(c) = 0), or unequal end values for Rolle.

Useful consequence: if f′(x)=0f'(x) = 0 on an interval, ff is constant there; if f′>0f' > 0, ff is strictly increasing.

Maxima and minima

One variable

  1. Find critical points: where f′(x)=0f'(x) = 0 or f′f' does not exist.
  2. Second derivative test: f′′(c)<0f''(c) < 0 gives a local maximum, f′′(c)>0f''(c) > 0 a local minimum. If f′′(c)=0f''(c) = 0, use the first derivative sign change, or higher derivatives: if the first nonzero derivative at cc has even order kk, it is an extremum (max if f(k)(c)<0f^{(k)}(c) < 0); if odd, it is an inflection point.
  3. Absolute extrema on a closed interval [a,b][a, b]: evaluate ff at every critical point inside and at both endpoints, then pick the largest and smallest. Endpoints are often the answer.

Two variables

For f(x,y)f(x, y), critical points satisfy fx=fy=0f_x = f_y = 0. With r=fxxr = f_{xx}, s=fxys = f_{xy}, t=fyyt = f_{yy} at the point:

  • rt−s2>0rt - s^2 > 0 and r<0r < 0: local maximum.
  • rt−s2>0rt - s^2 > 0 and r>0r > 0: local minimum.
  • rt−s2<0rt - s^2 < 0: saddle point.
  • rt−s2=0rt - s^2 = 0: test inconclusive.

Integration

Standard results

∫xn dx=xn+1n+1\int x^n\,dx = \frac{x^{n+1}}{n+1} (n≠−1n \ne -1), ∫1x dx=ln⁡∣x∣\int \frac{1}{x}\,dx = \ln|x|, ∫eax dx=eaxa\int e^{ax}\,dx = \frac{e^{ax}}{a}, ∫dx1+x2=tan⁡−1x\int \frac{dx}{1 + x^2} = \tan^{-1} x, ∫dx1−x2=sin⁡−1x\int \frac{dx}{\sqrt{1 - x^2}} = \sin^{-1} x.

Integration by parts: ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du. Choose uu in the order: logarithm, inverse trig, algebraic, trig, exponential.

Substitution: when you see a function and its derivative together, set uu = the inner function, and change the limits.

Properties of definite integrals

  • ∫abf(x) dx=∫abf(a+b−x) dx\int_a^b f(x)\,dx = \int_a^b f(a + b - x)\,dx (the "King" property). Adding the two forms often cancels the hard part.
  • ∫−aaf(x) dx=2∫0af(x) dx\int_{-a}^{a} f(x)\,dx = 2\int_0^a f(x)\,dx if ff is even, and 00 if ff is odd.
  • ∫02af(x) dx=2∫0af(x) dx\int_0^{2a} f(x)\,dx = 2\int_0^a f(x)\,dx if f(2a−x)=f(x)f(2a - x) = f(x), and 00 if f(2a−x)=−f(x)f(2a - x) = -f(x).
  • For a periodic ff with period TT: ∫0nTf=n∫0Tf\int_0^{nT} f = n\int_0^T f.

Wallis formula for ∫0π/2sin⁡nx dx=∫0π/2cos⁡nx dx\int_0^{\pi/2} \sin^n x\,dx = \int_0^{\pi/2} \cos^n x\,dx: (n−1)(n−3)⋯n(n−2)⋯×{π/2n even1n odd\frac{(n-1)(n-3)\cdots}{n(n-2)\cdots} \times \begin{cases} \pi/2 & n \text{ even} \\ 1 & n \text{ odd}\end{cases} For example ∫0π/2sin⁡4x dx=3⋅14⋅2⋅π2=3π16\int_0^{\pi/2} \sin^4 x\,dx = \frac{3 \cdot 1}{4 \cdot 2} \cdot \frac{\pi}{2} = \frac{3\pi}{16}.

Improper integrals: ∫1∞x−p dx\int_1^\infty x^{-p}\,dx converges iff p>1p > 1; ∫01x−p dx\int_0^1 x^{-p}\,dx converges iff p<1p < 1.

Leibniz rule: ddx∫a(x)b(x)f(t) dt=f(b(x)) b′(x)−f(a(x)) a′(x)\frac{d}{dx}\int_{a(x)}^{b(x)} f(t)\,dt = f(b(x))\,b'(x) - f(a(x))\,a'(x).

Worked examples

Worked example 1: A 1∞1^\infty limit

Find lim⁡x→∞(x+3x−1)x\lim_{x \to \infty} \left(\frac{x + 3}{x - 1}\right)^{x}.

  1. Base →1\to 1, exponent →∞\to \infty, so use elim⁡g(f−1)e^{\lim g(f - 1)}.
  2. f−1=x+3−(x−1)x−1=4x−1f - 1 = \frac{x + 3 - (x - 1)}{x - 1} = \frac{4}{x - 1}.
  3. g(f−1)=4xx−1→4g(f - 1) = \frac{4x}{x - 1} \to 4.

Limit =e4= e^4.

Worked example 2: Making a piecewise function differentiable

f(x)=ax2+bf(x) = ax^2 + b for x≤1x \le 1 and f(x)=4x−1f(x) = 4x - 1 for x>1x > 1. Find a,ba, b so that ff is differentiable at x=1x = 1.

  1. Continuity: a+b=4−1=3a + b = 4 - 1 = 3.
  2. Derivatives: left 2a2a, right 44. Equal gives a=2a = 2.
  3. Then b=1b = 1.

Worked example 3: Absolute extrema with an endpoint

Find the maximum of f(x)=xe−xf(x) = x e^{-x} on [0,3][0, 3].

  1. f′(x)=e−x(1−x)f'(x) = e^{-x}(1 - x), zero at x=1x = 1.
  2. f(0)=0f(0) = 0, f(1)=e−1≈0.368f(1) = e^{-1} \approx 0.368, f(3)=3e−3≈0.149f(3) = 3e^{-3} \approx 0.149.

Maximum =1/e= 1/e at x=1x = 1, minimum =0= 0 at x=0x = 0.

Worked example 4: King property

Evaluate I=∫0π/2sin⁡xsin⁡x+cos⁡x dxI = \int_0^{\pi/2} \frac{\sin x}{\sin x + \cos x}\,dx.

  1. Replace xx by π2−x\frac{\pi}{2} - x: I=∫0π/2cos⁡xcos⁡x+sin⁡x dxI = \int_0^{\pi/2} \frac{\cos x}{\cos x + \sin x}\,dx.
  2. Add the two forms: 2I=∫0π/21 dx=π22I = \int_0^{\pi/2} 1\,dx = \frac{\pi}{2}.

So I=π4I = \frac{\pi}{4}.

Worked example 5: Mean value theorem value

Find cc for f(x)=ln⁡xf(x) = \ln x on [1,e][1, e].

  1. Chord slope: ln⁡e−ln⁡1e−1=1e−1\frac{\ln e - \ln 1}{e - 1} = \frac{1}{e - 1}.
  2. f′(c)=1c=1e−1f'(c) = \frac{1}{c} = \frac{1}{e - 1} gives c=e−1≈1.718c = e - 1 \approx 1.718, which lies in (1,e)(1, e).

Common traps

  • Applying L'Hospital to a form that is not 00\frac{0}{0} or ∞∞\frac{\infty}{\infty}.
  • Assuming continuity implies differentiability.
  • Reporting a local maximum as the absolute maximum without checking endpoints.
  • For Rolle and Lagrange, ignoring a corner or discontinuity inside the interval.
  • Forgetting to change the limits after a substitution.
  • Writing lim⁡1−cos⁡xx2=1\lim \frac{1 - \cos x}{x^2} = 1. It is 12\frac{1}{2}.
  • Treating ∫−11dxx2\int_{-1}^{1} \frac{dx}{x^2} as a regular integral. It is improper at 0 and diverges.

Quick revision

  • sin⁡xx→1\frac{\sin x}{x} \to 1, 1−cos⁡xx2→12\frac{1 - \cos x}{x^2} \to \frac{1}{2}, ex−1x→1\frac{e^x - 1}{x} \to 1, (1+x)1/x→e(1 + x)^{1/x} \to e.
  • 1∞1^\infty: limit =elim⁡g(f−1)= e^{\lim g(f-1)}.
  • Differentiable implies continuous, not the reverse; check left and right derivatives at joins.
  • Rolle: equal end values give f′(c)=0f'(c) = 0. Lagrange: f′(c)f'(c) equals the chord slope.
  • Absolute extrema on [a,b][a, b]: compare critical points and endpoints.
  • Two variables: rt−s2>0rt - s^2 > 0 with r<0r < 0 max, r>0r > 0 min; rt−s2<0rt - s^2 < 0 saddle.
  • ∫abf(x) dx=∫abf(a+b−x) dx\int_a^b f(x)\,dx = \int_a^b f(a + b - x)\,dx. Odd function over [−a,a][-a, a] integrates to 0.
  • Wallis: ∫0π/2sin⁡nx dx\int_0^{\pi/2}\sin^n x\,dx via the alternating product, times π/2\pi/2 only for even nn.
  • ∫1∞x−p\int_1^\infty x^{-p} converges iff p>1p > 1.

Further reading

Test this section