If \( f(x)=\int e^{x}(\tan x+\tan^{2}x)\,dx \) and \( f(0)=0 \), then \( f\left(\displaystyle\frac{\pi}{4}\right) \) equals:
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → 1
Since \( \tan^{2}x=\sec^{2}x-1 \), the integrand splits into a standard form and a simple part.
\( \displaystyle e^{x}(\tan x+\tan^{2}x)=e^{x}(\tan x+\sec^{2}x)-e^{x} \)
Using \( \int e^{x}\left[g(x)+g'(x)\right]dx=e^{x}g(x) \) with \( g(x)=\tan x \),
\( \displaystyle f(x)=e^{x}\tan x-e^{x}+C \)
From f(0) = 0,
\( \displaystyle 0=0-1+C \)
\( \displaystyle \Rightarrow\ C=1 \)
Then
\( \displaystyle f\left(\frac{\pi}{4}\right)=e^{\pi/4}-e^{\pi/4}+1 \)
\( \displaystyle =1 \)