The GATE Grind

GATE 2026 CS (CS1) – Question 32

Engineering Mathematics · Calculus · 1 mark · Numerical answer

Consider the function $f:\mathbb{R} \to \mathbb{R}$ defined as follows:
$$f(x) = \begin{cases} c_1 e^x - c_2 \log_e\left(\frac{1}{x}\right), & \text{if } x > 0 \\ 3, & \text{otherwise} \end{cases}$$
where $c_1, c_2 \in \mathbb{R}$. If $f$ is continuous at $x = 0$, then $c_1 + c_2 = $ _________. (answer in integer)

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 3

Explanation

For $f$ to be continuous at $x = 0$, the following condition must hold:
$$\lim_{x \to 0^+} f(x) = f(0) = 3$$

Evaluate the right-hand limit as $x \to 0^+$:
$$\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} \left( c_1 e^x - c_2 \log_e\left(\frac{1}{x}\right) \right)$$
As $x \to 0^+$:
- $e^x \to e^0 = 1$
- $\frac{1}{x} \to +\infty \implies \log_e\left(\frac{1}{x}\right) \to +\infty$

For the limit to exist and be a finite real number (specifically 3), the coefficient of the unbounded term must be zero:
$$c_2 = 0$$
With $c_2 = 0$, the expression simplifies to:
$$\lim_{x \to 0^+} c_1 e^x = c_1 \cdot 1 = c_1$$
Equating this to $f(0) = 3$ gives:
$$c_1 = 3$$

Therefore:
$$c_1 + c_2 = 3 + 0 = 3$$

The correct answer is 3.