Consider the following statements, where C is a constant of integration and \(x \gt 0\) in (A) and (D):
(A) \(\int e^x\left(\displaystyle\frac{1}{x}+\frac{1}{x^2}\right)dx = \frac{e^x}{x}+C\)
(B) \(\int e^x\left(\tan x+\sec^2x\right)dx = e^x\tan x+C\)
(C) \(\int e^x\left(\sin x-\cos x\right)dx = e^x\sin x+C\)
(D) \(\int e^x\left(\log x+\displaystyle\frac{1}{x}\right)dx = e^x\log x+C\)
Choose the correct answer from the options given below:
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → (B) and (D) only
The result \(\int e^x\left(f(x)+f'(x)\right)dx = e^xf(x)+C\) holds only when the second term is the derivative of the first.
\( \displaystyle \frac{d}{dx}\left(\frac{1}{x}\right) = -\frac{1}{x^2},\qquad \frac{d}{dx}\tan x = \sec^2x \)
\( \displaystyle \frac{d}{dx}(-\cos x) = \sin x,\qquad \frac{d}{dx}\log x = \frac{1}{x} \)
So \(e^x\left(\sin x-\cos x\right) = e^x\left(f+f'\right)\) with \(f = -\cos x\), giving \(-e^x\cos x\).
So (B) and (D) are of the form \(e^x(f+f')\) with \(f = \tan x\) and \(f = \log x\); in (A) the sign of \(\frac{1}{x^2}\) is wrong, and (C) gives \(-e^x\cos x+C\).
Checking the statements
(A) \(\int e^x\left(\frac{1}{x}+\frac{1}{x^2}\right)dx = \frac{e^x}{x}+C\) — Incorrect. \(\frac{d}{dx}\frac{e^x}{x} = e^x\left(\frac{1}{x}-\frac{1}{x^2}\right)\).
(B) \(\int e^x\left(\tan x+\sec^2x\right)dx = e^x\tan x+C\) — Correct. Here \(f = \tan x\) and \(f' = \sec^2x\).
(C) \(\int e^x\left(\sin x-\cos x\right)dx = e^x\sin x+C\) — Incorrect. \(\frac{d}{dx}\left(e^x\sin x\right) = e^x\left(\sin x+\cos x\right)\); the answer is \(-e^x\cos x+C\).
(D) \(\int e^x\left(\log x+\frac{1}{x}\right)dx = e^x\log x+C\) — Correct. Here \(f = \log x\) and \(f' = \frac{1}{x}\).