---
title: "Counting Real Roots of a Transcendental Equation via Calculus"
organization: "NityaDhi Digital Mathematics Lab (Asa Edtech Private Limited)"
url: "https://www.nityadhi.com/problems/hard-c12-w1-10-monotonicity-number-of-real-roots"
board: "JEE Foundation"
grade: "Class 12"
published_at: "2026-11-26T15:00:00+05:30"
---

# Counting Real Roots of a Transcendental Equation via Calculus

Find the exact number of real solutions of the equation
$$e^x - x^2 - 2x - 1 = 0.$$

## Textbook Solution

**Step 1: Define $f(x)$ and analyze its derivatives**  
Let $f(x) = e^x - (x + 1)^2$. Then:
$$f'(x) = e^x - 2(x + 1), \qquad f''(x) = e^x - 2.$$

**Step 2: Locate critical points**  
$f''(x) = 0 \implies x = \ln 2$.  
- For $x < \ln 2$, $f''(x) < 0$, so $f'(x)$ is strictly decreasing on $(-\infty, \ln 2]$.  
- For $x > \ln 2$, $f''(x) > 0$, so $f'(x)$ is strictly increasing on $[\ln 2, \infty)$.  
Evaluate $f'$ at key points:
$$\lim_{x\to -\infty} f'(x) = +\infty, \quad f'(\ln 2) = 2 - 2(\ln 2 + 1) = -2\ln 2 < 0, \quad \lim_{x\to \infty} f'(x) = +\infty.$$
Thus $f'(x) = 0$ has exactly two roots: $c_1 \in (-\infty, \ln 2)$ and $c_2 \in (\ln 2, \infty)$.  
Note $f'(0) = 1 - 2 = -1 < 0$, so $c_1 < 0 < \ln 2 < c_2$.

**Step 3: Analyze sign changes of $f(x)$**  
- On $(-\infty, c_1)$: $f$ increases strictly from $-\infty$ to $f(c_1) > f(0) = 0$, yielding **1 root** (in $(-2, -1)$, since $f(-2)=e^{-2}-1<0$ and $f(-1)=e^{-1}>0$).  
- On $(c_1, c_2)$: $f$ decreases strictly from $f(c_1) > 0$ through $f(0) = 0$ down to $f(c_2) < f(0) = 0$, yielding **1 root** ($x = 0$).  
- On $(c_2, \infty)$: $f$ increases strictly from $f(c_2) < 0$ to $+\infty$, yielding **1 root** (in $(2, 3)$, since $f(2)=e^2-9<0$ and $f(3)=e^3-16>0$).

**Final Answer:** $3$ real solutions.

## Vedic Shortcut

**NityaDhi Rolle-Bound + End-Behavior Check:**  
Since $f''(x) = e^x - 2$ has **1** zero, Rolle's theorem guarantees $f'(x)$ has at most **2** zeros, so $f(x)$ has at most **3** real roots. Testing four easy points immediately traps 3 sign changes: $f(-2) < 0$, $f(-1) > 0$, $f(0) = 0$ with $f'(0) = -1 < 0$ (so $f(0^+) < 0$), and $f(3) > 0$. By IVT, there are at least 3 roots — hence **exactly 3**!

## Common Mistakes

- Spotting $x = 0$ and $x \in (2, 3)$ but missing the negative root in $(-2, -1)$ because $e^x \to 0$ faster than $-(x+1)^2 \to -\infty$ was not checked.  
- Assuming $x = 0$ is a local extremum without checking $f'(0) = -1 \neq 0$.