GATE CS - ENGINEERING MATHEMATICS:Calculus

Mastering calculus concepts and implementation.

Calculus for GATE CS

Calculus usually contributes about 2–3 marks: standard limits, continuity checks, a differentiation (often chain rule), and a short definite/indefinite integral. Keep the standard limits automatic; rewrite messy expressions until they match one.

Topics that recur:

  • Limits near 0 / ∞ (including forms that need L’Hôpital for 0/0 or ∞/∞)
  • Basic derivatives and maxima/minima of polynomials
  • Simple integrals

1. Limits & Continuity (Most Tested Area)

Limits tell how a function behaves just before reaching a point.

1.1 Important standard limits

  • lim⁡x→0sin⁡xx=1\displaystyle \lim_{x \to 0} \frac{\sin x}{x} = 1
  • lim⁡x→01−cos⁡xx=0\displaystyle \lim_{x \to 0} \frac{1 - \cos x}{x} = 0
  • lim⁡x→0ex−1x=1\displaystyle \lim_{x \to 0} \frac{e^x - 1}{x} = 1
  • lim⁡x→∞(1+1x)x=e\displaystyle \lim_{x \to \infty} \left(1 + \frac{1}{x}\right)^x = e

GATE frequently asks indirect forms of these.

Tip:

If the expression looks messy, try rewriting it so it matches one of the standard limits above.

1.2 L’Hôpital’s Rule (Only for 0/0 or ∞/∞)

If

lim⁡x→af(x)g(x)\displaystyle \lim_{x \to a} \frac{f(x)}{g(x)}

gives 0/0 or ∞/∞, then

lim⁡x→af(x)g(x)=lim⁡x→af′(x)g′(x)\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}

This rule can save 60–70 seconds on many problems.

Example (Exam-Type):

lim⁡x→0e2x−1x\lim_{x \to 0} \frac{e^{2x} - 1}{x}

Direct substitution → 0/00/0. Apply L’Hôpital:

lim⁡x→02e2x1=2e0=2\lim_{x \to 0} \frac{2e^{2x}}{1} = 2e^{0} = 2

1.3 Continuity

A function f(x)f(x) is continuous at x=ax = a if:

  1. f(a)f(a) is defined
  2. lim⁡x→af(x)\displaystyle \lim_{x \to a} f(x) exists
  3. lim⁡x→af(x)=f(a)\displaystyle \lim_{x \to a} f(x) = f(a)

Types of Discontinuity:

  • Removable: Limit exists but ≠f(a)\neq f(a)
  • Jump: Left-hand limit ≠\neq right-hand limit
  • Infinite: Function goes to ±∞\pm \infty

GATE Pattern: Continuity questions usually check:

  • Whether left/right limits match
  • Whether piecewise functions join smoothly at boundaries

2. Differentiation (Fastest Scoring Area)

Differentiation gives the rate of change of a function.

2.1 Essential Rules

Power Rule

ddx(xn)=nxn−1\frac{d}{dx}(x^n) = n x^{n-1}

Product Rule

(fg)′=f′g+fg′(fg)' = f'g + fg'

Quotient Rule

(fg)′=f′g−fg′g2\left(\frac{f}{g}\right)' = \frac{f'g - fg'}{g^2}

Chain Rule (very important in GATE)

ddx[f(g(x))]=f′(g(x))⋅g′(x)\frac{d}{dx}[f(g(x))] = f'(g(x)) \cdot g'(x)

2.2 Common Derivatives

  • ddx(ex)=ex\dfrac{d}{dx}(e^x) = e^x
  • ddx(ln⁡x)=1x\dfrac{d}{dx}(\ln x) = \dfrac{1}{x}
  • ddx(sin⁡x)=cos⁡x\dfrac{d}{dx}(\sin x) = \cos x
  • ddx(cos⁡x)=−sin⁡x\dfrac{d}{dx}(\cos x) = -\sin x
  • ddx(tan⁡x)=sec⁡2x\dfrac{d}{dx}(\tan x) = \sec^2 x

These alone solve most differentiation questions.

2.3 Applications in Computer Science

Gradient Descent (Machine Learning)

θnew=θold−α∇J(θ)\theta_{\text{new}} = \theta_{\text{old}} - \alpha \nabla J(\theta)

Derivatives help compute gradients to minimise the loss function.

Algorithm Analysis & Optimisation

  • Understanding growth rates
  • Finding minima of continuous approximations of cost functions

3. Maxima & Minima (Direct 1‑Mark Questions)

A critical point occurs where:

  • f′(x)=0f'(x) = 0, or
  • f′(x)f'(x) is undefined

To classify the critical point, use the second derivative test:

  • f′′(x)>0f''(x) > 0 → local minimum
  • f′′(x)<0f''(x) < 0 → local maximum
  • f′′(x)=0f''(x) = 0 → inconclusive

GATE Hack (Quadratic Functions):

If f(x)=ax2+bx+cf(x) = ax^2 + bx + c:

  • a>0a > 0 → parabola opens up → minimum
  • a<0a < 0 → parabola opens down → maximum

