WishWasTraining Academy
NDA & Naval Academy entrance exam school
โ† home
Chapter M6-2 ยท 2 of 5 in Integral Calculus and Differential Equations ยท 11 min read

Integration by substitution and by parts

26 real NDA questions of this kind in the 19 papers of 2017 to 2026.

Try three questions free โ†“
This chapter has a video lessonWatch it, practise with a drill and keep your record, all with a free account. No fee, no card.

Why this chapter matters. This chapter drew 7 questions in the seven papers from NDA II 2023 to NDA II 2026. Some ask for the integral directly. Others give the integral equal to an expression with unknown numbers such as โ€‹\alphaโ€‹ and โ€‹\betaโ€‹, and ask for those numbers. Both methods of this chapter are also used all through the next chapter, on definite integrals, which is the most-asked chapter of the unit.

What you will be able to do

  • Use a substitution to turn an integral into one of the standard integrals.
  • Spot the three patterns that can be integrated at sight, such as โ€‹\int \dfrac{f'(x)}{f(x)}\,dxโ€‹.
  • Integrate a product by parts, choosing the first function correctly.
  • Use the two results for โ€‹e^xโ€‹ that save a full calculation.

Before you start you should know: the table of standard integrals (Chapter M6-1), the chain rule and the product rule (Chapter M5-6).

1. Substitution: the chain rule backwards

The chain rule gives โ€‹\dfrac{d}{dx}\sin(x^2) = 2x\cos(x^2)โ€‹. So โ€‹\int 2x\cos(x^2)\,dx = \sin(x^2) + cโ€‹. Substitution is the method that finds such answers when you cannot see them.

Use it when the integrand contains a function and its derivative (a constant factor more or less does not matter).

  1. Choose โ€‹tโ€‹ equal to the inside function.
  2. Differentiate to connect โ€‹dtโ€‹ and โ€‹dxโ€‹.
  3. Replace everything, so that only โ€‹tโ€‹ remains.
  4. Integrate, then put โ€‹xโ€‹ back.

For example, take โ€‹\int x\,e^{x^2}\,dxโ€‹. Put โ€‹t = x^2โ€‹. Then โ€‹dt = 2x\,dxโ€‹, so โ€‹x\,dx = \dfrac{dt}{2}โ€‹. The integral becomes โ€‹\dfrac{1}{2}\int e^t\,dt = \dfrac{e^t}{2} + c = \dfrac{e^{x^2}}{2} + cโ€‹.

2. Three patterns to spot

With practice the substitution is done in the head. These three patterns come most often. In each, โ€‹f'(x)โ€‹ is the derivative of โ€‹f(x)โ€‹.

Pattern Integral Example
โ€‹\displaystyle\int \frac{f'(x)}{f(x)}\,dxโ€‹ โ€‹\ln \lvert f(x) \rvert + cโ€‹ โ€‹\displaystyle\int \frac{2x}{x^2 + 1}\,dx = \ln(x^2 + 1) + cโ€‹
โ€‹\displaystyle\int [f(x)]^n f'(x)\,dxโ€‹, where โ€‹n \neq -1โ€‹ โ€‹\dfrac{[f(x)]^{n+1}}{n+1} + cโ€‹ โ€‹\displaystyle\int \sin^3 x \cos x\,dx = \frac{\sin^4 x}{4} + cโ€‹
โ€‹\displaystyle\int e^{f(x)} f'(x)\,dxโ€‹ โ€‹e^{f(x)} + cโ€‹ โ€‹\displaystyle\int \cos x\,e^{\sin x}\,dx = e^{\sin x} + cโ€‹

The first pattern gives four integrals that complete the table of Chapter M6-1. For example, โ€‹\tan x = \dfrac{\sin x}{\cos x}โ€‹, and the top is minus the derivative of the bottom, so โ€‹\int \tan x\,dx = -\ln|\cos x| + c = \ln|\sec x| + cโ€‹.

Function Its integral
โ€‹\tan xโ€‹ โ€‹\ln \lvert \sec x \rvert + cโ€‹
โ€‹\cot xโ€‹ โ€‹\ln \lvert \sin x \rvert + cโ€‹
โ€‹\sec xโ€‹ โ€‹\ln \lvert \sec x + \tan x \rvert + cโ€‹
โ€‹\operatorname{cosec} xโ€‹ โ€‹\ln \lvert \operatorname{cosec} x - \cot x \rvert + cโ€‹

3. Four standard forms

These come from the substitution โ€‹x = atโ€‹ and the table of Chapter M6-1. Here โ€‹aโ€‹ is a positive constant.

Function Its integral
โ€‹\dfrac{1}{a^2 + x^2}โ€‹ โ€‹\dfrac{1}{a}\tan^{-1}\dfrac{x}{a} + cโ€‹
โ€‹\dfrac{1}{\sqrt{a^2 - x^2}}โ€‹ โ€‹\sin^{-1}\dfrac{x}{a} + cโ€‹
โ€‹\dfrac{1}{x^2 - a^2}โ€‹ โ€‹\dfrac{1}{2a}\ln \left\lvert \dfrac{x - a}{x + a} \right\rvert + cโ€‹
โ€‹\dfrac{1}{\sqrt{x^2 + a^2}}โ€‹ โ€‹\ln \left\lvert x + \sqrt{x^2 + a^2} \right\rvert + cโ€‹

For example, โ€‹\int \dfrac{dx}{x^2 + 25} = \dfrac{1}{5}\tan^{-1}\dfrac{x}{5} + cโ€‹ and โ€‹\int \dfrac{dx}{\sqrt{4 - x^2}} = \sin^{-1}\dfrac{x}{2} + cโ€‹.

In the exam these forms are often hidden: in place of โ€‹xโ€‹ there is another function, such as โ€‹e^xโ€‹ or โ€‹x^{3/2}โ€‹. Substitute โ€‹tโ€‹ for that function first. Example 3 and the first two real questions below show this.

4. Integration by parts: the product rule backwards

Substitution fails for a product such as โ€‹x\,e^xโ€‹, because neither factor is the derivative of the other. For a product of two functions โ€‹uโ€‹ and โ€‹vโ€‹ of โ€‹xโ€‹:

\int u\,v\,dx = u\int v\,dx - \int \left(\frac{du}{dx}\int v\,dx\right) dx

In words: first function times the integral of the second, minus the integral of (derivative of the first times integral of the second).

Which is the first function? Choose the one that comes earlier in the word ILATE: Inverse trigonometric, Logarithmic, Algebraic, Trigonometric, Exponential. The first function is differentiated, so it should become simpler.

For example, in โ€‹\int x\,e^x\,dxโ€‹ the first function is โ€‹xโ€‹ (algebraic) and the second is โ€‹e^xโ€‹:

\int x\,e^x\,dx = x\,e^x - \int 1 \cdot e^x\,dx = x\,e^x - e^x + c

A single function can be integrated by parts with 1 as the second function: โ€‹\int \ln x\,dx = \ln x \cdot x - \int \dfrac{1}{x} \cdot x\,dx = x\ln x - x + cโ€‹.

5. Two results with โ€‹e^xโ€‹

Result 1. Since the derivative of โ€‹e^x f(x)โ€‹ is โ€‹e^x f(x) + e^x f'(x)โ€‹,

\int e^x\,[f(x) + f'(x)]\,dx = e^x f(x) + c

For example, โ€‹\int e^x(\sin x + \cos x)\,dx = e^x \sin x + cโ€‹, because โ€‹\cos xโ€‹ is the derivative of โ€‹\sin xโ€‹.

Result 2. Integrating by parts twice brings back the same integral, which can then be found:

\int e^x \sin x\,dx = \frac{e^x}{2}(\sin x - \cos x) + c \qquad \int e^x \cos x\,dx = \frac{e^x}{2}(\sin x + \cos x) + c

6. Worked examples

Example 1. Find โ€‹\int \dfrac{x}{x^2 + 1}\,dxโ€‹.

The derivative of the bottom is โ€‹2xโ€‹, and the top is half of that. So the integral is โ€‹\dfrac{1}{2}\int \dfrac{2x}{x^2 + 1}\,dx = \dfrac{1}{2}\ln(x^2 + 1) + cโ€‹.

Example 2. Find โ€‹\int \dfrac{(\ln x)^2}{x}\,dxโ€‹.

Put โ€‹t = \ln xโ€‹, so โ€‹dt = \dfrac{dx}{x}โ€‹. The integral becomes โ€‹\int t^2\,dt = \dfrac{t^3}{3} + c = \dfrac{(\ln x)^3}{3} + cโ€‹.

Example 3. Find โ€‹\int \dfrac{e^x}{1 + e^{2x}}\,dxโ€‹.

Since โ€‹e^{2x} = (e^x)^2โ€‹, put โ€‹t = e^xโ€‹, so โ€‹dt = e^x\,dxโ€‹. The integral becomes โ€‹\int \dfrac{dt}{1 + t^2} = \tan^{-1} t + c = \tan^{-1}(e^x) + cโ€‹.

Example 4. Find โ€‹\int x\cos x\,dxโ€‹.

By ILATE the first function is โ€‹xโ€‹ and the second is โ€‹\cos xโ€‹. The integral of โ€‹\cos xโ€‹ is โ€‹\sin xโ€‹. So

โ€‹\int x\cos x\,dx = x\sin x - \int 1 \cdot \sin x\,dx = x\sin x + \cos x + cโ€‹.

Check: the derivative of โ€‹x\sin x + \cos xโ€‹ is โ€‹\sin x + x\cos x - \sin x = x\cos xโ€‹.

Example 5. Find โ€‹\int e^x\left(\dfrac{1}{x} - \dfrac{1}{x^2}\right) dxโ€‹.

The derivative of โ€‹\dfrac{1}{x}โ€‹ is โ€‹-\dfrac{1}{x^2}โ€‹. So the bracket is โ€‹f(x) + f'(x)โ€‹ with โ€‹f(x) = \dfrac{1}{x}โ€‹, and by Result 1 the integral is โ€‹\dfrac{e^x}{x} + cโ€‹.

7. From the real papers

Try each question for 75 seconds before reading the solution.

NDA II 2026, Q71. What is โ€‹\int \frac{\sqrt{x}}{\sqrt{1 - x^3}}\,dxโ€‹ equal to?

(a) โ€‹\frac{x^{3/2}}{3} + cโ€‹โ€ƒโ€ƒ(b) โ€‹\frac{2x^{3/2}}{3} + cโ€‹โ€ƒโ€ƒ(c) โ€‹\frac{1}{3}\sin^{-1}(x^{3/2}) + cโ€‹โ€ƒโ€ƒ(d) โ€‹\frac{2}{3}\sin^{-1}(x^{3/2}) + cโ€‹

Solution. Notice that โ€‹x^3 = (x^{3/2})^2โ€‹. Put โ€‹t = x^{3/2}โ€‹, so โ€‹dt = \dfrac{3}{2}\sqrt{x}\,dxโ€‹ and โ€‹\sqrt{x}\,dx = \dfrac{2}{3}\,dtโ€‹. The integral becomes โ€‹\dfrac{2}{3}\int \dfrac{dt}{\sqrt{1 - t^2}} = \dfrac{2}{3}\sin^{-1} t + c = \dfrac{2}{3}\sin^{-1}(x^{3/2}) + cโ€‹. Answer (d).

NDA II 2025, Q95. What is โ€‹\int \frac{dx}{10^x + 10^{-x}}โ€‹ equal to?

(a) โ€‹\tan^{-1}(10^x) + cโ€‹โ€ƒโ€ƒ(b) โ€‹(\ln 10)\tan^{-1}(10^x) + cโ€‹โ€ƒโ€ƒ(c) โ€‹\frac{1}{\ln 10}\tan^{-1}(10^x) + cโ€‹โ€ƒโ€ƒ(d) โ€‹\ln(10^x + 10^{-x}) + cโ€‹

Solution. Multiply above and below by โ€‹10^xโ€‹. The integrand becomes โ€‹\dfrac{10^x}{10^{2x} + 1}โ€‹. Put โ€‹t = 10^xโ€‹, so โ€‹dt = 10^x \ln 10\,dxโ€‹ and โ€‹10^x\,dx = \dfrac{dt}{\ln 10}โ€‹. The integral becomes โ€‹\dfrac{1}{\ln 10}\int \dfrac{dt}{t^2 + 1} = \dfrac{1}{\ln 10}\tan^{-1}(10^x) + cโ€‹. Answer (c).

NDA II 2025, Q85. Let โ€‹u = \int e^x\cos x\,dxโ€‹ and โ€‹v = \int e^x\sin x\,dxโ€‹. What is โ€‹u + vโ€‹ equal to?

(a) โ€‹-\frac{du}{dx}โ€‹โ€ƒโ€ƒ(b) โ€‹-\frac{dv}{dx}โ€‹โ€ƒโ€ƒ(c) โ€‹\frac{du}{dx}โ€‹โ€ƒโ€ƒ(d) โ€‹\frac{dv}{dx}โ€‹

Solution. By the meaning of an integral, โ€‹\dfrac{du}{dx} = e^x\cos xโ€‹ and โ€‹\dfrac{dv}{dx} = e^x\sin xโ€‹. Integrate โ€‹vโ€‹ by parts with โ€‹\sin xโ€‹ as the first function and โ€‹e^xโ€‹ as the second: โ€‹v = \sin x \cdot e^x - \int \cos x \cdot e^x\,dx = e^x \sin x - uโ€‹. So โ€‹u + v = e^x\sin xโ€‹, which is โ€‹\dfrac{dv}{dx}โ€‹. Answer (d).

NDA I 2024, Q81 and Q82. Consider the following for the next two (02) items that follow: Given that โ€‹\int \frac{3\cos x + 4\sin x}{2\cos x + 5\sin x}dx = \frac{\alpha x}{29} + \frac{\beta}{29}\ln|2\cos x + 5\sin x| + cโ€‹

Q81. What is the value of โ€‹\alphaโ€‹?

(a) โ€‹7โ€‹โ€ƒโ€ƒ(b) โ€‹13โ€‹โ€ƒโ€ƒ(c) โ€‹17โ€‹โ€ƒโ€ƒ(d) โ€‹26โ€‹

Q82. What is the value of โ€‹\betaโ€‹?

(a) โ€‹7โ€‹โ€ƒโ€ƒ(b) โ€‹13โ€‹โ€ƒโ€ƒ(c) โ€‹17โ€‹โ€ƒโ€ƒ(d) โ€‹26โ€‹

Solution. Write the top as โ€‹A \times (\text{bottom}) + B \times (\text{derivative of the bottom})โ€‹. The derivative of โ€‹2\cos x + 5\sin xโ€‹ is โ€‹5\cos x - 2\sin xโ€‹. So

3\cos x + 4\sin x = A(2\cos x + 5\sin x) + B(5\cos x - 2\sin x)

Compare the โ€‹\cos xโ€‹ terms: โ€‹2A + 5B = 3โ€‹. Compare the โ€‹\sin xโ€‹ terms: โ€‹5A - 2B = 4โ€‹. Solving, โ€‹A = \dfrac{26}{29}โ€‹ and โ€‹B = \dfrac{7}{29}โ€‹. The integrand is now โ€‹A + B \cdot \dfrac{f'(x)}{f(x)}โ€‹, so the integral is โ€‹Ax + B\ln|2\cos x + 5\sin x| + cโ€‹. Hence โ€‹\alpha = 26โ€‹ and โ€‹\beta = 7โ€‹. Answer (d) for Q81 and Answer (a) for Q82.

When a question gives the form of the answer, as this one does, there is a second way: differentiate the given right side and compare it with the integrand.

8. Mistakes that cost marks

  1. Changing โ€‹xโ€‹ but not โ€‹dxโ€‹. In โ€‹\int x\,e^{x^2}\,dxโ€‹ with โ€‹t = x^2โ€‹, the right replacement is โ€‹x\,dx = \dfrac{dt}{2}โ€‹. Writing โ€‹\int e^t\,dtโ€‹ loses the factor โ€‹\dfrac{1}{2}โ€‹.
  2. Leaving the answer in โ€‹tโ€‹. The question is in โ€‹xโ€‹, so the answer must be in โ€‹xโ€‹. Always put the original variable back.
  3. Choosing the wrong first function. In โ€‹\int x\,e^x\,dxโ€‹, taking โ€‹e^xโ€‹ first gives โ€‹\int \dfrac{x^2}{2}e^x\,dxโ€‹, which is harder than the question. Follow ILATE: โ€‹xโ€‹ is first.
  4. Forgetting the โ€‹\dfrac{1}{a}โ€‹. โ€‹\int \dfrac{dx}{a^2 + x^2}โ€‹ has the factor โ€‹\dfrac{1}{a}โ€‹ in front of โ€‹\tan^{-1}\dfrac{x}{a}โ€‹. โ€‹\int \dfrac{dx}{\sqrt{a^2 - x^2}} = \sin^{-1}\dfrac{x}{a} + cโ€‹ has no such factor.

9. Quick check

Do these without help. Answers are at the end.

  1. Find โ€‹\int 2x(x^2 + 3)^4\,dxโ€‹.
  2. Find โ€‹\int \dfrac{e^x}{e^x + 1}\,dxโ€‹.
  3. Find โ€‹\int \dfrac{dx}{9 + x^2}โ€‹.
  4. Find โ€‹\int x\sin x\,dxโ€‹.
  5. Find โ€‹\int e^x\left(\ln x + \dfrac{1}{x}\right) dxโ€‹.

10. Read and watch more, free

What Where Language
Textbook NCERT Class 12 Mathematics, Chapter 7 Integrals ยท Hindi edition English, Hindi
Self-study notes NIOS Mathematics, Lesson 30 Integration ยท Hindi edition English, Hindi
Video, the whole topic for NDA Defence Wallah: SHAKTI 2026 playlist (the video "Indefinite Integrals", about 3 hours 50 minutes) Hinglish
Video, every textbook problem Magnet Brains: Class 12 Maths, Chapter 7 Integrals Hinglish
Video, short lessons Khan Academy India: เค•เค•เฅเคทเคพ 12 เค—เคฃเคฟเคค (the lessons on เคธเคฎเคพเค•เคฒเคจ) Hindi

The videos were chosen from their titles, length and views; they have not yet been watched by a teacher.

Answers to the quick check

  1. โ€‹\dfrac{(x^2 + 3)^5}{5} + cโ€‹ (the second pattern, with โ€‹f(x) = x^2 + 3โ€‹).
  2. โ€‹\ln(e^x + 1) + cโ€‹ (the top is the derivative of the bottom).
  3. โ€‹\dfrac{1}{3}\tan^{-1}\dfrac{x}{3} + cโ€‹.
  4. โ€‹-x\cos x + \sin x + cโ€‹.
  5. โ€‹e^x \ln x + cโ€‹ (Result 1 with โ€‹f(x) = \ln xโ€‹).

Next chapter: Definite integrals and areas.

Free ยท no sign-up

Try three questions on this chapter

Exam-pattern questions from this chapter's drill. Pick an answer for each, then check.

  1. Question 1 of 3
    What is โ€‹\int \dfrac{dx}{x^2 - 9}โ€‹ equal to?
  2. Question 2 of 3
    Consider the following statements about โ€‹\int \sec x\, dxโ€‹, where โ€‹cโ€‹ is the constant of integration: I. It equals โ€‹\ln|\sec x + \tan x| + cโ€‹. II. It equals โ€‹\ln\left|\tan\left(\dfrac{\pi}{4} + \dfrac{x}{2}\right)\right| + cโ€‹. Which of the statements given above is/are correct?
  3. Question 3 of 3
    What is โ€‹\int e^x(\tan x + \sec^2 x)\, dxโ€‹ equal to?
Free sign-up

You have read the chapter. Now make it stick.

A free account adds the video lesson, a drill of ten questions on this chapter marked like the exam, the timed mock papers, a study plan to your exam date and your own record of what you have done. No fee, no card.

Past questions quoted are from the official UPSC paper named in the text; the explanations are WishWas's own and have been checked against the official key. The links under โ€œRead and watch moreโ€ go to free material on other sites; nothing is copied.