GATE Data Science & AIGATE DA
Module 5 · Calculus & optimization

Calculus for GATE DA: limits, slopes and the best possible answer

The DA syllabus keeps calculus to a single variable, and the questions are very consistent: evaluate a limit, check whether a piecewise function is continuous and differentiable, use a Taylor series, and find maxima and minima, often on an interval. This module covers exactly that, and ends with the optimisation ideas that machine learning is built on.

You need: the derivatives refresher (Refreshers 3.1) and functions (Refreshers 1.2). Every chapter opens with a concrete case (a table of values, a jump and a corner, a ticket price to set) before the definitions, and words with a dotted underline can be tapped for a plain definition.

The route

    Limits describe what a function is heading towards; continuity and differentiability describe whether its graph has gaps or sharp corners. GATE DA asks a limit almost every year (often a 0/0 form) and regularly asks whether a piecewise function, or ReLU, is continuous and differentiable.

    You need: functions and logs (Refreshers Part 1) and derivatives (Refreshers 3.1). Quick check: what is the derivative of $x^3$? (It’s $3x^2$.) If that’s unfamiliar, Refreshers 3.1 takes 45 minutes and makes this module much easier.

    Limits: where a function is heading

    $\lim_{x\to a} f(x) = L$ means $f(x)$ gets as close as you like to $L$ when $x$ is close enough to $a$, whatever happens exactly at $a$.

    A limit appears in almost every GATE DA paper, usually a “0/0” form that needs a standard limit, a conjugate, L’Hôpital’s rule or a Taylor series. They’re quick marks once you know the toolkit.

    It’s like a run chase that ends exactly at the target: the run rate needed tells you where the scoreboard is heading even before the last ball.

    Where it shows up in GATE DA

    A direct limit question in most papers, usually NAT.

    2024 Q60 · ln((x² + 1)cos x)/x²2025 Q32 · √(t² + t) − t2026 Q45 · limit of a Poisson sum
    Heat: every year, 1–2 marks

    Why limits? Some of the most useful quantities can’t be found by plugging in a number. The slope of a curve at a point is $\frac{f(x+h) - f(x)}{h}$ with $h = 0$, which is $\frac00$: meaningless as it stands. What we can do is watch what happens as $h$ gets closer to 0. The same “watch it approach” idea gives $e$, the Poisson distribution and the long-run behaviour of averages. A limit is the name for where a function is heading.

    A table makes it concrete. $\frac{\sin x}{x}$ is $\frac00$ at $x = 0$, but at $x = 0.1$ it is $0.99833$ and at $x = 0.01$ it is $0.99998$. The values are closing in on 1, so $\lim_{x\to0}\frac{\sin x}{x} = 1$, even though the function has no value at 0 itself.

    Look at $f(x) = \dfrac{x^2 - 4}{x - 2}$. At $x = 2$ it’s $\frac00$: undefined. But for every other $x$ you can cancel: $f(x) = x + 2$. So as $x$ approaches 2, $f(x)$ approaches 4. The function has a hole at $x = 2$, and the limit fills it in: $\lim_{x\to2} f(x) = 4$.

    • One-sided limits: $x \to a^-$ (from the left) and $x \to a^+$ (from the right). The limit exists exactly when both exist and are equal.
    • Limits at infinity: what happens as $x$ grows without bound. For a ratio of polynomials, only the leading terms matter: $\lim_{x\to\infty}\frac{3x^2 + 1}{x^2 - 5} = 3$.
    • If $f$ is continuous at $a$ (no hole, jump or blow-up), the limit is just $f(a)$: substitute.
    • $\dfrac{\sin x}{x} \to 1$,   $\dfrac{1 - \cos x}{x^2} \to \dfrac12$
    • $\dfrac{e^x - 1}{x} \to 1$,   $\dfrac{\ln(1 + x)}{x} \to 1$
    • $(1 + x)^{1/x} \to e$

    Variants follow by substitution: $\frac{\sin 3x}{x} = 3\cdot\frac{\sin 3x}{3x} \to 3$; $\frac{\ln(1 + x^2)}{x^2} \to 1$.

    1. Factor and cancel (polynomials).
    2. Conjugate for square roots: multiply by $\frac{\sqrt{A} + B}{\sqrt{A} + B}$.
    3. Standard limits above, after a substitution.
    4. L’Hôpital’s rule: if the form is $\frac00$ or $\frac\infty\infty$, then $\lim\frac{f}{g} = \lim\frac{f'}{g'}$ (differentiate top and bottom separately). Repeat if needed.
    5. Taylor series (Part 2): replace each function by its first few terms.

    Two tools in action. Conjugate: $\dfrac{\sqrt{x + 4} - 2}{x}$ is $\frac00$ at 0. Multiply top and bottom by $\sqrt{x+4} + 2$: the top becomes $(x + 4) - 4 = x$, which cancels, leaving $\dfrac{1}{\sqrt{x+4} + 2} \to \dfrac14$. L’Hôpital: $\dfrac{e^x - 1}{x}$ is $\frac00$ at 0; differentiate top and bottom separately to get $\dfrac{e^x}{1} \to 1$.

    Try it

    Each function has a problem point where plugging in gives 0/0. Zoom in around it: the graph has a single missing point (the hollow dot), and the limit is the height of that hole. The table shows values creeping up on it from both sides.

    GATE DA 2024 · Q60 · NAT · 2 marks

    Evaluate the following limit: $$\lim_{x\to0}\frac{\ln\big((x^2 + 1)\cos x\big)}{x^2} = \underline{\hspace{3em}}.$$

    1. Split the log of a product: $\ln\big((x^2+1)\cos x\big) = \ln(1 + x^2) + \ln(\cos x)$. So the limit is $\displaystyle\lim\frac{\ln(1 + x^2)}{x^2} + \lim\frac{\ln\cos x}{x^2}$.

      $\ln(ab) = \ln a + \ln b$ turns one hard limit into two familiar ones.

    2. First term: with $u = x^2 \to 0$, it’s $\frac{\ln(1 + u)}{u} \to 1$.

      A standard limit after substitution.

    3. Second term ($\frac00$): L’Hôpital gives $\dfrac{-\tan x}{2x} \to -\dfrac12$, since $\frac{\tan x}{x} \to 1$.

      $\frac{d}{dx}\ln\cos x = \frac{-\sin x}{\cos x} = -\tan x$. (Or Taylor: $\ln\cos x \approx -\frac{x^2}{2}$.)

    4. Total: $1 - \tfrac12 = $ 0.5.

      Official key: 0.5.

    Warm-up. Find $\displaystyle\lim_{x\to3}\frac{x^2 - 9}{x - 3}$.

    Factor the top: $x^2 - 9 = (x - 3)(x + 3)$.

    Cancel $(x - 3)$ to get $x + 3 \to 6$.

    Warm-up. Find $\displaystyle\lim_{x\to\infty}\frac{2x + 1}{x - 4}$.

    For large $x$ only the leading terms matter.

    $\frac{2x}{x} = 2$. (Dividing top and bottom by $x$: $\frac{2 + 1/x}{1 - 4/x} \to 2$.)

    GATE DA 2025 · Q32 · NAT · 1 mark

    $\displaystyle\lim_{t\to+\infty}\left(\sqrt{t^2 + t} - t\right) = $ ______ (Round off to one decimal place)

    ∞ − ∞ form. Multiply and divide by the conjugate $\sqrt{t^2 + t} + t$.

    $\sqrt{t^2+t} - t = \dfrac{(t^2 + t) - t^2}{\sqrt{t^2 + t} + t} = \dfrac{t}{\sqrt{t^2 + t} + t} = \dfrac{1}{\sqrt{1 + 1/t} + 1} \to \dfrac12$. Official key: 0.5.

    $\displaystyle\lim_{x\to0}\frac{\sin 3x}{x}$.

    Write it as $3\cdot\frac{\sin 3x}{3x}$.

    $3\times1 = 3$.

    $\displaystyle\lim_{x\to0}\frac{e^{2x} - 1}{x}$.

    Substitute $u = 2x$, or use L’Hôpital.

    $2\cdot\frac{e^{2x} - 1}{2x} \to 2$. L’Hôpital: $\frac{2e^{2x}}{1} \to 2$.

    $\displaystyle\lim_{x\to\infty}\frac{3x^2 + 1}{x^2 - 5}$.

    Divide top and bottom by $x^2$.

    $\frac{3 + 1/x^2}{1 - 5/x^2} \to 3$.

    Find $\displaystyle\lim_{x\to0}\left(\frac{1 + \tan x}{1 + \sin x}\right)^{1/x^3}$. (Round off to two decimal places.)

    This is a $1^\infty$ form. Take logs first, then write $\ln(1 + \tan x) - \ln(1 + \sin x)$ using $\ln(1 + u) = u - \frac{u^2}{2} + \cdots$ and the series for $\tan x$ and $\sin x$.

    Call the limit $L$. Then $\ln L = \displaystyle\lim_{x\to0}\frac{\ln(1 + \tan x) - \ln(1 + \sin x)}{x^3}$, a $\frac00$ form.

    Using $\ln(1 + u) = u - \frac{u^2}{2} + \cdots$, the numerator is $(\tan x - \sin x) - \frac12(\tan^2 x - \sin^2 x) + \cdots$.

    Now $\tan x - \sin x = \left(x + \frac{x^3}{3}\right) - \left(x - \frac{x^3}{6}\right) + \cdots = \frac{x^3}{2} + \cdots$, while $\tan^2 x - \sin^2 x = x^4 + \cdots$ is too small to matter after dividing by $x^3$.

    So $\ln L = \frac12$ and $L = e^{1/2} \approx 1.65$.

    The limit $\displaystyle\lim_{x\to0}\frac{e^{ax} - 1 - \ln(1 + 2x)}{x^2}$ exists and is finite. Find $a$ and the value of the limit.

    The top and bottom both vanish at 0. For the ratio to stay finite, the $x$ term on top must cancel. Expand to the $x^2$ term, or apply L’Hôpital once and ask what the new top must be at $x = 0$.

    Expand: $e^{ax} - 1 = ax + \frac{a^2x^2}{2} + \cdots$ and $\ln(1 + 2x) = 2x - \frac{(2x)^2}{2} + \cdots = 2x - 2x^2 + \cdots$.

    The numerator is $(a - 2)x + \left(\frac{a^2}{2} + 2\right)x^2 + \cdots$. Divided by $x^2$, the first term blows up unless $a = 2$.

    With $a = 2$, the limit is $\frac{4}{2} + 2 = 4$.

    (The L’Hôpital route agrees: after one round the quotient is $\dfrac{ae^{ax} - \frac{2}{1 + 2x}}{2x}$, whose top must vanish at 0, so $a = 2$; a second round gives $\dfrac{a^2e^{ax} + \frac{4}{(1 + 2x)^2}}{2} \to \dfrac{4 + 4}{2} = 4$.) So $a = 2$ and the limit is 4.

    The value of $\displaystyle\lim_{x\to\infty} x\left(\sqrt{x^2 + 2x} - x - 1\right)$ is

    1. $0$
    2. $-\frac12$
    3. $\frac12$
    4. $+\infty$

    The bracket tends to 0 and $x$ tends to $\infty$, so you need how fast the bracket shrinks. Write $\sqrt{x^2 + 2x} = x\sqrt{1 + 2/x}$ and expand $\sqrt{1 + u}$ to the $u^2$ term.

    For large $x$, $\sqrt{x^2 + 2x} = x\sqrt{1 + u}$ with $u = \frac2x$, and $\sqrt{1 + u} = 1 + \frac u2 - \frac{u^2}{8} + \cdots$.

    So $\sqrt{x^2 + 2x} = x\left(1 + \frac1x - \frac{1}{2x^2} + \cdots\right) = x + 1 - \frac{1}{2x} + \cdots$.

    The bracket is $-\frac{1}{2x} + \cdots$, and multiplying by $x$ gives $-\frac12$. Stopping at the first-order term gives 0, the trap in (A); a sign slip in the $u^2$ term gives (C). Answer: (B) $-\frac12$.

    • Try direct substitution first; only a $\frac00$, $\frac\infty\infty$ or $\infty - \infty$ needs more work.
    • Use log rules and substitutions to reach a standard limit.
    • Check that the form really is $\frac00$ or $\frac\infty\infty$ before applying L’Hôpital.
    • Applying L’Hôpital to a form that isn’t indeterminate, which gives wrong answers.
    • Differentiating the quotient with the quotient rule. L’Hôpital differentiates top and bottom separately.
    • Assuming a limit equals the function’s value at the point; the function may not even be defined there.
    1. A limit is where f is heading near a, regardless of f(a); it exists when the left and right limits agree.
    2. Standard limits: sin x/x → 1, (1 − cos x)/x² → ½, (eˣ − 1)/x → 1, ln(1 + x)/x → 1.
    3. For indeterminate forms: factor, use a conjugate, substitute into a standard limit, apply L’Hôpital, or use Taylor.

    $\displaystyle\lim_{x\to0}\frac{1 - \cos x}{x^2}$ is

    0
    Both top and bottom go to 0; you need the rates.
    ½
    A standard limit. (L’Hôpital twice: $\frac{\sin x}{2x} \to \frac12$.)
    1
    That’s $\sin x / x$.
    ∞
    $1 - \cos x$ shrinks like $x^2/2$, as fast as the bottom.

    $f(x) = \dfrac{|x|}{x}$. The limit as $x \to 0$

    is 1
    That’s only the right-hand limit.
    is 0
    $f$ is ±1 everywhere except 0.
    does not exist
    The left limit is −1 and the right limit is +1; they disagree.

    L’Hôpital’s rule can be applied directly to $\displaystyle\lim_{x\to0}\frac{x + 1}{x + 2}$?

    Yes
    Substitute first: it’s $\frac12$, not an indeterminate form.
    No: it isn’t 0/0 or ∞/∞; just substitute to get ½
    Using L’Hôpital here would give 1, which is wrong.

    Continuity and differentiability: no gaps, no corners

    A function is continuous at a point if its graph has no gap or jump there, and differentiable if it also has no sharp corner: there’s a single well-defined tangent.

    GATE asks this every year: piecewise functions whose pieces must join smoothly (2024 Q37), whether ReLU is differentiable (2025 Q48), and which combinations of differentiable functions stay differentiable (2025 Q24).

    It’s like a road: continuous means no missing bridges; differentiable means no hairpin corners either, so you could drive it at speed without a sudden change of direction.

    Where it shows up in GATE DA

    Piecewise functions, ReLU and absolute values, and “always differentiable?” MSQs.

    2024 Q37 · make a piecewise function smooth2025 Q48 · ReLU2025 Q24 · sums, products, compositions2025 Q59 · |f(x) − f(y)| ≤ (x − y)²
    Heat: every year, 1–4 marks

    Two pictures first. A jump: $f(x) = x + 1$ for $x \lt 1$ and $f(x) = 3$ for $x \ge 1$. Coming from the left the graph heads to height 2, but at $x = 1$ it is at 3: you’d have to lift your pen. That function is not continuous at 1. A corner: $|x|$ has slope $-1$ just left of 0 and $+1$ just right of it. The graph is unbroken, but there is no single tangent at 0, so $|x|$ is continuous but not differentiable there. Every question in this chapter checks for one of these two defects.

    $f$ is continuous at $a$ if $\lim_{x\to a} f(x) = f(a)$: the limit exists, $f(a)$ exists, and they agree.

    $f$ is differentiable at $a$ if $f'(a) = \lim_{h\to0}\frac{f(a+h) - f(a)}{h}$ exists. For that, the left slope (with $h \to 0^-$) must equal the right slope ($h \to 0^+$).

    Differentiable ⇒ continuous, but not the other way round: $|x|$ and ReLU are continuous at 0 but have corners there (left slope ≠ right slope).

    At each boundary point, write two equations:

    1. Values match (continuity): left piece = right piece at the boundary.
    2. Slopes match (differentiability): derivative of the left piece = derivative of the right piece there.

    Two boundaries give four equations, enough for the unknown coefficients (and to check the options).

    If $f$ and $g$ are differentiable at $c$: $f \pm g$, $fg$, and $f/g$ (when $g(c) \ne 0$) are differentiable at $c$. A composition $f(g(x))$ is differentiable at $c$ if $g$ is differentiable at $c$ and $f$ is differentiable at $g(c)$. Knowing $f$ only at $c$ isn’t enough for $f\circ g$.

    Try it

    This is the function from GATE 2024 Q37: $-x$ on the left, $ax^2 + bx + c$ in the middle, $x$ on the right. Adjust $a, b, c$ until the pieces meet (no jumps) and the slopes agree at both joins (no corners). The readout reports each condition at $x = -2$ and $x = 2$.

    GATE DA 2024 · Q37 · MCQ · 2 marks

    Let $f:\R\to\R$ be a function. (Note: $\R$ denotes the set of real numbers.)

    $$f(x) = \begin{cases}-x, & \text{if } x \lt -2\\ ax^2 + bx + c, & \text{if } x\in[-2, 2]\\ x, & \text{if } x \gt 2\end{cases}$$

    Which ONE of the following choices gives the values of $a, b, c$ that make the function $f$ continuous and differentiable?

    1. $a = \frac14,\ b = 0,\ c = 1$
    2. $a = \frac12,\ b = 0,\ c = 0$
    3. $a = 0,\ b = 0,\ c = 0$
    4. $a = 1,\ b = 1,\ c = -4$
    1. At $x = 2$: values $4a + 2b + c = 2$; slopes $4a + b = 1$ (the middle piece’s derivative $2ax + b$ at 2 must equal the right piece’s slope 1).

      Left limit = right limit = value, and left slope = right slope.

    2. At $x = -2$: values $4a - 2b + c = 2$ (the left piece gives $-(-2) = 2$); slopes $-4a + b = -1$.

      The left piece $-x$ has slope $-1$.

    3. Subtracting the two value equations gives $4b = 0$, so $b = 0$. Then $4a = 1$ gives $a = \frac14$, and $1 + c = 2$ gives $c = 1$. Answer (A).

      Check: the middle piece $\frac{x^2}{4} + 1$ has value 2 and slope ±1 at ±2, matching both outer pieces. (This smooths out the corner of $|x|$.) Official key: (A).

    Warm-up. $f(x) = x^2$ for $x \lt 2$ and $f(x) = ax$ for $x \ge 2$. Which $a$ makes $f$ continuous at 2?

    Make the two pieces agree at $x = 2$.

    Left: $2^2 = 4$. Right: $2a$. So $a = 2$.

    Warm-up. Is $f(x) = |x - 1|$ differentiable at $x = 1$?

    Compare the slope just left of 1 with the slope just right of 1.

    Left slope $-1$, right slope $+1$: a corner, so no. (It is continuous there.)

    GATE DA 2025 · Q24 · MSQ · 1 mark

    Consider two functions $f:\R\to\R$ and $g:\R\to(1, \infty)$. Both functions are differentiable at a point $c$. Which of the following functions is/are ALWAYS differentiable at $c$? The symbol $\cdot$ denotes product and the symbol $\circ$ denotes composition of functions.

    1. $f \pm g$
    2. $f\cdot g$
    3. $\dfrac fg$
    4. $f\circ g + g\circ f$

    Sums, products and quotients are safe if the denominator isn’t zero (and $g \gt 1$). For $f(g(x))$, you need $f$ differentiable at $g(c)$, which isn’t given.

    (A), (B) ✓. (C) ✓ because $g \gt 1$, so it’s never zero. (D) ✗: $f\circ g$ needs $f$ to be differentiable at the point $g(c)$, and we only know about $f$ at $c$. (Similarly $g\circ f$ needs $g$ differentiable at $f(c)$.) Official key: A; B; C.

    GATE DA 2025 · Q48 · MSQ · 2 marks

    Which of the following statements is/are correct about the rectified linear unit (ReLU) activation function defined as ReLU($x$) = max($x$, 0), where $x\in\R$?

    1. ReLU is continuous everywhere
    2. ReLU is differentiable everywhere
    3. ReLU is not differentiable at $x = 0$
    4. ReLU($x$) = ReLU($ax$), for all $a\in\R$

    Left slope at 0 is 0, right slope is 1. For (D), try $a = -1$ or $a = 2$.

    (A) ✓: no jumps. (B) ✗ and (C) ✓: a corner at 0 (slopes 0 and 1). (D) ✗: ReLU(1) = 1 but ReLU(−1·1) = 0. Official key: A; C.

    GATE DA 2025 · Q59 · NAT · 2 marks

    Let $f:\R\to\R$ be such that $|f(x) - f(y)| \le (x - y)^2$ for all $x, y\in\R$. Then $f(1) - f(0) = $ ______ (Answer in integer)

    Divide by $|x - y|$ and let $y \to x$. What does that say about $f'(x)$?

    $\left|\frac{f(x) - f(y)}{x - y}\right| \le |x - y| \to 0$, so $f'(x) = 0$ for every $x$: $f$ is constant. Hence $f(1) - f(0) = 0$. Official key: 0.

    $f(x) = kx + 1$ for $x \lt 1$ and $f(x) = x^2 + 2$ for $x \ge 1$. For which $k$ is $f$ continuous? Is it then differentiable at 1? (Enter $k$.)

    Match the values at 1: $k + 1 = 3$. Then compare slopes: $k$ versus $2x$ at 1.

    $k + 1 = 1 + 2$ gives $k = 2$. Slopes: left 2, right $2\cdot1 = 2$. They match, so it’s differentiable too.

    Let $a \gt 0$ and define $f(x) = \dfrac{1 - \cos(ax)}{x^2}$ for $x \lt 0$, $f(0) = b$, and $f(x) = \dfrac{\sqrt{1 + x} - 1}{x}$ for $x \gt 0$. Find $a$ and $b$ that make $f$ continuous at 0, and then the right-hand derivative $\displaystyle\lim_{h\to0^+}\frac{f(h) - f(0)}{h}$.

    Find both one-sided limits at 0 and set them equal to $b$. For the right derivative, expand $\sqrt{1 + h}$ to the $h^2$ term.

    Left: $1 - \cos(ax) = \frac{a^2x^2}{2} - \cdots$, so the left limit is $\frac{a^2}{2}$. Right: $\sqrt{1 + x} - 1 = \frac x2 - \frac{x^2}{8} + \cdots$, so the right limit is $\frac12$.

    Continuity needs $\frac{a^2}{2} = \frac12 = b$, so $a = 1$ (since $a \gt 0$) and $b = \frac12$.

    Right derivative: $f(h) = \frac12 - \frac h8 + \cdots$ for small $h \gt 0$, so $\frac{f(h) - \frac12}{h} \to -\frac18$.

    (On the left, $f(x) = \frac12 - \frac{x^2}{24} + \cdots$, so the left derivative is 0. The two differ: $f$ is continuous but not differentiable at 0.) So $a = 1$, $b = 0.5$, right derivative $-0.125$.

    Let $f(x) = ax^2 + bx$ for $x \le 1$ and $f(x) = x\ln x + 2$ for $x \gt 1$. If $f$ is differentiable at $x = 1$, find $f(-1)$.

    Differentiable at 1 means two conditions: the values match at 1 and the slopes match at 1. That gives two equations in $a$ and $b$.

    Values at 1: the left piece gives $a + b$; the right piece tends to $1\cdot\ln 1 + 2 = 2$. So $a + b = 2$.

    Slopes at 1: the left piece has slope $2a + b$; the right piece has derivative $\ln x + 1$, which is 1 at $x = 1$. So $2a + b = 1$.

    Subtracting, $a = -1$, and then $b = 3$.

    $f(-1) = a(-1)^2 + b(-1) = -1 - 3 = -4$.

    Which of the following statements is/are correct?

    1. $f(x) = |x^2 - 4x + 3|$ fails to be differentiable at exactly two points of $\R$.
    2. $g(x) = (x - 1)|x - 1|$ is differentiable at $x = 1$.
    3. $h(x) = |\sin x|$ is differentiable at $x = 0$.
    4. $k(x) = \max(x, x^2)$ is differentiable at $x = 1$.

    For each one, find the left and right slopes at the suspicious point. An absolute value only creates a corner where the inside crosses zero with a non-zero slope.

    (A) ✓. $x^2 - 4x + 3 = (x - 1)(x - 3)$ crosses zero at 1 and 3 with slopes $-2$ and $2$. Taking the absolute value flips the sign on one side, so the one-sided slopes are $\mp2$ at 1 and $\mp2$ at 3: two corners, and nowhere else.

    (B) ✓. $\frac{g(x) - g(1)}{x - 1} = |x - 1| \to 0$ from both sides, so $g'(1) = 0$. The extra factor $(x - 1)$ smooths the corner.

    (C) ✗. Near 0, $|\sin x| \approx |x|$: slopes $-1$ on the left and $1$ on the right.

    (D) ✗. Just left of 1, $x \gt x^2$, so $k = x$ with slope 1; just right of 1, $k = x^2$ with slope 2. A corner. Answer: A; B.

    • At every join of a piecewise function, check values first, then slopes.
    • Remember the classic corners: $|x|$, ReLU and $\max/\min$ of functions.
    • For compositions, ask where the outer function is being evaluated.
    • Concluding differentiability from continuity alone.
    • Checking only one boundary of a piecewise function.
    • Assuming $f\circ g$ is differentiable at $c$ because $f$ is.
    1. Continuous at a: lim f(x) = f(a). Differentiable at a: left slope = right slope (so no corner).
    2. Differentiable ⇒ continuous, not conversely: |x| and ReLU are continuous everywhere but not differentiable at 0.
    3. Piecewise functions: match values and slopes at every boundary. Sums, products and quotients (non-zero denominator) preserve differentiability; compositions need care.

    $|x - 3|$ is

    differentiable everywhere
    It has a corner at $x = 3$.
    continuous everywhere, not differentiable at 3
    Slopes −1 and +1 meet at a corner.
    discontinuous at 3
    There’s no jump; the two pieces meet at 0.

    A function with a jump at $x = 1$ is

    differentiable but not continuous at 1
    Differentiable always implies continuous.
    neither continuous nor differentiable at 1
    No continuity means no derivative either.
    continuous but not differentiable at 1
    A jump breaks continuity.

    $f(x) = x|x|$ at $x = 0$ is

    not differentiable, because it contains |x|
    Check the slopes: $x|x|$ is $x^2$ on the right and $-x^2$ on the left.
    differentiable, with f′(0) = 0
    Both one-sided slopes at 0 are 0, so the corner is smoothed out.
    discontinuous
    It’s 0 at 0 and close to 0 nearby.

    $\displaystyle\lim_{x\to0}\frac{\ln(1 + 5x)}{x}$ is

    1
    Substitute $u = 5x$; there’s a factor of 5.
    5
    $5\cdot\frac{\ln(1 + 5x)}{5x} \to 5$.
    0
    It’s a 0/0 form, not 0.
    $\ln 5$
    The limit doesn’t produce a log.

    Which is continuous at 0 but not differentiable there?

    $x^2$
    It’s smooth at 0 (slope 0).
    $\max(0, x)$
    ReLU: continuous, with a corner at 0.
    $1/x$
    It isn’t even defined at 0.

    By L’Hôpital, $\displaystyle\lim_{x\to0}\frac{\sin x - x}{x^3}$ equals

    0
    Apply L’Hôpital three times (it stays 0/0 until then).
    $-\frac16$
    $\frac{\cos x - 1}{3x^2} \to \frac{-\sin x}{6x} \to -\frac16$.
    $\frac16$
    Watch the sign: $\sin x \lt x$ for small positive $x$.

    Two of the syllabus’s named topics. Taylor series rebuild a function from its derivatives at one point, which gives approximations, quick limits, and a trick for reading off high-order derivatives. Then maxima and minima: finding turning points with the first and second derivatives, and finding the true largest and smallest values on an interval, a type of question GATE DA has asked every year.

    You need: Part 1, sums (Refreshers 2.1) and derivatives (Refreshers 3.1).

    Taylor series: rebuilding a function from one point

    A Taylor series writes a function as a polynomial built from its derivatives at a single point: $f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots$.

    It’s named in the syllabus, it powers quick limit calculations, and GATE has used it to ask for a 10th derivative in seconds (2025 Q14). In ML, Taylor’s second-order approximation is how Newton’s method and many optimisers work.

    It’s like predicting a car’s position from a single instant: where it is, how fast it’s going, how fast that’s changing, and so on. Each extra piece of information makes the prediction good further into the future.

    Where it shows up in GATE DA

    Derivatives from series, approximations, and Taylor-based limits.

    2025 Q14 · 10th derivative of (eˣ − e⁻ˣ)/22024 Q60 · ln cos x ≈ −x²/2
    Heat: most years, 1–2 marks

    Why approximate by polynomials? Polynomials only need adding and multiplying, so they’re easy to compute, differentiate and compare. Functions like $e^x$ or $\ln(1 + x)$ are not. A Taylor series swaps a hard function for a polynomial that matches it closely near one point. For example, near 0, $e^x \approx 1 + x + \frac{x^2}{2}$, so $e^{0.1} \approx 1 + 0.1 + 0.005 = 1.105$; the true value is $1.10517$. Three easy terms, four correct digits.

    Notation: $f^{(n)}(a)$ means the $n$th derivative of $f$ at $a$ ($f^{(2)} = f''$), and $n!$ is the factorial from Refreshers 1.1.

    The Taylor series of $f$ around $a$: $$f(x) = \sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x - a)^n = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \cdots$$ Around $a = 0$ it’s called a Maclaurin series. Keeping terms up to $(x - a)^n$ gives the degree-$n$ Taylor polynomial $T_n(x)$, the best degree-$n$ polynomial approximation near $a$. $T_1$ is the tangent line.

    FunctionMaclaurin series
    $e^x$$1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots$
    $\sin x$$x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots$ (odd powers only)
    $\cos x$$1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots$ (even powers only)
    $\ln(1 + x)$$x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots$ for $|x| \lt 1$
    $\frac{1}{1 - x}$$1 + x + x^2 + x^3 + \cdots$ for $|x| \lt 1$ (the geometric series)

    The coefficient of $x^n$ in the Maclaurin series is $\frac{f^{(n)}(0)}{n!}$. So $f^{(n)}(0) = n!\times(\text{coefficient of } x^n)$. If a power is missing from the series, that derivative at 0 is zero.

    Try it

    Raise the order $n$ and watch the Taylor polynomial (orange) hug the true function (teal) over a wider and wider stretch around 0. For $\ln(1 + x)$, notice it never manages beyond $x = 1$: that series only converges for $|x| \lt 1$.

    GATE DA 2025 · Q14 · MCQ · 1 mark

    Let $f(x) = \dfrac{e^x - e^{-x}}{2}$, $x\in\R$. Let $f^{(k)}(a)$ denote the $k$th derivative of $f$ evaluated at $a$. What is the value of $f^{(10)}(0)$? (Note: ! denotes factorial)

    1. 0
    2. 1
    3. $\frac{1}{10!}$
    4. $\frac{2}{10!}$
    1. Write both series: $e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots$ and $e^{-x} = 1 - x + \frac{x^2}{2!} - \frac{x^3}{3!} + \cdots$.

      Replace $x$ by $-x$ to get the second: odd powers flip sign.

    2. Subtract and halve: even powers cancel, odd powers double then halve. $f(x) = x + \frac{x^3}{3!} + \frac{x^5}{5!} + \cdots$ (only odd powers). This function is $\sinh x$.

      $f$ is an odd function ($f(-x) = -f(x)$), and odd functions have only odd powers.

    3. The coefficient of $x^{10}$ is 0, so $f^{(10)}(0) = 10!\times0 = $ 0. Answer (A).

      Alternatively: $f' = \cosh$, $f'' = \sinh = f$, so even derivatives are $\sinh 0 = 0$. Options (C) and (D) confuse the coefficient with the derivative. Official key: (A).

    Warm-up. Use $e^x \approx 1 + x + \frac{x^2}{2}$ to approximate $e^{0.2}$.

    Substitute $x = 0.2$: $\frac{0.2^2}{2} = 0.02$.

    $1 + 0.2 + 0.02 = 1.22$ (true value $1.2214$).

    Warm-up. What is the coefficient of $x^2$ in the Maclaurin series of $\cos x$?

    $\cos x = 1 - \frac{x^2}{2!} + \cdots$

    $-\frac{1}{2!} = -0.5$.

    Approximate $e^{0.1}$ using the Taylor polynomial up to $x^2$.

    $1 + x + x^2/2$ at $x = 0.1$.

    $1 + 0.1 + 0.005 = 1.105$. The true value is 1.10517…, so the error is about 0.00017 (roughly the next term, $0.1^3/6$).

    What is the coefficient of $x^3$ in the Maclaurin series of $e^{2x}$?

    Substitute $2x$ into the series for $e^x$.

    $\frac{(2x)^3}{3!} = \frac{8x^3}{6}$, so the coefficient is $\frac43$.

    For $f(x) = \ln(1 + x)$, find $f'''(0)$ using the series.

    The coefficient of $x^3$ is $\frac13$. Multiply by $3!$.

    $3!\times\frac13 = 2$. (Directly: $f' = (1+x)^{-1}$, $f'' = -(1+x)^{-2}$, $f''' = 2(1+x)^{-3}$, which is 2 at 0.)

    Use Taylor series to find $\displaystyle\lim_{x\to0}\frac{\sin x - x}{x^3}$.

    $\sin x - x = -\frac{x^3}{6} + \frac{x^5}{120} - \cdots$

    Dividing by $x^3$: $-\frac16 + \frac{x^2}{120} - \cdots \to -\frac16$. Much quicker than three rounds of L’Hôpital.

    Let $f(x) = x^2e^{-x^2}$. Find $f^{(6)}(0)$, the sixth derivative at 0.

    Don’t differentiate six times. Build the Maclaurin series by substituting $-x^2$ into the series for $e^x$, multiply by $x^2$, and read off the $x^6$ coefficient.

    $e^{-x^2} = 1 - x^2 + \frac{x^4}{2} - \cdots$, so $f(x) = x^2 - x^4 + \frac{x^6}{2} - \cdots$.

    The coefficient of $x^6$ is $\frac{f^{(6)}(0)}{6!}$, so $\frac{f^{(6)}(0)}{720} = \frac12$.

    $f^{(6)}(0) = 360$. (Answering $\frac12$ is the classic slip: that’s the coefficient, not the derivative.)

    Find $\displaystyle\lim_{x\to0}\frac{\cos x - e^{-x^2/2}}{x^4}$. (Round off to three decimal places.)

    Both functions start $1 - \frac{x^2}{2}$, so those terms cancel. Expand each one to the $x^4$ term.

    $\cos x = 1 - \frac{x^2}{2} + \frac{x^4}{24} - \cdots$.

    $e^{-x^2/2} = 1 - \frac{x^2}{2} + \frac{1}{2}\left(\frac{x^2}{2}\right)^2 - \cdots = 1 - \frac{x^2}{2} + \frac{x^4}{8} - \cdots$.

    The difference is $\left(\frac{1}{24} - \frac{3}{24}\right)x^4 + \cdots = -\frac{x^4}{12} + \cdots$.

    Dividing by $x^4$, the limit is $-\frac1{12} \approx -0.083$. (L’Hôpital would need four rounds here.)

    The degree-2 Taylor polynomial of $f(x) = \sqrt x$ about $x = 4$ is used to estimate $\sqrt{4.4}$. The estimate is

    1. $2.1000$
    2. $2.0975$
    3. $2.0950$
    4. $2.1025$

    You need $f(4)$, $f'(4)$ and $f''(4)$. The quadratic term is $\frac{f''(4)}{2!}(x - 4)^2$; don’t forget the $2!$ or the sign of $f''$.

    $f(4) = 2$. $f'(x) = \frac{1}{2\sqrt x}$, so $f'(4) = \frac14$. $f''(x) = -\frac{1}{4x^{3/2}}$, so $f''(4) = -\frac{1}{32}$.

    $T_2(x) = 2 + \frac14(x - 4) - \frac{1}{64}(x - 4)^2$.

    At $x = 4.4$: $2 + 0.1 - \frac{0.16}{64} = 2 + 0.1 - 0.0025 = 2.0975$. The true value is $2.09762\ldots$, very close.

    (A) stops at degree 1; (C) forgets to divide $f''(4)$ by $2!$; (D) gets the sign of $f''$ wrong. Answer: (B).

    • Memorise the five standard series; most others follow by substitution.
    • Use parity: odd functions have only odd powers, even functions only even powers.
    • For limits, expand just far enough that something survives the division.
    • Confusing the coefficient $\frac{f^{(n)}(0)}{n!}$ with the derivative $f^{(n)}(0)$.
    • Using $\ln(1 + x)$ or $\frac1{1-x}$ outside $|x| \lt 1$.
    • Dropping the factorials in the denominators.
    1. Taylor: f(x) = Σ f⁽ⁿ⁾(a)(x − a)ⁿ/n!; T₁ is the tangent line, and higher orders fit better near a.
    2. Know eˣ, sin, cos, ln(1 + x) and 1/(1 − x); substitute to get variants.
    3. f⁽ⁿ⁾(0) = n! × (coefficient of xⁿ); a missing power means that derivative at 0 is 0.

    The degree-1 Taylor polynomial of $f$ at $a$ is

    the constant $f(a)$
    That’s degree 0.
    the tangent line at $a$
    $f(a) + f'(a)(x - a)$.
    the secant through two points
    Taylor uses information at a single point.

    For $f(x) = \cos x$, $f^{(7)}(0)$ is

    $-\frac{1}{7!}$
    That would be a coefficient, and cos has no $x^7$ term anyway.
    0
    cos is even: only even powers, so odd derivatives vanish at 0.
    1
    Derivatives of cos at 0 cycle through 1, 0, −1, 0; the odd ones are 0.

    Near $x = 0$, $\ln\cos x$ is approximately

    $-x$
    $\ln\cos x$ is even, so there’s no linear term.
    $-\frac{x^2}{2}$
    $\cos x \approx 1 - \frac{x^2}{2}$ and $\ln(1 + u) \approx u$. (That’s the 2024 Q60 step.)
    $\frac{x^2}{2}$
    $\cos x \lt 1$ near 0, so its log is negative.

    Maxima and minima: finding the turning points

    At a smooth peak or valley the slope is zero; the second derivative tells which it is; and on an interval the true largest and smallest values come from comparing those turning points with the endpoints.

    An extrema question has appeared in every GATE DA paper (2024 Q50, 2025 Q49, 2026 Q27), usually as an MSQ with subtle options about “local” vs “global” and about endpoints.

    It’s like hiking a ridge with a map: peaks and dips are where the path is momentarily flat, but the highest point of your hike might be where the trail starts or ends.

    Where it shows up in GATE DA

    Every paper: classify critical points of a polynomial and compare with endpoints.

    2024 Q50 · quartic: local max/min2025 Q49 · cubic on [−8, 0]2026 Q27 · cubic on (−1, 3]2024 Q15 · f′ = 0, f″ > 02025 Q51 · f″ > 0 everywhere
    Heat: every year, 2–4 marks

    Why find maxima? The Nagpur Neural Nets price a ticket at ₹$p$. Market research says attendance will be $1000 - 10p$ (each extra rupee loses 10 fans). Revenue is price × attendance, $R(p) = p(1000 - 10p) = 1000p - 10p^2$. Which price earns the most? At the best price the revenue curve is flat at the top, so its slope is zero: $R'(p) = 1000 - 20p = 0$ gives $p = 50$, and $R(50) = 50 \times 500 = 25\,000$. Charge less and you leave money on the table; charge more and too many fans stay home. Setting the derivative to zero is the core move of this chapter.

    • $x^*$ is a local maximum if $f(x^*) \ge f(x)$ for all $x$ near $x^*$; a global maximum if that holds for every $x$ in the domain. Same for minimum with $\le$.
    • A critical point is where $f'(x) = 0$ or $f'$ doesn’t exist. Interior local extrema can only happen at critical points.
    • First derivative test: $f'$ changes from + to − ⇒ local max; − to + ⇒ local min; no sign change ⇒ neither.
    • Second derivative test: $f'(x^*) = 0$ and $f''(x^*) \lt 0$ ⇒ local max; $f''(x^*) \gt 0$ ⇒ local min. If $f''(x^*) = 0$ the test says nothing: $x^4$ has a minimum at 0, $x^3$ has neither.
    1. Find the critical points inside $(a, b)$.
    2. Evaluate $f$ at those points and at the endpoints $a$ and $b$.
    3. The largest value is the global max; the smallest is the global min.

    On an open or half-open interval, an extreme value may not be attained at all: the function can approach a value at an excluded endpoint without ever reaching it.

    Try it

    Top: the function on its interval; bottom: its derivative. Critical points are where the derivative crosses zero; the labels say local max or min. The large markers show the global max and min on the interval, which may sit at an endpoint. Load each GATE function and check the options against the picture before reading the solutions.

    GATE DA 2024 · Q50 · MSQ · 2 marks

    Consider the function $f:\R\to\R$ where $\R$ is the set of all real numbers. $$f(x) = \frac{x^4}{4} - \frac{2x^3}{3} - \frac{3x^2}{2} + 1.$$ Which of the following statements is/are TRUE?

    1. $x = 0$ is a local maximum of $f$
    2. $x = 3$ is a local minimum of $f$
    3. $x = -1$ is a local maximum of $f$
    4. $x = 0$ is a local minimum of $f$
    1. $f'(x) = x^3 - 2x^2 - 3x = x(x^2 - 2x - 3) = x(x - 3)(x + 1)$. Critical points: $-1, 0, 3$.

      Always factor out the common $x$ first.

    2. $f''(x) = 3x^2 - 4x - 3$. At $-1$: $3 + 4 - 3 = 4 \gt 0$ (min). At 0: $-3 \lt 0$ (max). At 3: $27 - 12 - 3 = 12 \gt 0$ (min).

      The second derivative test classifies each one.

    3. So 0 is a local max (A ✓, D ✗), 3 is a local min (B ✓), and $-1$ is a local min, not max (C ✗). Answer: A, B.

      Shape check: a quartic with positive leading coefficient goes min–max–min (a W). Official key: A; B.

    Warm-up. Find the critical point of $f(x) = x^2 - 6x + 1$.

    Solve $f'(x) = 0$.

    $f'(x) = 2x - 6 = 0$ gives $x = 3$ (a minimum, since $f'' = 2 \gt 0$).

    Warm-up. Find the largest value of $f(x) = -x^2 + 4x$ on $[0, 3]$.

    Critical point from $f' = 0$, then compare $f$ there with $f(0)$ and $f(3)$.

    $f'(x) = -2x + 4 = 0$ at $x = 2$, with $f(2) = 4$. Endpoints: $f(0) = 0$, $f(3) = 3$. The maximum is 4.

    GATE DA 2025 · Q49 · MSQ · 2 marks

    Consider the function $f(x) = \frac{x^3}{3} + \frac72x^2 + 10x + \frac{133}{2}$, $x\in[-8, 0]$. Which of the following statements is/are correct?

    1. The maximum value of $f$ is attained at $x = -5$
    2. The minimum value of $f$ is attained at $x = -2$
    3. The maximum value of $f$ is $\frac{133}{2}$
    4. The minimum value of the derivative of $f$ is attained at $x = -\frac72$

    $f' = x^2 + 7x + 10 = (x + 2)(x + 5)$. Evaluate $f$ at $-8, -5, -2, 0$. For (D), $f'$ is a parabola: where is its vertex?

    Values: $f(-8) = \frac{239}{6} \approx 39.8$, $f(-5) = \frac{187}{3} \approx 62.3$ (local max), $f(-2) = \frac{347}{6} \approx 57.8$ (local min), $f(0) = \frac{133}{2} = 66.5$. Global max 66.5 at the endpoint 0: (C) ✓, (A) ✗. Global min at the endpoint $-8$: (B) ✗. $f'(x) = x^2 + 7x + 10$ has its minimum at $x = -\frac72$: (D) ✓. Official key: C; D.

    GATE DA 2026 · Q27 · MSQ · 1 mark

    Let $f(x) = x^3 - 3x^2 + 2$ be a function defined on $(-1, 3]$. Which of the following statements is/are correct?

    1. $f(x)$ has exactly two roots in $[-0.9, 0]$.
    2. $f(x)$ has a minimum at 2 only.
    3. $f(x)$ has maximum at 0 only.
    4. $f(x)$ has a root at 1.

    Critical points 0 and 2. Compare $f(0)$ with $f(3)$. What about $x = -1$, where $f = -2$? Is it in the domain?

    $f(1) = 0$: (D) ✓. $f(2) = -2$ is the minimum; $f$ approaches $-2$ as $x \to -1^+$, but $-1$ is excluded, so the minimum is attained only at 2: (B) ✓. $f(0) = 2 = f(3)$, so the maximum is attained at both 0 and 3: (C) ✗. On $[-0.9, 0]$, $f$ rises from $-1.16$ to 2 and crosses zero once (at $1 - \sqrt3 \approx -0.73$): (A) ✗. Official key: B; D.

    GATE DA 2024 · Q15 · MCQ · 1 mark

    For any twice differentiable function $f:\R\to\R$, if at some $x^*\in\R$, $f'(x^*) = 0$ and $f''(x^*) \gt 0$, then the function $f$ necessarily has a ______ at $x = x^*$.

    The second derivative test is a local test.

    A local minimum. It need not be global: $f$ could dip lower elsewhere (think of the W-shaped quartic above). Official key: (A) local minimum.

    Find the global maximum and minimum values of $f(x) = x^3 - 3x$ on $[0, 2]$.

    Critical points: $3x^2 - 3 = 0$. Check $f$ at the critical point(s) inside $[0, 2]$ and at both endpoints.

    Critical point $x = 1$ (and $x = -1$, outside the interval). $f(0) = 0$, $f(1) = -2$, $f(2) = 2$. Max 2 (at the endpoint 2), min $-2$ (at 1).

    Let $f(x) = 3x^4 - 4x^3 - 12x^2 + 5$ on $[-2, 3]$. If $M$ and $m$ are the global maximum and global minimum values of $f$ on this interval, find $M - m$.

    Factor $f'(x)$ completely. Then evaluate $f$ at every critical point inside the interval and at both endpoints.

    $f'(x) = 12x^3 - 12x^2 - 24x = 12x(x - 2)(x + 1)$, so the critical points are $-1, 0, 2$, all inside $[-2, 3]$.

    Values: $f(-2) = 48 + 32 - 48 + 5 = 37$, $f(-1) = 3 + 4 - 12 + 5 = 0$, $f(0) = 5$, $f(2) = 48 - 32 - 48 + 5 = -27$, $f(3) = 243 - 108 - 108 + 5 = 32$.

    The global maximum is $M = 37$, at the endpoint $-2$ (the only interior local maximum, $f(0) = 5$, is far lower). The global minimum is $m = -27$ at $x = 2$.

    $M - m = 37 - (-27) = 64$.

    Let $f(x) = x^2e^{-x}$ for $x\in\R$. Which of the following statements is/are correct?

    1. $f$ has a local minimum at $x = 0$, and it is also the global minimum of $f$ on $\R$.
    2. $f$ attains its global maximum on $\R$ at $x = 2$.
    3. $f$ is convex on the interval $(0, 2)$.
    4. On $[0, \infty)$, the largest value of $f$ is $4e^{-2}$.

    $f'(x) = x(2 - x)e^{-x}$ and $f''(x) = (x^2 - 4x + 2)e^{-x}$. For (B), what happens as $x \to -\infty$? For (C), test one point such as $x = 1$.

    Critical points: $f' = x(2 - x)e^{-x} = 0$ at $x = 0$ and $x = 2$. $f''(0) = 2 \gt 0$ (local min) and $f''(2) = -2e^{-2} \lt 0$ (local max).

    (A) ✓. $f(0) = 0$ and $f(x) = x^2e^{-x} \ge 0$ everywhere, so 0 is the global minimum.

    (B) ✗. As $x \to -\infty$, $x^2e^{-x} \to \infty$, so there is no global maximum on $\R$; $x = 2$ is only a local maximum.

    (C) ✗. $f''(1) = (1 - 4 + 2)e^{-1} = -e^{-1} \lt 0$, so $f$ is concave near 1. (In fact $f'' \lt 0$ between $2 - \sqrt2$ and $2 + \sqrt2$.)

    (D) ✓. On $[0, \infty)$: $f(0) = 0$, $f(2) = 4e^{-2} \approx 0.541$, and $f \to 0$ as $x \to \infty$, so the largest value is $4e^{-2}$. Answer: A; D.

    Let $g(x) = e^x + e^{-x} + kx^2$. The value of $k$ for which $g''(0) = 0$, and the nature of the critical point $x = 0$ for that $k$, are

    1. $k = -1$; local minimum
    2. $k = -1$; local maximum
    3. $k = -1$; neither a maximum nor a minimum
    4. $k = 1$; local minimum

    $g''(x) = e^x + e^{-x} + 2k$. Once $g''(0) = 0$ the second derivative test is silent. Expand $g$ as a Maclaurin series and look at the first term after the constant.

    $g'(x) = e^x - e^{-x} + 2kx$, so $g'(0) = 0$ for every $k$: 0 is always a critical point.

    $g''(0) = 1 + 1 + 2k = 0$ gives $k = -1$.

    With $k = -1$: $e^x + e^{-x} = 2 + x^2 + \frac{x^4}{12} + \cdots$, so $g(x) = 2 + \frac{x^4}{12} + \cdots$. Near 0, $g(x) \gt g(0) = 2$ on both sides: a local minimum. (Equivalently $g^{(3)}(0) = 0$ and $g^{(4)}(0) = 2 \gt 0$: the first non-zero derivative has even order and is positive.)

    (C) is the tempting wrong guess from "$g'' = 0$ means an inflection point". Answer: (A).

    • Factor $f'$ completely; list every critical point inside the interval.
    • Always evaluate the endpoints of a closed interval.
    • Read options carefully for “local” vs “global” and “only”.
    • Concluding a critical point is a minimum just because $f' = 0$.
    • Forgetting that the second derivative test is inconclusive when $f'' = 0$.
    • Claiming an extreme value at an endpoint that isn’t in the domain (open interval).
    1. Interior extrema occur at critical points; classify them by the sign change of f′ or by the sign of f″.
    2. Global extremes on [a, b]: compare f at the critical points and at both endpoints.
    3. f″(x*) > 0 with f′(x*) = 0 gives only a local minimum; on open intervals an extreme may not be attained.

    $f(x) = x^3$ at $x = 0$ has

    a local minimum
    $f$ is negative just left of 0.
    a local maximum
    $f$ is positive just right of 0.
    neither: $f'$ doesn’t change sign
    $f' = 3x^2 \ge 0$ on both sides: an inflection point.

    On $[1, 4]$, $f(x) = (x - 2)^2$ has its global maximum at

    $x = 2$
    That’s the minimum (the vertex).
    $x = 4$
    $f(1) = 1$, $f(4) = 4$: the far endpoint wins.
    $x = 1$
    Compare $f(1) = 1$ with $f(4) = 4$.

    If $f''(x) \gt 0$ for all $x$ (GATE 2025 Q51), which is always true?

    $f$ has a local minimum
    $e^x$ has $f'' \gt 0$ but no minimum at all.
    $f$ has at most one critical point
    $f'$ is strictly increasing, so it can be zero at most once. Official key for that MSQ: B, C, D.
    $f$ is increasing
    $x^2$ has $f'' \gt 0$ and decreases for $x \lt 0$.

    The coefficient of $x^4$ in the Maclaurin series of $f$ is $\frac{1}{8}$. Then $f^{(4)}(0)$ is

    $\frac18$
    Multiply by $4!$.
    3
    $24\times\frac18$.
    $\frac{1}{192}$
    Multiply by 4!, don’t divide.

    $f'(x) = (x - 1)^2(x - 3)$. At $x = 1$, $f$ has

    a local maximum
    Check the sign of $f'$ on both sides of 1.
    a local minimum
    $f' \lt 0$ on both sides of 1 (near it).
    neither
    $(x - 1)^2 \ge 0$ doesn’t change sign, and $(x - 3) \lt 0$ near 1, so $f'$ is negative on both sides.

    $f(x) = |x|$ on $[-1, 2]$. Its global minimum is at

    no point, since f isn’t differentiable at 0
    Critical points include where $f'$ doesn’t exist.
    $x = 0$
    A corner is a critical point, and $f(0) = 0$ is the smallest value.
    $x = -1$
    $f(-1) = 1 \gt f(0)$.

    “Optimization involving a single variable” is the last item in the calculus syllabus, and it’s the bridge to machine learning. This part turns word problems into functions to maximise or minimise (including a one-parameter least-squares fit, asked in 2025), then looks at convexity: the property that makes a minimum easy to find and guarantees it’s the global one.

    You need: Part 2 (critical points and the closed-interval method) and gradients (Refreshers 3.3).

    Optimization: turning a question into a function

    To optimise, write the quantity you care about as a function of one variable, find where its derivative is zero, and check that the point is the max or min you want (and allowed).

    GATE asks this as word problems and, in disguise, as model fitting: 2025 Q34 asked for the least-squares slope of a line through the origin, a one-variable minimisation.

    It’s like choosing a batting tempo: hit too slowly and you don’t score; hit too fast and you get out. Somewhere in between is the best rate, and calculus finds it.

    Where it shows up in GATE DA

    Word problems and one-parameter model fitting.

    2025 Q34 · least-squares fit of y = wxSample Q44 · cost per unit and profit2025 Q49 · extremes on an interval
    Heat: most years, 1–2 marks
    1. Name the variable you control and the objective to maximise or minimise.
    2. Write the objective as a function $f(x)$, using any constraint to eliminate other variables.
    3. Note the allowed range of $x$ (lengths positive, counts non-negative, …).
    4. Solve $f'(x) = 0$; check with $f''$ or the closed-interval method; compare with the endpoints.
    5. Answer the question that was asked (the optimal $x$, or the optimal value?).

    The groundstaff have 20 m of netting to make a rectangular practice area. What dimensions give the largest area?

    1. Variable: the width $x$. Objective: the area. The perimeter is fixed, $2x + 2y = 20$, so the length is $y = 10 - x$.

      Use the constraint to remove the second variable; then there is only one variable to optimise.

    2. Area $A(x) = x(10 - x) = 10x - x^2$, with $0 \le x \le 10$.

      Lengths can’t be negative, which fixes the allowed range.

    3. $A'(x) = 10 - 2x = 0$ gives $x = 5$; $A'' = -2 \lt 0$, so it’s a maximum. Endpoints give area 0. Best: a 5 m × 5 m square, area 25 m².

      Always compare with the endpoints on a closed range.

    Two results worth knowing

    • The number $c$ that minimises $\sum (x_i - c)^2$ is the mean: setting $\frac{d}{dc} = -2\sum(x_i - c) = 0$ gives $c = \bar x$. (The $c$ minimising $\sum|x_i - c|$ is the median.)
    • Fitting $y = wx$ by least squares means minimising $L(w) = \sum (y_i - wx_i)^2$. Then $L'(w) = -2\sum x_i(y_i - wx_i) = 0$ gives $$w^* = \frac{\sum x_iy_i}{\sum x_i^2}.$$ $L$ is a parabola opening upward, so this is the global minimum.
    Try it

    These are the three data points from GATE 2025 Q34. Slide $w$ to rotate the line $y = wx$ about the origin; the vertical segments are the errors, and the lower plot shows the total squared error $L(w)$ as a function of $w$. Find the bottom of the parabola, then compare with the formula in the readout.

    GATE DA 2025 · Q34 · NAT · 1 mark

    Given data $\{(-1, 1), (2, -5), (3, 5)\}$ of the form $(x, y)$, we fit a model $y = wx$ using linear least-squares regression. The optimal value of $w$ is ______ (Round off to three decimal places)

    1. Objective: $L(w) = (1 + w)^2 + (-5 - 2w)^2 + (5 - 3w)^2$, the sum of squared errors $y_i - wx_i$.

      “Least squares” means exactly this function of the single unknown $w$.

    2. Set $L'(w) = 0$, which gives $w^* = \dfrac{\sum x_iy_i}{\sum x_i^2}$. Here $\sum x_iy_i = (-1)(1) + (2)(-5) + (3)(5) = 4$ and $\sum x_i^2 = 1 + 4 + 9 = 14$.

      The formula comes from $L'(w) = -2\sum x_i(y_i - wx_i) = 0$.

    3. $w^* = \frac{4}{14} = \frac27 \approx$ 0.286.

      $L''(w) = 2\sum x_i^2 = 28 \gt 0$, so it’s a minimum. Official range: 0.285 to 0.287.

    Warm-up. Which number $c$ minimises $(2 - c)^2 + (4 - c)^2 + (9 - c)^2$?

    The minimiser of a sum of squared distances is the mean.

    The mean of 2, 4 and 9: $c = 15/3 = 5$.

    Warm-up. Fit $y = wx$ by least squares to the points $(1, 2)$ and $(2, 3)$.

    $w^* = \sum x_iy_i / \sum x_i^2$.

    $\sum xy = 2 + 6 = 8$ and $\sum x^2 = 1 + 4 = 5$, so $w^* = 1.6$.

    A practice net is a rectangle with perimeter 40 m. What’s the largest area it can enclose?

    Sides $x$ and $20 - x$; maximise $A(x) = x(20 - x)$.

    $A' = 20 - 2x = 0$ gives $x = 10$, a square, with area 100 m². ($A'' = -2 \lt 0$: a maximum.)

    Maximise $f(x) = xe^{-x}$ for $x \ge 0$. Give the maximising $x$ and the maximum value (decimal).

    Product rule: $f' = e^{-x}(1 - x)$.

    $f' = 0$ at $x = 1$; $f'$ is positive before and negative after, so it’s a maximum. $f(1) = e^{-1} \approx 0.368$. ($f(0) = 0$ and $f \to 0$ as $x \to \infty$, so it’s global.)

    Which $c$ minimises $(2 - c)^2 + (5 - c)^2 + (8 - c)^2 + (9 - c)^2$?

    The minimiser of a sum of squared deviations is the mean.

    $\bar x = (2 + 5 + 8 + 9)/4 = 6$.

    A factory’s cost per unit when producing $P$ units a day is $C(P) = 230 + 0.1P + \dfrac{9000}{P}$ rupees (the setting of the 2024 sample paper’s Q44). Which production level minimises the cost per unit, and what is that minimum cost?

    $C'(P) = 0.1 - 9000/P^2$.

    $0.1 = 9000/P^2$ gives $P^2 = 90000$, so $P = 300$. $C(300) = 230 + 30 + 30 = 290$. ($C'' = 18000/P^3 \gt 0$: a minimum.)

    The Kalinga Kernels sell $N(p) = 2000e^{-p/400}$ tickets for a match when the price is $p$ rupees. Each ticket costs the franchise ₹100 to service, so the profit is $P(p) = (p - 100)N(p)$. Find the price that maximises profit, and the maximum profit in thousands of rupees (round off to one decimal place).

    Differentiate with the product rule and factor out $e^{-p/400}$, which is never zero. Then check the sign of $P'$ on each side of the critical point to confirm it is a global maximum.

    $P'(p) = 2000e^{-p/400} - \frac{2000(p - 100)}{400}e^{-p/400} = 2000e^{-p/400}\left[1 - \frac{p - 100}{400}\right]$.

    Setting the bracket to zero: $p - 100 = 400$, so $p = 500$.

    The bracket is positive for $p \lt 500$ and negative for $p \gt 500$, so $P$ rises and then falls: a global maximum.

    $P(500) = 400\times2000\times e^{-5/4} = 800000e^{-1.25} \approx 229204$ rupees, about ₹229.2 thousand. (Maximising revenue $pN(p)$ instead would give $p = 400$: the service cost pushes the best price up by exactly ₹100.)

    The shortest distance from the point $(0, 3)$ to the parabola $y = x^2$ is

    1. $3$
    2. $\frac{\sqrt{11}}{2}$
    3. $\frac{11}{4}$
    4. $\sqrt{\frac52}$

    Minimise the squared distance $D(x) = x^2 + (x^2 - 3)^2$ from a point $(x, x^2)$ on the parabola; it has the same minimiser as the distance. Check which critical point is a minimum.

    $D(x) = x^2 + (x^2 - 3)^2 = x^4 - 5x^2 + 9$, so $D'(x) = 4x^3 - 10x = 2x(2x^2 - 5)$.

    Critical points: $x = 0$ and $x = \pm\sqrt{5/2}$. $D''(x) = 12x^2 - 10$: $D''(0) = -10 \lt 0$, so $x = 0$ is a local maximum of $D$; $D''(\pm\sqrt{5/2}) = 20 \gt 0$, minima.

    $D\left(\sqrt{5/2}\right) = \frac{25}{4} - \frac{25}{2} + 9 = \frac{11}{4}$, so the shortest distance is $\sqrt{11/4} = \frac{\sqrt{11}}{2} \approx 1.658$.

    (A) is the distance to the vertex, the critical point that is a maximum of $D$; (C) forgets the square root; (D) reports the $x$-coordinate. Answer: (B).

    Three match scores are $2, 4, 9$. A “shrunk” summary $c$ is chosen to minimise $G(c) = (2 - c)^2 + (4 - c)^2 + (9 - c)^2 + 3c^2$. Which of the following statements is/are correct?

    1. The minimiser is $c = 2.5$.
    2. The minimiser is the mean of the scores, $c = 5$.
    3. The minimum value of $G$ is $63.5$.
    4. If the penalty $3c^2$ is replaced by $6c^2$, the minimiser moves closer to 0.

    $G'(c) = -2\sum(x_i - c) + 6c$. Solve $G'(c) = 0$ and check $G'' \gt 0$. For (D), redo it with a general weight $\lambda$ in place of 3.

    $G'(c) = -2(15 - 3c) + 6c = 12c - 30$, which is zero at $c = 2.5$; $G'' = 12 \gt 0$, so it is the minimum. (A) ✓, (B) ✗: the mean (5) minimises the sum of squares only without the penalty.

    (C) ✓. $G(2.5) = 0.25 + 2.25 + 42.25 + 3(6.25) = 44.75 + 18.75 = 63.5$.

    (D) ✓. With weight $\lambda$: $-2(15 - 3c) + 2\lambda c = 0$ gives $c = \frac{15}{3 + \lambda}$. For $\lambda = 3$ that’s $2.5$; for $\lambda = 6$ it’s $\frac53 \approx 1.67$, closer to 0. (This is ridge-style shrinkage in one variable.) Answer: A; C; D.

    • Write the objective as a function of one variable before differentiating.
    • Respect the domain: lengths, prices and counts usually can’t be negative.
    • Check that you’ve answered the question: the optimal input or the optimal value.
    • Forgetting to check that a critical point is a max (not a min) when maximising.
    • Ignoring endpoints when the domain is bounded.
    • Fitting $y = wx$ with the formula for a line with an intercept; they differ.
    1. Optimisation recipe: variable, objective, domain, f′ = 0, check (f″ or endpoints), answer what was asked.
    2. Σ(xᵢ − c)² is minimised at the mean; Σ|xᵢ − c| at the median.
    3. Least squares for y = wx: w* = Σxᵢyᵢ / Σxᵢ², the bottom of an upward parabola in w.

    Among rectangles with a fixed perimeter, the largest area belongs to

    a very long, thin rectangle
    Thin rectangles have tiny areas.
    a square
    $x(P/2 - x)$ peaks at $x = P/4$.
    any rectangle; the area is fixed
    The perimeter is fixed, not the area.

    For data $(1, 2), (2, 4), (3, 6)$, the least-squares $w$ in $y = wx$ is

    4
    Compute $\sum xy / \sum x^2 = 28/14$.
    2
    The points lie exactly on $y = 2x$.
    6
    That’s a $y$ value, not the slope.

    You find $f'(x^*) = 0$ while maximising $f$ on $[0, 10]$. What else must you check?

    Nothing
    It might be a minimum, and the max might be at an endpoint.
    That it’s a maximum, and compare with f(0) and f(10)
    The closed-interval method.
    Only that $f''(x^*) \gt 0$
    $f'' \gt 0$ means a minimum, the opposite of what you want.

    Convexity: when a minimum is guaranteed to be the minimum

    A convex function curves upward everywhere ($f'' \ge 0$), so any local minimum is automatically the global minimum, and slope-following methods can’t get stuck in the wrong valley.

    GATE 2025 Q51 tested exactly what $f'' \gt 0$ guarantees. In ML, convex losses (squared error, logistic loss) are why linear and logistic regression always train to the same best answer.

    It’s like a bowl: drop a ball anywhere inside and it rolls to the single lowest point. A non-convex landscape is an egg tray, where the ball can settle in any one of many dips.

    Where it shows up in GATE DA

    Statements about functions with f″ > 0, global vs local minima, and the shape of ML losses.

    2025 Q51 · consequences of f″ > 0Sample Q34, Q35 · existence of global minima2026 Q37, Q55 · ridge regression loss
    Heat: occasional, 1–2 marks

    Why convexity? Gradient descent walks downhill until the slope is zero. On a bumpy curve it can stop in a small dip and never find the deepest valley. On a curve that bends upward everywhere, like a bowl, there is only one valley, so wherever the slope is zero is the minimum. That is what convex means, and why machine learning prefers convex losses.

    The chord picture. For $f(x) = x^2$, join the points at $x = 0$ and $x = 2$ (heights 0 and 4) with a straight line. Halfway along, the line is at height 2, while the curve is at $f(1) = 1$, below it. For a convex function the curve always lies on or below such chords.

    $f$ is convex if every chord lies on or above the graph: $f(tx + (1-t)y) \le tf(x) + (1-t)f(y)$ for $t\in[0, 1]$. For twice-differentiable $f$: convex ⇔ $f''(x) \ge 0$ everywhere. If $f'' \gt 0$ everywhere it’s strictly convex. Examples: $x^2$, $e^x$, $|x|$, $-\ln x$ (for $x \gt 0$). Sums of convex functions are convex.

    • Any local minimum of a convex function is a global minimum.
    • If $f'' \gt 0$ everywhere, then $f'$ is strictly increasing, so $f' = 0$ at at most one point: at most one minimiser, and no maxima.
    • Convexity doesn’t guarantee a minimum exists: $e^x$ is convex but keeps decreasing to the left, never reaching a lowest value.

    Gradient descent (1-D): $x \leftarrow x - \eta f'(x)$. Newton’s method: $x \leftarrow x - \dfrac{f'(x)}{f''(x)}$, which jumps to the minimum of the local quadratic (second-order Taylor) approximation. On a quadratic it lands exactly on the minimum in one step.

    Try it

    Drag the two chord endpoints along the curve. For a convex function the chord always stays above the graph; find a place where it dips below for the non-convex ones. Then press the step buttons to run gradient descent or Newton’s method from the start point (the black dot): on $x^4 - 3x^2$, the valley you end up in depends on where you start.

    GATE DA 2025 · Q51 · MSQ · 2 marks

    Let $f:\R\to\R$ be a twice-differentiable function and suppose its second derivative satisfies $f''(x) \gt 0$ for all $x\in\R$. Which of the following statements is/are ALWAYS correct?

    1. $f$ has a local minima
    2. There does not exist $x$ and $y$, $x \ne y$, such that $f'(x) = f'(y) = 0$
    3. $f$ has at most one global minimum
    4. $f$ has at most one local minimum
    1. (A): $f(x) = e^x$ has $f'' \gt 0$ but $f' = e^x$ is never 0, so there’s no minimum at all. ✗

      “ALWAYS” statements fall to a single counterexample.

    2. (B): $f'' \gt 0$ means $f'$ is strictly increasing, so it can take the value 0 at most once. ✓

      A strictly increasing function never repeats a value.

    3. (C) and (D): local minima need $f' = 0$, which happens at most once, so there’s at most one local minimum, and hence at most one global minimum. ✓ Answer: B, C, D.

      “At most one” allows zero, which is why (C) and (D) survive the $e^x$ counterexample. Official key: B; C; D.

    Warm-up. Is $f(x) = e^{-x}$ convex?

    Check the sign of $f''(x)$.

    $f''(x) = e^{-x} \gt 0$ everywhere, so yes, strictly convex.

    Warm-up. Take one Newton step $x \leftarrow x - f'(x)/f''(x)$ on $f(x) = x^2 - 4x$, starting from $x = 0$.

    $f'(x) = 2x - 4$ and $f''(x) = 2$.

    $0 - (-4)/2 = 2$, exactly the minimum, as Newton’s method always does on a quadratic.

    Is $f(x) = x^4 - 3x^2$ convex on all of $\R$?

    Check the sign of $f''(x) = 12x^2 - 6$ near 0.

    No: $f''(0) = -6 \lt 0$. It’s concave for $|x| \lt 1/\sqrt2$ and has two separate minima (at $x = \pm\sqrt{1.5}$), the egg-tray picture.

    Minimise $f(x) = x^2 - 4x + 5$ starting from $x_0 = 0$. Where are you after one Newton step? After one gradient-descent step with $\eta = 0.1$?

    $f'(0) = -4$, $f'' = 2$.

    Newton: $0 - (-4)/2 = 2$, exactly the minimum (it’s a quadratic). Gradient descent: $0 - 0.1\times(-4) = 0.4$, a small step towards 2.

    Which functions are convex on their domains? (Select all that apply.)

    (A) $e^x$   (B) $|x|$   (C) $x^3$ on $\R$   (D) $-\ln x$ for $x \gt 0$

    Check $f''$; for $|x|$, use the chord picture.

    (A) $e^x \gt 0$ ✓. (B) every chord of the V lies above it ✓. (C) $f'' = 6x \lt 0$ for $x \lt 0$ ✗. (D) $f'' = 1/x^2 \gt 0$ ✓.

    Let $f(x) = e^{2x} - 4x$ for $x\in\R$. Which of the following statements is/are correct?

    1. $f$ is convex on $\R$.
    2. $f$ has exactly one critical point, $x = \frac12\ln2$, and it is the global minimiser.
    3. The minimum value of $f$ is $4 - 4\ln2$.
    4. $f(x) + |x|$ is convex on $\R$.

    Compute $f''$. Solve $f'(x) = 2e^{2x} - 4 = 0$ carefully (mind the chain-rule factor 2). A sum of convex functions is convex.

    (A) ✓. $f''(x) = 4e^{2x} \gt 0$ for all $x$.

    (B) ✓. $f'(x) = 2e^{2x} - 4 = 0$ gives $e^{2x} = 2$, so $x = \frac12\ln2$, the only critical point. For a convex function a critical point is a global minimiser.

    (C) ✗. $f\left(\frac12\ln2\right) = e^{\ln 2} - 4\cdot\frac12\ln 2 = 2 - 2\ln2 \approx 0.614$. The value $4 - 4\ln2$ is $f(\ln 2)$, what you get by solving $e^{2x} = 4$ after dropping the chain-rule factor.

    (D) ✓. $|x|$ is convex (every chord of the V lies above it), and a sum of convex functions is convex. Answer: A; B; D.

    Newton’s method $x_{k+1} = x_k - \dfrac{f'(x_k)}{f''(x_k)}$ is used to minimise the convex function $f(x) = e^x - 2x$, starting from $x_0 = 0$. Find $x_2$ (round off to three decimal places).

    Write down $f'$ and $f''$, then simplify the ratio $f'/f''$ before you start iterating. Keep $x_2$ exact until the final rounding.

    $f'(x) = e^x - 2$, $f''(x) = e^x \gt 0$ (so $f$ is convex and Newton’s step is well defined). The update simplifies to $x_{k+1} = x_k - 1 + 2e^{-x_k}$.

    $x_1 = 0 - 1 + 2 = 1$.

    $x_2 = 1 - 1 + 2e^{-1} = \frac{2}{e} \approx 0.736$.

    The true minimiser solves $e^x = 2$, that is $x^* = \ln 2 \approx 0.693$; two steps already land within 0.05 of it.

    Let $f(x) = x^4 + ax^3 + 6x^2 - 24x$. Find the largest value of $a$ for which $f$ is convex on all of $\R$. For that $a$, find the point $x^*$ where $f$ attains its global minimum (round off to three decimal places).

    $f''(x) = 12x^2 + 6ax + 12$ is a quadratic in $x$; it is $\ge 0$ for every $x$ when its discriminant is $\le 0$. For the second part, write $f'(x)$ as $4\left[(x + 1)^3 - c\right]$ for a suitable $c$.

    $f''(x) = 12x^2 + 6ax + 12$. This upward parabola stays $\ge 0$ for all $x$ exactly when its discriminant is $\le 0$: $36a^2 - 4\cdot12\cdot12 = 36a^2 - 576 \le 0$, that is $|a| \le 4$. The largest value is $a = 4$.

    With $a = 4$: $f'(x) = 4x^3 + 12x^2 + 12x - 24 = 4\left[(x + 1)^3 - 7\right]$.

    The only critical point is $x^* = \sqrt[3]{7} - 1 \approx 0.913$. Because $f$ is convex, this critical point is the global minimiser.

    So $a = 4$ and $x^* \approx 0.913$.

    • Check convexity with $f''$ (or the chord picture for non-smooth functions).
    • Use counterexamples like $e^x$ for “always has a minimum” claims.
    • Remember: for convex functions, local = global.
    • Assuming convex implies a minimum exists.
    • Calling $x^3$ convex because it’s “increasing”; increasing and convex are different properties.
    • Thinking Newton’s method always beats gradient descent; it needs $f''$ and can misbehave where $f'' \le 0$.
    1. Convex ⇔ chords lie above the graph ⇔ f″ ≥ 0; sums of convex functions are convex.
    2. For convex f, any local minimum is global; with f″ > 0 there’s at most one critical point, but a minimum may not exist (eˣ).
    3. Gradient descent: x ← x − ηf′(x). Newton: x ← x − f′/f″, exact in one step for quadratics.

    2024 sample paper Q35: (P) “A smooth twice differentiable function can have a global minimum.” (Q) “All smooth twice differentiable functions have a global minimum.” Which is right?

    Both P and Q are true
    Think of $f(x) = x$ or $e^x$.
    P is true and Q is false
    $x^2$ has a global minimum; $x$ has none. (Sample paper, no official key.)
    P is false and Q is true
    $x^2$ is smooth and has a global minimum at 0.
    Both are false
    P only claims possibility.

    The squared-error loss $L(w) = \sum (y_i - wx_i)^2$ is convex in $w$ because

    it’s always positive
    Positivity isn’t convexity; check $L''$.
    $L''(w) = 2\sum x_i^2 \ge 0$
    So any critical point is the global minimum.
    it has one parameter
    Plenty of one-parameter functions aren’t convex.

    Gradient descent on a non-convex function

    always finds the global minimum
    It can settle in whichever valley it starts in.
    may converge to a local minimum that isn’t global
    This is why convexity is so valued in ML.
    never converges
    With a sensible step it usually converges, just not necessarily to the best point.

    $\displaystyle\lim_{x\to0}\frac{\tan x}{x}$ is

    0
    Both go to 0 at the same rate.
    1
    $\frac{\sin x}{x}\cdot\frac{1}{\cos x} \to 1\cdot1$.
    ∞
    $\tan x \approx x$ near 0.

    Which is differentiable at 0?

    $|x|$
    A corner at 0.
    $\max(0, x)$
    A corner at 0.
    $x|x|$
    Both one-sided slopes are 0.

    The $x^2$ coefficient in the Maclaurin series of $\cos 2x$ is

    $-\frac12$
    Substitute $2x$: $-\frac{(2x)^2}{2}$.
    $-2$
    $-\frac{4x^2}{2} = -2x^2$.
    $-4$
    Don’t forget the $2!$ in the denominator.

    $f(x) = x^2 e^{-x}$ for $x \ge 0$ has a local maximum at

    $x = 0$
    $f(0) = 0$ is the minimum.
    $x = 2$
    $f' = xe^{-x}(2 - x)$ changes from + to − at 2.
    $x = 1$
    That’s the maximiser of $xe^{-x}$.

    Newton’s method on $f(x) = (x - 3)^2$ from any start reaches the minimum in

    many steps
    For a quadratic, Newton’s local model is exact.
    one step
    $x - \frac{2(x-3)}{2} = 3$.
    never
    It’s the ideal case for Newton.
    Every module complete

    Every question, answered right.

    You worked through every quiz and every practice problem in GATE Data Science & AI. That took real effort, and the understanding is yours to keep. Add your name to make a certificate.