No need to differentiate in many MCQs.


4. Integration (Less Frequent but Easy Marks)

Integration is the reverse of differentiation.

4.1 Basic Rules

Power Rule

∫xn dx=xn+1n+1+C(n≠−1)\int x^n \, dx = \frac{x^{n+1}}{n+1} + C \quad (n \neq -1)

Substitution Rule

If u=g(x)u = g(x), then:

∫f(g(x))g′(x) dx=∫f(u) du\int f(g(x)) g'(x) \, dx = \int f(u) \, du

Integration by Parts

∫u dv=uv−∫v du\int u \, dv = uv - \int v \, du

Used for: xexx e^x, xsin⁡xx \sin x, ln⁡x\ln x, etc.

4.2 Common Integrals

  • ∫exdx=ex+C\displaystyle \int e^x dx = e^x + C
  • ∫sin⁡x dx=−cos⁡x+C\displaystyle \int \sin x \, dx = -\cos x + C
  • ∫cos⁡x dx=sin⁡x+C\displaystyle \int \cos x \, dx = \sin x + C
  • ∫1x dx=ln⁡∣x∣+C\displaystyle \int \frac{1}{x} \, dx = \ln|x| + C

4.3 Definite Integrals

∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a)

where F(x)F(x) is an antiderivative of f(x)f(x).


5. GATE PYQ‑Style Solved Questions

Q1. Limit (PYQ)

Compute lim⁡x→0sin⁡3xx\displaystyle \lim_{x \to 0} \frac{\sin 3x}{x}.

Rewrite:

sin⁡3xx=sin⁡3x3x⋅3→1⋅3=3 as x→0\frac{\sin 3x}{x} = \frac{\sin 3x}{3x} \cdot 3 \to 1 \cdot 3 = 3 \text{ as } x \to 0

Answer: 3

Q2. Differentiation (PYQ)

Let f(x)=ln⁡(x2+1)f(x) = \ln(x^2 + 1). Find f′(x)f'(x).

f′(x)=1x2+1⋅2x=2xx2+1f'(x) = \frac{1}{x^2 + 1} \cdot 2x = \frac{2x}{x^2 + 1}

Q3. Maxima–Minima (PYQ)

Let f(x)=x2−6x+5f(x) = x^2 - 6x + 5. Find the minimum.

f′(x)=2x−6=0⇒x=3f'(x) = 2x - 6 = 0 \Rightarrow x = 3f′′(x)=2>0⇒local minimum at x=3f''(x) = 2 > 0 \Rightarrow \text{local minimum at } x = 3

Minimum value:

f(3)=9−18+5=−4f(3) = 9 - 18 + 5 = -4

Q4. Integration (PYQ)

Evaluate ∫01(3x2+2x) dx\displaystyle \int_0^1 (3x^2 + 2x)\,dx.

∫01(3x2+2x) dx=[x3+x2]01=(1+1)−0=2\int_0^1 (3x^2 + 2x)\,dx = \left[ x^3 + x^2 \right]_0^1 = (1 + 1) - 0 = 2

6. Common Mistakes (Avoid These)

  • Using L’Hôpital when the limit is not 0/0 or ∞/∞
  • Forgetting the chain rule inside composite functions
  • Dropping minus signs in trigonometric derivatives
  • Wrong substitution in integrals
  • Treating discontinuous functions as differentiable

These errors easily cost 1–2 marks if you’re not careful.


7. Fast Revision Sheet (Night Before Exam)

Limits

  • sin⁡xx→1\displaystyle \frac{\sin x}{x} \to 1 as x→0x \to 0
  • ex−1x→1\displaystyle \frac{e^x - 1}{x} \to 1 as x→0x \to 0

Derivatives

  • (ex)′=ex(e^x)' = e^x
  • (ln⁡x)′=1/x(\ln x)' = 1/x
  • (sin⁡x)′=cos⁡x(\sin x)' = \cos x
  • (cos⁡x)′=−sin⁡x(\cos x)' = -\sin x

Max/Min

  • Critical point: f′(x)=0f'(x) = 0, then apply f′′(x)f''(x) test.

Integrals

  • ∫exdx=ex+C\displaystyle \int e^x dx = e^x + C
  • ∫sin⁡xdx=−cos⁡x+C\displaystyle \int \sin x dx = -\cos x + C
  • ∫1xdx=ln⁡∣x∣+C\displaystyle \int \frac{1}{x} dx = \ln|x| + C

8. Practice set

You can turn these into practice questions in Schoolabe:

  1. Evaluate lim⁡x→0e5x−1x\displaystyle \lim_{x \to 0} \frac{e^{5x} - 1}{x}.
  2. Differentiate f(x)=sin⁡(x2)f(x) = \sin(x^2).
  3. Find the max/min of f(x)=−2x2+4x+1f(x) = -2x^2 + 4x + 1.
  4. Compute ∫(2x3−3x) dx\displaystyle \int (2x^3 - 3x)\,dx.
  5. Evaluate \(\displaystyle \int_1^2 \frac{1}{x}\,dx\`.

Timed drills: GATE hub.