Integral of ex[f(x)+f′(x)]e^x[f(x) + f'(x)]

The shortcut formula

Whenever an integrand has the exact shape exe^x times [f(x)+f′(x)][f(x) + f'(x)], it integrates instantly, no substitution or parts needed:

∫ex[f(x)+f′(x)]dx=exf(x)+C\int e^x\left[f(x) + f'(x)\right]dx = e^x f(x) + C

This follows directly from the product rule run in reverse: ddx[exf(x)]=exf(x)+exf′(x)=ex[f(x)+f′(x)]\frac{d}{dx}\left[e^xf(x)\right] = e^xf(x) + e^xf'(x) = e^x[f(x)+f'(x)].

Why it works

Differentiate exf(x)e^xf(x) with the product rule:

ddx[exf(x)]=ex⋅f(x)+ex⋅f′(x)=ex[f(x)+f′(x)]\dfrac{d}{dx}\left[e^xf(x)\right] = e^x\cdot f(x) + e^x\cdot f'(x) = e^x\left[f(x) + f'(x)\right]

So exf(x)e^xf(x) is an antiderivative of ex[f(x)+f′(x)]e^x[f(x) + f'(x)], and integrating just reverses that step. The whole skill is spotting ff: find a term in the bracket whose derivative is the other term.

Spotting f(x) in some common brackets
Bracketf(x)f(x)Integral
sin⁡x+cos⁡x\sin x + \cos xsin⁡x\sin xexsin⁡x+Ce^x\sin x + C
tan⁡x+sec⁡2x\tan x + \sec^2 xtan⁡x\tan xextan⁡x+Ce^x\tan x + C
ln⁡x+1x\ln x + \dfrac{1}{x}ln⁡x\ln xexln⁡x+Ce^x\ln x + C
x2+2xx^2 + 2xx2x^2x2ex+Cx^2e^x + C
1x−1x2\dfrac{1}{x} - \dfrac{1}{x^2}1x\dfrac{1}{x}exx+C\dfrac{e^x}{x} + C

Worked example

Find ∫ex(1x−1x2)dx\displaystyle\int e^x\left(\dfrac{1}{x} - \dfrac{1}{x^2}\right)dx.

Solution: Let f(x)=1xf(x) = \dfrac{1}{x}. Then f′(x)=−1x2f'(x) = -\dfrac{1}{x^2}, exactly matching the second term. So the integrand is ex[f(x)+f′(x)]e^x[f(x)+f'(x)], and:

∫ex(1x−1x2)dx=exf(x)+C=exx+C\int e^x\left(\dfrac{1}{x} - \dfrac{1}{x^2}\right)dx = e^xf(x) + C = \dfrac{e^x}{x} + C

Worked example: f has to be uncovered

Find ∫exx+1(x+2)2 dx\displaystyle\int e^x\dfrac{x + 1}{(x + 2)^2}\,dx.

Solution: The bracket doesn't look like f+f′f + f' yet. Write the numerator as (x+2)−1(x + 2) - 1 and split:

x+1(x+2)2=x+2(x+2)2−1(x+2)2=1x+2−1(x+2)2\dfrac{x + 1}{(x + 2)^2} = \dfrac{x + 2}{(x + 2)^2} - \dfrac{1}{(x + 2)^2} = \dfrac{1}{x + 2} - \dfrac{1}{(x + 2)^2}

With f(x)=1x+2f(x) = \dfrac{1}{x + 2}, f′(x)=−1(x+2)2f'(x) = -\dfrac{1}{(x + 2)^2}, which is exactly the second term:

∫ex[1x+2−1(x+2)2]dx=exx+2+C\int e^x\left[\dfrac{1}{x + 2} - \dfrac{1}{(x + 2)^2}\right]dx = \dfrac{e^x}{x + 2} + C

Worked example: a definite integral

Evaluate ∫01ex(x+1) dx\displaystyle\int_0^1 e^x(x+1)\,dx.

Solution: With f(x)=xf(x) = x, f′(x)=1f'(x) = 1, so the integrand is ex[f(x)+f′(x)]e^x[f(x)+f'(x)] and the antiderivative is xexxe^x:

∫01ex(x+1) dx=[xex]01=e−0=e≈2.718\int_0^1 e^x(x+1)\,dx = \left[xe^x\right]_0^1 = e - 0 = e \approx 2.718

Common mistakes

  • Not checking that the second term is exactly f′f'. ex(sin⁡x−cos⁡x)e^x(\sin x - \cos x) is not this pattern with f=sin⁡xf = \sin x, since f′=+cos⁡xf' = +\cos x. (It is the pattern with f=−cos⁡xf = -\cos x, giving −excos⁡x+C-e^x\cos x + C.)
  • Using it with e2xe^{2x}. The general version is ∫ekx[kf(x)+f′(x)]dx=ekxf(x)+C\int e^{kx}\left[kf(x) + f'(x)\right]dx = e^{kx}f(x) + C, so with e2xe^{2x} the bracket must be 2f+f′2f + f'.

Where this comes up in exams

This pattern comes from integration by parts. JEE Main 2026 lists integration by substitution, by parts and by partial fractions, and the 2025-26 CBSE Class XII syllabus lists integration of a variety of functions by substitution, by partial fractions and by parts.

Checked against JEE (Main) 2026 syllabus (NTA) and CBSE Mathematics curriculum, Classes XI-XII (2025-26). Syllabi can change from year to year, so confirm with the latest official notification for your exam.

Continue learning

This trick is really integration by parts in disguise: recognizing the pattern upfront just skips having to run the parts formula.