---
title: "Integro-Differential Equation Solved via Leibniz Differentiation"
organization: "NityaDhi Digital Mathematics Lab (Asa Edtech Private Limited)"
url: "https://www.nityadhi.com/problems/hard-c12-w1-20-integro-differential-leibniz-ode"
board: "JEE Foundation"
grade: "Class 12"
published_at: "2026-11-30T15:00:00+05:30"
---

# Integro-Differential Equation Solved via Leibniz Differentiation

A differentiable function $f: (0, \infty) \to \mathbb{R}$ satisfies the integral equation
$$\int_1^x f(t)\,dt = x^2 f(x) - x + \ln x - 1 \qquad \forall\, x > 0.$$
Find the exact value of $f(2)$.

## Textbook Solution

**Step 1: Find the initial value $f(1)$**  
Setting $x = 1$ in the given equation:
$$0 = 1^2 f(1) - 1 + \ln 1 - 1 \implies f(1) = 2.$$

**Step 2: Differentiate using the Fundamental Theorem of Calculus**  
Differentiating both sides with respect to $x$:
$$f(x) = x^2 f'(x) + 2x f(x) - 1 + \frac{1}{x}.$$
Rearranging into standard linear ODE form:
$$f'(x) + \left(\frac{2}{x} - \frac{1}{x^2}\right)f(x) = \frac{x - 1}{x^3}.$$

**Step 3: Compute the integrating factor and solve**  
$$\text{I.F.} = \exp\left(\int \left(\frac{2}{x} - \frac{1}{x^2}\right)\,dx\right) = \exp\left(2\ln x + \frac{1}{x}\right) = x^2 e^{1/x}.$$
Multiplying through by $x^2 e^{1/x}$:
$$\frac{d}{dx}\left(x^2 e^{1/x} f(x)\right) = \left(1 - \frac{1}{x}\right)e^{1/x}.$$
Notice that $\frac{d}{dx}\left(x e^{1/x}\right) = e^{1/x} + x e^{1/x}\left(-\frac{1}{x^2}\right) = \left(1 - \frac{1}{x}\right)e^{1/x}$!  
Therefore:
$$x^2 e^{1/x} f(x) = x e^{1/x} + C.$$

**Step 4: Apply $f(1) = 2$ and find $f(2)$**  
At $x = 1$: $1 \cdot e \cdot 2 = 1 \cdot e + C \implies C = e$.  
Thus $f(x) = \frac{1}{x} + \frac{e^{1 - 1/x}}{x^2}$, and at $x = 2$:
$$f(2) = \frac{1}{2} + \frac{\sqrt{e}}{4} = \frac{2 + \sqrt{e}}{4}.$$

**Final Answer:** $\frac{2 + \sqrt{e}}{4}$.

## Vedic Shortcut

**NityaDhi Reverse-Product-Rule Spotter:**  
When integrating $\left(1 - \frac{1}{x}\right)e^{1/x}\,dx$, never integrate by parts blindly! Whenever an integrand has the form $\left(g'(x) - \frac{g(x)}{x^2}\right)e^{1/x}$, it is immediately the derivative of $g(x)e^{1/x}$. Here $g(x) = x$ works instantly!

## Common Mistakes

- Forgetting to substitute $x = 1$ into the *original* integral equation to extract the boundary condition $f(1) = 2$.  
- Attempting to integrate $\int e^{1/x}\,dx$ and $\int \frac{e^{1/x}}{x}\,dx$ separately (neither is elementary!) instead of combining them via product rule.