Q.Find ∫xcosxdx
Concept understanding — Integration by Parts
Integration by Parts
The idea: reverse the product rule
Some integrands are a product of two very different functions — xex, xcosx, logx, xsin−1x — where substitution gets you nowhere. Integration by parts is the tool for these. It comes straight from reversing the product rule for differentiation.
Starting from dxd(uv)=uv′+u′v and integrating both sides gives the working formula:
∫udxdvdx=uv−∫vdxdudx.
In words: integral of (first × derivative-of-second) = first × integral-of-second − integral of (derivative-of-first × integral-of-second).
Choosing u: the ILATE rule
The whole game is picking which factor is u (to differentiate) and which is dv (to integrate). Pick u by ILATE — the first type that appears:
- Inverse trig (sin−1x), Logarithmic (logx), Algebraic (x2), Trigonometric (sinx), Exponential (ex).
Whatever comes first in ILATE becomes u; the rest is dv. This makes the new integral ∫vdu simpler than the one you started with.
Worked idea
For ∫xexdx: algebraic before exponential, so u=x, dv=exdx. Then du=dx, v=ex:
∫xexdx=xex−∫exdx=xex−ex+C=ex(x−1)+C.
A single log or a single inverse-trig function (∫logxdx, ∫sin−1xdx) is still "by parts" — take the other factor as 1. And for the special form ∫ex(f(x)+f′(x))dx, the answer is simply exf(x)+C.
If applying the formula gives you back a multiple of the original integral (as with ∫exsinxdx), don't panic — solve for the integral algebraically.
Integration by Parts is one of the most tested methods in the NCERT Class 12 Mathematics chapter on Integrals, and "integration by parts formula ILATE rule" along with "integration by parts class 12 important questions" are among the top searches for students preparing for CBSE board exams and JEE Main calculus. The same ILATE-based technique extends naturally into JEE Advanced integral calculus problems built on this NCERT Class 12 foundation.
The key idea is integration by parts, which reverses the product rule. We choose u=x (so du=dx) and dv=cosxdx (so v=sinx).
Applying the formula ∫udv=uv−∫vdu:
∫xcosxdx=xsinx−∫sinxdx
The remaining integral is standard: ∫sinxdx=−cosx+C.
Thus:
∫xcosxdx=xsinx+cosx+C
The integral is xsinx+cosx+C.
The integral ∫xcosxdx is solved using integration by parts (the product rule in reverse). Choosing u=x and dv=cosxdx gives the result xsinx+cosx+C.
Why integration by parts?
When you see a product of two different kinds of functions — here x (algebraic) and cosx (trigonometric) — there’s no simple reverse derivative. The product rule for differentiation says (uv)′=u′v+uv′, so rearranging gives:
∫udv=uv−∫vdu
This is integration by parts. The trick is to pick u so that du is simpler, and dv so that v is easy to integrate.
A handy mnemonic for choosing u is LIATE: Logarithmic, Inverse trig, Algebraic, Trigonometric, Exponential. Pick u from the leftmost type in the product. Here x is Algebraic, cosx is Trigonometric — so u=x wins.
Step-by-step solution
1. Choose u and dv
Let u=x and dv=cosxdx.
Why? Because du=dx becomes simpler (the power drops), and v=sinx is easy to integrate.
2. Compute du and v
du=dx
v=∫cosxdx=sinx
3. Apply the integration by parts formula
∫xcosxdx=xsinx−∫sinxdx
The minus sign comes from uv−∫vdu. Don’t forget it — a common slip is to write + instead.
4. Integrate the remaining term
∫sinxdx=−cosx+C
So:
∫xcosxdx=xsinx−(−cosx)+C=xsinx+cosx+C
5. Check by differentiating
Differentiate xsinx+cosx:
- Derivative of xsinx: using product rule, 1⋅sinx+x⋅cosx=sinx+xcosx
- Derivative of cosx: −sinx
Sum: sinx+xcosx−sinx=xcosx — matches the integrand. Perfect.
A common mistake is to choose u=cosx and dv=xdx. Then du=−sinxdx and v=2x2, leading to 2x2cosx+21∫x2sinxdx — a harder integral. Always pick u so that du is simpler.
The integral is xsinx+cosx+C.
Method: Integration by Parts (Algebraic × Trigonometric)
Use this when the integrand is a polynomial times a trig function, where differentiating the polynomial simplifies it.
Steps
Step 1: Apply the by-parts formula with the right choice.
∫udv=uv−∫vdu.
By LIATE, choose u as the algebraic factor (so du is simpler) and dv as the trig factor. For ∫xcosxdx, take u=x, dv=cosxdx.
Step 2: Compute du and v.
Here du=dx and v=sinx. The formula gives xsinx−∫sinxdx.
Step 3: Finish the simpler integral.
∫sinxdx=−cosx, so the result is xsinx+cosx+C. Verify by differentiating.
Common Mistakes
Mistake 1: Choosing u=cosx, dv=xdx.
Why it's wrong: then v=2x2 makes the new integral harder, not easier. Correct approach: pick u=x (algebraic) so its derivative is a constant.
Mistake 2: Sign error integrating ∫sinxdx.
Why it's wrong: ∫sinxdx=−cosx, and combined with the formula's minus sign the term becomes +cosx. Correct approach: track both minus signs.
Mistake 3: Forgetting the −∫vdu term entirely.
Why it's wrong: writing only uv=xsinx omits half the answer. Correct approach: always subtract ∫vdu.
- KCET 2022Set C-41 markMCQQ.∫01(2+x)3xexdx is equal to (A) 271e+81 (B) 91e+41 (C) 91e−41 (D) 271e−81
›Reveal solutionSolution
Use the standard result ∫ex[f(x)+f′(x)]dx=exf(x)+c after splitting x as (2+x)−2.
Step 1 — Why this form is the right tool.
An integrand shaped like ex[f(x)+f′(x)] integrates in one line to exf(x), because dxd(exf(x))=exf(x)+exf′(x). Our job is to massage (2+x)3xex into that shape.
Step 2 — Split the numerator.
Write x=(2+x)−2:
(2+x)3xex=ex[(2+x)3(2+x)−2]=ex[(2+x)21−(2+x)32].
Step 3 — Recognise f and f′.
Take
f(x)=(2+x)21⟹f′(x)=−(2+x)32.
So the bracket is precisely f(x)+f′(x), and
∫(2+x)3xexdx=exf(x)+c=(2+x)2ex+c.
Step 4 — Apply the limits 0 to 1.
∫01(2+x)3xexdx=[(2+x)2ex]01=(3)2e1−(2)2e0=9e−41.
Step 5 — Sanity check.
Numerically 9e≈0.3021 and 41=0.25, so the value is ≈0.052 — small and positive, consistent with a positive integrand on (0,1) that is heavily damped by (2+x)3. ✓
✓Final answerThe correct option is (C) — 91e−41.
ANSWER: C
- COMEDK 2026Set 2026-A1 markMCQQ.
[!FORMULA] ∫(1+x)2logxdx
(A) x+1logx−logx+1x+C (B) −x+1logx+logx+1x+C (C) −x+1logx−logx+1x+C (D) x+1logx+logxx+1+C›Reveal solutionSolution
This integral is solved by integration by parts, choosing u=logx and dv=(1+x)−2dx. The result simplifies to −1+xlogx+log1+xx+C, which matches option (B).
The key insight: when you see a product of a logarithm and a rational function, integration by parts is almost always the way. The logarithm’s derivative is simple (1/x), and the rational part often integrates nicely. Here, (1+x)−2 is the derivative of −1/(1+x), so letting u=logx and dv=dx/(1+x)2 is natural.
Let’s work through it step by step.
- Set up integration by parts. Let
u=logx,dv=(1+x)2dx.
Then
du=x1dx,v=∫(1+x)2dx=−1+x1.
(Check: derivative of −1/(1+x) is 1/(1+x)2.)
- Apply the formula ∫udv=uv−∫vdu:
∫(1+x)2logxdx=−1+xlogx−∫(−1+x1)⋅x1dx.
The minus signs give:
=−1+xlogx+∫x(1+x)1dx.
- Simplify the remaining integral using partial fractions. Write
x(1+x)1=xA+1+xB.
Multiply through by x(1+x):
1=A(1+x)+Bx.
For x=0: 1=A.
For x=−1: 1=−B⇒B=−1.
So
x(1+x)1=x1−1+x1.
- Integrate term by term:
∫x(1+x)1dx=∫x1dx−∫1+x1dx=log∣x∣−log∣1+x∣+C.
Combine the logs:
=log1+xx+C.
- Put it all together:
∫(1+x)2logxdx=−1+xlogx+log1+xx+C.
TipNotice that log1+xx=−logx1+x, so option (B) is actually the same as (B) up to a sign error in the first term. Always check the sign on the rational part carefully.
Watch outA common mistake is to forget the minus sign from v=−1/(1+x) when applying integration by parts, leading to option (A) or (C). Double-check the sign of the first term.
Comparing with the options:
- (A) has +x+1logx — wrong sign.
- (B) has −x+1logx+logx+1x — matches.
- (C) has a minus before the log term — wrong.
- (D) has +x+1logx and the reciprocal inside the log — wrong sign on the first term.
✓Final answerThe correct option is (B).
ANSWER: B
- COMEDK 2025Set 2025-M1 markMCQQ.∫logx2dx= (A) logx2+x+c (B) xlogx2−1+c (C) xlogx2+x+c (D) xlogx2−2x+c
›Reveal solutionSolution
The integral ∫logx2dx is solved by rewriting logx2=2logx and then integrating by parts, yielding xlogx2−2x+C. The correct choice is (D).
The key insight is that logx2 is not (logx)2; it's 2logx. This simplifies the integral into a standard form that integration by parts handles cleanly. Many students mistakenly try to integrate logx2 as if it were a square, but the logarithm's power rule saves the day.
- Rewrite the integrand Using the logarithm property logab=bloga, we have:
logx2=2logx
So the integral becomes:
∫logx2dx=∫2logxdx=2∫logxdx
- Integrate ∫logxdx by parts Recall the integration by parts formula: ∫udv=uv−∫vdu. Choose:
u=logxanddv=dx
Then:
du=x1dxandv=x
So:
∫logxdx=xlogx−∫x⋅x1dx=xlogx−∫1dx=xlogx−x+C
- Multiply by 2 and express in original form
2∫logxdx=2(xlogx−x)+C=2xlogx−2x+C
But 2logx=logx2, so 2xlogx=xlogx2. Thus:
∫logx2dx=xlogx2−2x+C
Watch outA common mistake is to treat logx2 as (logx)2 and attempt a different integration by parts, leading to a messy result. Always check: logx2 means log(x2), not (logx)2.
TipIf you ever forget the integration of logx, remember it's a classic by-parts result: ∫logxdx=xlogx−x+C. This is worth memorizing.
✓Final answerThe correct option is (D).
ANSWER: D
- COMEDK 2024Set 2024-A1 markMCQQ.
[!FORMULA] ∫logx(logx+2)dx equals to
(A) x[1+(logx)2]+C (B) x(1+logx)2+C (C) 2xlogx+C (D) x(logx)2+C›Reveal solutionSolution
The integrand simplifies to (logx)2+2logx, which is the derivative of x(logx)2 up to a constant, so the answer is x(logx)2+C, matching option (D).
We start by noticing that the integrand is logx(logx+2)=(logx)2+2logx. This looks like something that might be the derivative of a product involving logx. A classic trick: the derivative of x(logx)n gives terms like n(logx)n−1+(logx)n. Here, if we try n=2, we get exactly the pattern we need.
Let’s verify step by step.
- Simplify the integrand
logx(logx+2)=(logx)2+2logx.
- Guess a candidate antiderivative Consider F(x)=x(logx)2. Differentiate using the product rule:
F′(x)=1⋅(logx)2+x⋅2logx⋅x1=(logx)2+2logx.
This matches exactly the integrand.
- Conclude the indefinite integral Since F′(x) equals the integrand, we have
∫[(logx)2+2logx]dx=x(logx)2+C.
- Match with options Option (D) is x(logx)2+C, which is our result.
TipA quick check: differentiate x(logx)2 and you get (logx)2+2logx, which is exactly logx(logx+2). No integration by parts needed!
Watch outA common mistake is to try integration by parts immediately without simplifying the product first. Here, simplifying reveals a perfect derivative, saving time.
✓Final answerThe correct option is (D).
ANSWER: D
- COMEDK 2024Set 2024-E1 markMCQQ.
[!FORMULA] ∫ex[(x+1)2x2+1]dx is equal to
(A) −x+1ex+C (B) ex(x+1x−1)+C (C) x+1ex+C (D) x+1xex+C›Reveal solutionSolution
Write the integrand in the form ex(f(x)+f′(x)) with f(x)=x+1x−1, so the integral is exx+1x−1+C.
Recall the standard result
∫ex(f(x)+f′(x))dx=exf(x)+C.
We must split (x+1)2x2+1 as f(x)+f′(x). Try
f(x)=x+1x−1.
Then
f′(x)=(x+1)2(x+1)−(x−1)=(x+1)22.
Adding:
f(x)+f′(x)=x+1x−1+(x+1)22=(x+1)2(x−1)(x+1)+2=(x+1)2x2−1+2=(x+1)2x2+1.
This matches the integrand exactly, so
∫ex[(x+1)2x2+1]dx=ex(x+1x−1)+C.
✓Final answerex(x+1x−1)+C — option (B).
- CA Foundation 2024Set sep-20241 markMCQQ.∫logexdx is equal to : (A) xloge(ex)+c (B) xloge(ex)+c (C) xloge(xe)+c (D) loge(ex)+c
›Reveal solutionSolution
∫ln x dx = x ln x − x + c = x·ln(x/e) + c.
Step 1 — Integration by parts
Take u=lnx, dv=dx, so du=x1dx, v=x:
∫lnxdx=xlnx−∫x⋅x1dx
Step 2 — Complete the integral
=xlnx−∫1dx=xlnx−x+c
Step 3 — Rewrite in the option's form
Factor x and use 1=lne:
x(lnx−1)=x(lnx−lne)=xln(ex)
∫lnxdx=xloge(ex)+c
Why the other options are wrong: (A) x·ln(ex) = x(ln x + 1) has the wrong sign; (C) x·ln(e/x) reverses the ratio; (D) drops the leading x factor. Only (B) matches x ln x − x.
Watch outThe result is xlnx−x (minus x), so the ratio inside the log is x/e, NOT e/x or ex. A sign slip lands you on option (A) or (C).
TipMemorise ∫ln x dx = x(ln x − 1) + c; then just express it as x·ln(x/e) to match ICAI's answer form.
✓Final answer(B) xloge(ex)+c
- COMEDK 2023Set 2023-E1 markMCQQ.
[!FORMULA] ∫ex(1+tanx+tan2x)dx is equal to
(A) excosx+c (B) exsinx+c (C) extanx+c (D) exsecx+c›Reveal solutionSolution
(Check by differentiating: d/dx [e^x tan x] = e^x tan x + e^x sec^2 x = e^x (1 + tan x + tan^2 x). Correct.)
Concept: the standard form integral of e^x [ f(x) + f'(x) ] dx = e^x f(x) + c.
Rewrite the bracket using 1 + tan^2 x = sec^2 x:
1 + tan x + tan^2 x = tan x + (1 + tan^2 x) = tan x + sec^2 x.
So the integral is
integral e^x [ tan x + sec^2 x ] dx.
Here f(x) = tan x and f'(x) = sec^2 x, exactly the required pattern.
Therefore the integral = e^x tan x + c.
(Check by differentiating: d/dx [e^x tan x] = e^x tan x + e^x sec^2 x = e^x (1 + tan x + tan^2 x). Correct.)
✓Final answerThe correct option is (C) — extanx+c
ANSWER: C
- KCET 2021Set A-11 markMCQQ.The value of ∫(1+x)2xexdx is equal to (A) ex(1+x)+c (B) ex(1+x2)+c (C) ex(1+x)2+c (D) 1+xex+c
›Reveal solutionSolution
Split (1+x)2x into f+f′ form and apply the standard result ∫ex[f(x)+f′(x)]dx=exf(x)+c.
Step 1 — The concept
The standard result comes straight from the product rule:
dxd[exf(x)]=exf(x)+exf′(x)=ex[f(x)+f′(x)]
So whenever an integrand is ex times (some function + its own derivative), the answer is simply exf(x)+c. Our job is to force (1+x)2x into that shape.
Step 2 — Split the rational part
Write the numerator as x=(1+x)−1:
(1+x)2x=(1+x)2(1+x)−1=1+x1−(1+x)21
Step 3 — Identify f and f′
Take
f(x)=1+x1⟹f′(x)=−(1+x)21
Then exactly
(1+x)2x=f(x)+f′(x)
Step 4 — Integrate
∫(1+x)2xexdx=∫ex[f(x)+f′(x)]dx=exf(x)+c=1+xex+c
Step 5 — Verify by differentiating (always do this on an antiderivative MCQ)
dxd[1+xex]=(1+x)2ex(1+x)−ex(1)=(1+x)2ex[(1+x)−1]=(1+x)2xex✓
This reproduces the integrand exactly, confirming (D).
✓Final answerThe correct option is (D) — 1+xex+c.
ANSWER: D
- KCET 2021Set A-11 markMCQQ.The value of ∫ex[1+cosx1+sinx]dx is equal to (A) extan2x+c (B) extanx+c (C) ex(1+cosx)+c (D) ex(1+sinx)+c
›Reveal solutionSolution
The integral simplifies using the identity 1+cosx1+sinx=21sec22x+tan2x, then applying the standard form ∫ex[f(x)+f′(x)]dx=exf(x)+c to get extan2x+c, which matches option (A).
The key insight here is that the integrand ex⋅1+cosx1+sinx is a product of ex with a trigonometric expression. Integrals of the form ∫ex[f(x)+f′(x)]dx have a neat closed form: exf(x)+c. So if we can rewrite 1+cosx1+sinx as f(x)+f′(x) for some function f(x), the integral becomes trivial.
Let’s see if that works.
- Simplify the trigonometric fraction. Use the half-angle identities: sinx=2sin2xcos2x, cosx=2cos22x−1=1−2sin22x, and 1+cosx=2cos22x. Then
1+cosx1+sinx=2cos22x1+2sin2xcos2x.
- Split the numerator.
2cos22x1+2cos22x2sin2xcos2x=21sec22x+tan2x.
- Recognise the f(x)+f′(x) pattern. Let f(x)=tan2x. Then
f′(x)=21sec22x.
So indeed
1+cosx1+sinx=f′(x)+f(x).
- Apply the standard result. The integral becomes
∫ex[f(x)+f′(x)]dx=exf(x)+c=extan2x+c.
Watch outA common mistake is to try integrating by parts directly or to misapply the identity ∫ex[f(x)+f′(x)]dx=exf(x)+c by not checking that the derivative is exactly the other term. Here, the order f′(x)+f(x) works fine — the formula is symmetric.
TipIf you ever see ex multiplied by a sum of a function and its derivative, the answer is almost always ex times that function. This is a favourite trick in competitive exams — spot the pattern and save time.
✓Final answerThe correct option is (A): extan2x+c.
- COMEDK 2021Set 2021-B1 markMCQQ.∫(1+x21−x)2exdx= (A) 1+x2ex+c (B) (1+x2)2ex+c (C) (1+x2)2−ex+c (D) 1+x2−2ex+c
›Reveal solutionSolution
The integral is 1+x2ex+c.
Use ∫ex(f(x)+f′(x))dx=exf(x)+c. Take f(x)=1+x21, so f′(x)=(1+x2)2−2x. Then
f+f′=(1+x2)2(1+x2)−2x=(1+x2)2(1−x)2=(1+x21−x)2,
exactly the given integrand. Therefore the integral equals 1+x2ex+c.
✓Final answerThe correct option is (A) — 1+x2ex+c
- KCET 2019Set A-11 markMCQQ.∫x3sin3xdx= (A) −3x3cos3x−3x2sin3x+92xcos3x−272sin3x+C (B) 3x3cos3x+3x2sin3x−92xcos3x−272sin3x+C (C) −3x3cos3x+3x2sin3x+92xcos3x−272sin3x+C (D) −3x3cos3x+3x2sin3x−92xcos3x+272sin3x+C
›Reveal solutionSolution
Apply integration by parts three times, taking x3 (then x2, then x) as the first function each time, and assemble the four terms.
Step 1 — First integration by parts.
With u=x3, dv=sin3xdx⇒v=−3cos3x:
∫x3sin3xdx=−3x3cos3x+33∫x2cos3xdx=−3x3cos3x+∫x2cos3xdx.
Step 2 — Second integration by parts.
With u=x2, dv=cos3xdx⇒v=3sin3x:
∫x2cos3xdx=3x2sin3x−32∫xsin3xdx.
Step 3 — Third integration by parts.
With u=x, dv=sin3xdx⇒v=−3cos3x:
∫xsin3xdx=−3xcos3x+31∫cos3xdx=−3xcos3x+9sin3x.
Step 4 — Back-substitute into Step 2.
∫x2cos3xdx=3x2sin3x−32(−3xcos3x+9sin3x)=3x2sin3x+92xcos3x−272sin3x.
Step 5 — Back-substitute into Step 1.
∫x3sin3xdx=−3x3cos3x+3x2sin3x+92xcos3x−272sin3x+C.
Step 6 — Verify by differentiation (spot-check).
Differentiating: −(3x23cos3x−x3sin3x)+(32xsin3x+x2cos3x)+(92cos3x−96xsin3x)−276cos3x. The cos terms cancel (−x2cos3x+x2cos3x and 92cos3x−92cos3x), the sin terms give x3sin3x+32xsin3x−32xsin3x=x3sin3x. ✓
This matches option (C) exactly (the sign pattern −,+,+,−).
✓Final answerThe correct option is (C) — −3x3cos3x+3x2sin3x+92xcos3x−272sin3x+C.
ANSWER: C
🎓Unlock everything free for 14 days
- ✓Full step-by-step solutions
- ✓Concept-first explanations
- ✓Methods, shortcuts & mistakes
- ✓PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.