Skip to main content

Section 4.1 Integrations

\begin{align*} \int (x^n)\, dx \amp = \frac{x^{n+1}}{n+1}+C; \, n\neq -1\\ \int \frac{1}{x}\, dx \amp = \ln |x| +C \\ \int (e^x)\, dx \amp = e^x+C \\ \int (a^x)\, dx \amp = \frac{a^x}{\ln a}+C \\ \int (a^x)\, dx \amp = \frac{a^x}{\ln a}+C \\ \int \sin x\, dx \amp = -\cos x +C \\ \int \cos x\, dx \amp = \sin x +C \\ \int \sec^2 x\, dx \amp = \tan x +C \\ \int \csc^2 x\, dx \amp = -\cot x +C \\ \int \sec x \tan x\, dx \amp = \sec x +C \end{align*}

Subsection 4.1.1 Methods of Integration

There are basic four methods of doing integration:

Subsubsection 4.1.1.1 Integration by Inspection Method:

Example 4.1.1.
Find the antiderivative (or integral) of the following functions by inspection method.
  1. \begin{equation*} \sin 3x \end{equation*}
  2. \begin{equation*} \cos 2x \end{equation*}
  3. \begin{equation*} (ax+b)^2 \end{equation*}
  4. \begin{equation*} e^{2x} \end{equation*}
  5. \begin{equation*} \sin 2x-3e^{3x} \end{equation*}
Solution.
  1. \begin{equation*} \int \sin 3x\, dx = -\frac{\cos 3x}{3}+C \end{equation*}
    As
    \begin{equation*} \frac{d}{dx} (\cos 3x)= -\sin 3x\cdot 3 =-3\sin 3x \end{equation*}
  2. \begin{equation*} \int \cos 2x\, dx = \frac{\sin 2x}{2}+C \end{equation*}
  3. \begin{equation*} \int (ax+b)^2 \, dx = \frac{(ax+b)^3}{3a} +C \end{equation*}
  4. \begin{equation*} \int e^{2x}\, dx = \frac{e^{2x}}{2}+C \end{equation*}
  5. \begin{equation*} \int (\sin 2x-3e^{3x}) \, dx = \int \sin 2x \, dx -3 \int e^{3x} \, dx \end{equation*}
    \begin{equation*} \, = -\frac{\cos 2x}{2}-3\frac{e^{3x}}{3}+C= -\frac{\cos 2x}{2}-e^{3x}+C \end{equation*}
Example 4.1.2.
Find the antiderivative (or integral) of the following functions by inspection method.
  1. \begin{equation*} \int (4e^{3x}+1)\, dx \end{equation*}
  2. \begin{equation*} \int x^2(1-\frac{1}{x^2})\, dx \end{equation*}
  3. \begin{equation*} \int (2x^2+e^x)\, dx \end{equation*}
  4. \begin{equation*} \int (ax^2+bx+c) \, dx \end{equation*}
  5. \begin{equation*} \int \frac{x^3+5x^2-4}{x^2} \, dx \end{equation*}
  6. \begin{equation*} \int \left(\sqrt{x} - \frac{1}{\sqrt{x}}\right)^2 \, dx \end{equation*}
Solution.
  1. \begin{equation*} \int (4e^{3x}+1)\, dx = \int 4e^{3x}\, dx+\int dx =4\frac{e^{3x}}{3}+x+c \end{equation*}
  2. \begin{equation*} \int x^2(1-\frac{1}{x^2})\, dx = \int (x^2-1)\, dx = \frac{x^3}{3}-x+C \end{equation*}
  3. \begin{equation*} \int (2x^2+e^x)\, dx = \fillinmath{XXXXX} \end{equation*}
  4. \begin{equation*} \int (ax^2+bx+c) \, dx =\fillinmath{XXXXX} \end{equation*}
  5. \begin{equation*} \int \frac{x^3+5x^2-4}{x^2} \, dx = \fillinmath{XXXXX} \end{equation*}
  6. \begin{equation*} \int \left(\sqrt{x} - \frac{1}{\sqrt{x}}\right)^2 \, dx = \int \left(x + \frac{1}{x}-2\right) \, dx \end{equation*}
    \begin{equation*} \, = \int x \, dx +\int \frac{1}{x}\, dx -2\int \, dx = \frac{x^2}{2}+\log |x| -2x+C \end{equation*}
Example 4.1.3.
Find the integration of
\begin{equation*} \int \frac{x^3+3x+5}{\sqrt{x}} \, dx \end{equation*}
Solution.
\begin{equation*} \int \frac{x^3+3x+5}{\sqrt{x}} \, dx = \int \left(x^{3-\frac{1}{2}}+3 x^{1-\frac{1}{2}}+4x^{-\frac{1}{2}}\right) \, dx \end{equation*}
\begin{equation*} \, = \int \left(x^{\frac{5}{2}}+3 x^{\frac{1}{2}}+4x^{-\frac{1}{2}}\right) \, dx = \frac{2}{7}x^{\frac{7}{2}}+2x^{\frac{3}{2}} +8x^{\frac{1}{2}}+C \end{equation*}
Example 4.1.4.
Find the integration of
  1. \begin{equation*} \int \frac{x^3-x^2+x-1+5}{x-1} \, dx \end{equation*}
  2. \begin{equation*} \int (1-x) \sqrt{x} \, dx \end{equation*}
  3. \begin{equation*} \int (2x-3\cos x +e^x) \, dx \end{equation*}
  4. \begin{equation*} \int \sqrt{x}(3x^2+2x+3) \, dx \end{equation*}
  5. \begin{equation*} \int (2x^2-3\sin x+5\sqrt{x}) \, dx \end{equation*}
Solution.
  1. \begin{equation*} \int \frac{x^3-x^2+x-1+5}{x-1} \, dx = \int \frac{(x^2+1)(x-1)}{(x-1)} \, dx \end{equation*}
    \begin{equation*} =\int (x^2+1) \, dx= \frac{x^3}{3} +x+C \end{equation*}
  2. \begin{equation*} \int (1-x) \sqrt{x} \, dx = \int \sqrt{x} \, dx -\int x\sqrt{x} \, dx = \frac{2}{3}x^{\frac{3}{2}}-\frac{2}{5}x^{\frac{5}{2}}+C \end{equation*}
  3. \begin{equation*} \int (2x-3\cos x +e^x) \, dx = \int 2x \, dx -3\int \cos x \, dx +\int e^x \, dx \end{equation*}
    \begin{equation*} = x^2 -3\sin x +e^x+C \end{equation*}
  4. \begin{equation*} \int \sqrt{x}(3x^2+2x+3) \, dx = \int (3x^{\frac{5}{2}}+2x^{\frac{3}{2}}+3x^{\frac{1}{2}}) \, dx \end{equation*}
    \begin{equation*} = \frac{6}{7}x^{\frac{7}{2}}+\frac{4}{5}x^{\frac{5}{2}}+2x^{\frac{3}{2}}+C \end{equation*}
  5. \begin{equation*} \int (2x^2-3\sin x+5\sqrt{x}) \, dx = \int 2x^2 \, dx -3\int \sin x \, dx +5\int \sqrt{x} \, dx \end{equation*}
    \begin{equation*} = \frac{2}{3}x^3 +3\cos x +\frac{10}{3}x^{\frac{3}{2}}+C \end{equation*}
Example 4.1.5.
Find the integration of
  1. \begin{equation*} \int \sec x (\sec x+\tan x)\, dx \end{equation*}
  2. \begin{equation*} \int \frac{\sec^2 x}{\csc^2 x} \, dx \end{equation*}
  3. \begin{equation*} \int \frac{2-3\sin x}{\cos^2 x} \, dx \end{equation*}
  4. \begin{equation*} \int \sqrt{x}(3x^2+2x+3) \, dx \end{equation*}
Solution.
  1. \begin{equation*} \int \sec x (\sec x+\tan x)\, dx = \int (\sec^2 x+\sec x\tan x)\, dx \end{equation*}
    \begin{equation*} = \tan x +\sec x+C \end{equation*}
  2. \begin{equation*} \int \frac{\sec^2 x}{\csc^2 x} \, dx = \end{equation*}
  3. \begin{equation*} \int \frac{2-3\sin x}{\cos^2 x} \, dx = \int 2\sec^2 x \, dx -3 \int \sec x\tan x\, dx \end{equation*}
    \begin{equation*} = 2\tan x -3\sec x+C \end{equation*}
Example 4.1.6.
If \(\frac{d}{dx}f(x) = 4x^3- \frac{3}{x^4}\) such that \(f(2) = 0\text{,}\) then find \(f(x).\)
Solution.
\begin{equation*} \frac{d}{dx}f(x) = 4x^3- \frac{3}{x^4} \end{equation*}
\begin{equation*} or, \, \int d[f(x)] = \int (4x^3- \frac{3}{x^4})\, dx \end{equation*}
\begin{equation*} or, \, f(x) = 4 \frac{x^4}{4}- 3\frac{x^{-3}}{-3})+C = x^4+x^{-3}+C \end{equation*}
\begin{equation*} or, \, f(2) = 0 = 2^4+2^{-3}+C = 16+\frac{1}{8}+C \Rightarrow \, C = -16-\frac{1}{8} = -\frac{129}{8} \end{equation*}
\begin{equation*} \therefore \, f(x) = x^4+x^{-3}-\frac{129}{8} \end{equation*}
Example 4.1.7.
Find the integration of
  1. \begin{equation*} \int \tan^2 x \, dx \end{equation*}
  2. \begin{equation*} \int \frac{1}{\sec x-\tan x} \, dx \end{equation*}
  3. \begin{equation*} \int \frac{1}{1+\cos 2x} \, dx \end{equation*}
  4. \begin{equation*} \int \frac{1}{1+\sin x} \, dx \end{equation*}
  5. \begin{equation*} \int \frac{\sin^6 x+\cos^6 x}{\sin^2 x\cos^2 x} \, dx \end{equation*}
  6. \begin{equation*} \int \frac{\cos x-\cos 2x}{1-\cos x} \, dx \end{equation*}
Solution.
  1. \begin{equation*} \int \tan^2 x \, dx = \int (\sec^2 x - 1) \, dx = \tan x - x + C \end{equation*}
  2. \begin{equation*} \int \frac{1}{\sec x-\tan x} \, dx = \int \frac{\sec x+\tan x}{(\sec x-\tan x)(\sec x+\tan x)} \, dx \end{equation*}
    \begin{equation*} = \int \frac{\sec x+\tan x}{1} \, dx = \int \sec x\, dx +\int \tan x\, dx \end{equation*}
    \begin{equation*} = \log |\sec x +\tan x| -\log |\sec x| +C \end{equation*}
  3. \begin{equation*} \int \frac{1}{1+\cos 2x} \, dx = \int \frac{1}{2\cos^2 x} \, dx = \int \frac{\sec^2 x}{2} \, dx = \frac{1}{2}\tan x +C \end{equation*}
  4. \begin{equation*} \int \frac{1}{1+\sin x} \, dx = \int \frac{1-\sin x}{(1+\sin x)(1-\sin x)} \, dx = \int \frac{1-\sin x}{\cos^2 x} \, dx \end{equation*}
    \begin{equation*} = \int \sec^2 x\, dx -\int \sec x\tan x\, dx = \tan x -\sec x +C \end{equation*}
  5. \begin{equation*} \int \frac{\sin^6 x+\cos^6 x}{\sin^2 x\cos^2 x} \, dx = \int \frac{(\sin^2 x)^3+(\cos^2 x)^3}{\sin^2 x\cos^2 x} \, dx \end{equation*}
    \begin{equation*} = \int \frac{(\sin^2 x +\cos^2 x)((\sin^4 x)-(\sin^2 x)(\cos^2 x)+(\cos^4 x))}{\sin^2 x\cos^2 x} \, dx \end{equation*}
    \begin{equation*} = \int \frac{1-3\sin^2 x\cos^2 x}{\sin^2 x\cos^2 x} \, dx = \int \csc^2 x\, dx -3\int \sec^2 x\, dx \end{equation*}
    \begin{equation*} = -\cot x -3\tan x +C \end{equation*}
  6. \begin{equation*} \int \frac{\cos x-\cos 2x}{1-\cos x} \, dx = \int \frac{\cos x-(2\cos^2 x -1)}{1-\cos x} \, dx \end{equation*}
    \begin{equation*} = \int \frac{(2\cos x+1)(1-\cos x)}{1-\cos x} \, dx = \int (1+2\cos x) \, dx \end{equation*}
    \begin{equation*} = x +2\sin x +C \end{equation*}
Example 4.1.8.
Find the integration of
  1. \begin{equation*} \int \frac{2^x+3^x}{5^x}\, dx \end{equation*}
  2. \begin{equation*} \int \frac{x^4}{x^2+1} \, dx \end{equation*}
  3. \begin{equation*} \int \frac{x^6-1}{x^2+1} \, dx \end{equation*}
Solution.
  1. \begin{equation*} \int \frac{2^x+3^x}{5^x}\, dx = \int \left(\left(\frac{2}{5}\right)^x +\left(\frac{3}{5}\right)^x\right) \, dx \end{equation*}
    \begin{equation*} = \int \left(\frac{2}{5}\right)^x \, dx +\int \left(\frac{3}{5}\right)^x \, dx \end{equation*}
    \begin{equation*} = \frac{\left(\frac{2}{5}\right)^x}{\ln \left(\frac{2}{5}\right)} +\frac{\left(\frac{3}{5}\right)^x}{\ln \left(\frac{3}{5}\right)} +C \end{equation*}
  2. \begin{equation*} \int \frac{x^4}{x^2+1} \, dx = \int (x^2-1) \, dx +\int \frac{1}{x^2+1} \, dx \end{equation*}
    \begin{equation*} = \frac{x^3}{3}-x+\tan^{-1} x +C \end{equation*}
  3. \begin{equation*} \int \frac{x^6-1}{x^2+1} \, dx = \int \frac{x^6+1-2}{x^2+1} \, dx \end{equation*}
    \begin{equation*} =\int (x^4-x^2+1) \, dx -2 \int \frac{1}{x^2+1} \, dx \end{equation*}
    \begin{equation*} = \frac{x^5}{5}-\frac{x^3}{3}+x-2\tan^{-1} x +C \end{equation*}

Subsubsection 4.1.1.2 Integration by Substitution Method:

Example 4.1.9.
Find the antiderivative (or integral) of the following functions by substitution method.
  1. \begin{equation*} \int \sin (3x+1)\, dx \end{equation*}
  2. \begin{equation*} \int \frac{1}{5-2x} \, dx \end{equation*}
  3. \begin{equation*} \int \left((3x-2)^5+ \frac{1}{(5x+4)^3}\right) \, dx \end{equation*}
  4. \begin{equation*} \int \frac{1}{\sqrt{2x+3}} \, dx \end{equation*}
  5. \begin{equation*} \int e^{5x-2} \, dx \end{equation*}
Solution.
  1. Let
    \begin{equation*} 3x+1=t \end{equation*}
    \begin{equation*} or, \, 3\, dx = dt \end{equation*}
    \begin{equation*} \therefore \, \int \sin (3x+1)\, dx = \int \sin t \cdot \frac{dt}{3} = -\frac{\cos t}{3}+C = -\frac{\cos (3x+1)}{3}+C \end{equation*}
  2. Let
    \begin{equation*} 5-2x=t \end{equation*}
    \begin{equation*} or, \, -2\, dx = dt \end{equation*}
    \begin{equation*} \therefore \, \int \frac{1}{5-2x} \, dx = -\frac{1}{2}\int \frac{dt}{t} = -\frac{1}{2}\log |t| +C = -\frac{1}{2}\log |5-2x| +C \end{equation*}
  3. Let
    \begin{equation*} 3x-2=t \, \text{ and } \, 5x+4=u \end{equation*}
    \begin{equation*} or, \, 3\, dx = dt \, \text{ and } \, 5\, dx = du \end{equation*}
    \begin{equation*} \therefore \, \int \left((3x-2)^5+ \frac{1}{(5x+4)^3}\right) \, dx = \frac{1}{3}\int t^5\, dt +\frac{1}{5}\int \left(\frac{3}{u}\right)^3\, du \end{equation*}
    \begin{equation*} = \frac{1}{3}\frac{t^6}{6} +\frac{1}{5} \frac{u^{-2}}{-2}+C= \frac{(3x-2)^6}{18} -\frac{1}{10(5x+4)^2}+C \end{equation*}
  4. Let \(2x+3=t\) \(or, \, 2\, dx = dt\)
    \begin{equation*} \therefore \, \int \frac{1}{\sqrt{2x+3}} \, dx = \int \frac{1}{\sqrt{t}} \cdot \frac{dt}{2} = \int \frac{t^{-\frac{1}{2}}}{2} \, dt = t^{\frac{1}{2}} +C = \sqrt{2x+3}+C \end{equation*}
  5. Let
    \begin{equation*} 5x-2=t \end{equation*}
    \begin{equation*} or, \, 5\, dx = dt \end{equation*}
    \begin{equation*} \therefore \, \int e^{5x-2} \, dx = \int e^t \cdot \frac{dt}{5} = \frac{e^t}{5}+C = \frac{e^{5x-2}}{5}+C \end{equation*}
Example 4.1.10.
\begin{equation*} \int \frac{\sin (\tan^{-1} x)}{(1+x^2)}\, dx \end{equation*}
Solution.
In this kind of function we need to find the derivative of some function which is already in the problem. For example: Let
\begin{equation*} \tan^{-1} x = t \end{equation*}
differentiate w.r.t."\(t\)", we get -
\begin{equation*} \frac{d}{dx}(\tan^{-1}x) = \frac{d t}{dx} \end{equation*}
\begin{equation*} or, \, \left(\frac{1}{1+x^2}\right)= \frac{d t}{dx} \end{equation*}
\begin{equation*} or, \, \left(\frac{1}{1+x^2}\right)\, dx = dt \end{equation*}
\begin{equation*} Now, \, \int \frac{\sin (\tan^{-1} x)}{(1+x^2)}\, dx = \int \sin t\, dt = -\cos t+C \end{equation*}
\begin{equation*} = -\cos(\tan^{-1}x)+C \end{equation*}
Example 4.1.11.
Integrate the functions:
  1. \begin{equation*} \frac{2x}{1+x^2} \end{equation*}
  2. \begin{equation*} \frac{(\log x)^2}{x} \end{equation*}
  3. \begin{equation*} \frac{1}{x+x\log x} \end{equation*}
Solution.
  1. Let
    \begin{equation*} 1+x^2 = t \end{equation*}
    \begin{equation*} or, \, 0+2x\, dx = dt \end{equation*}
    \begin{equation*} Now, \, \int \frac{2x}{1+x^2} \, dx = \int \frac{dt}{t} = \log t+C \end{equation*}
  2. put
    \begin{equation*} \log x=t \end{equation*}
    \begin{equation*} or, \, \frac{1}{x}\, dx =dt \end{equation*}
    \begin{equation*} \therefore \, \int \frac{(\log x)^2}{x}\, dx = \int t^2\, dt = \frac{t^3}{3}=\frac{1}{3}(\log x)^3+C \end{equation*}
  3. \begin{equation*} \frac{1}{x+x\log x} = \frac{1}{x[1+\log x]} \end{equation*}
    \begin{equation*} \int \frac{1}{x[1+\log x]} \, dx \end{equation*}
    put \(1+\log x =t\)
    \begin{equation*} or, \, \frac{1}{x} \, dx =dt \end{equation*}
    \begin{equation*} or, \, \int \frac{1}{x[1+\log x]} \, dx = \int \frac{dt}{t}= \log |t|+C =\log(1+\log x) +C \end{equation*}

Subsubsection 4.1.1.3 Integration using Partial Fractions:

The method of partial fractions is a technique used to break down a rational function into simpler fractions that can be easily integrated. This method is particularly useful when the degree of the numerator is less than the degree of the denominator. The process involves expressing the rational function as a sum of simpler fractions, which can then be integrated separately.
\begin{equation*} \begin{array}{c|c} \text{ Factor in Denominator } & \text{ Term in Partial Fraction} \\ \hline (ax+b) & \frac{A}{ax+b} \\ (ax+b)^n & \frac{A_1}{(ax+b)} + \frac{A_2}{(ax+b)^2} + \cdots + \frac{A_n}{(ax+b)^n} \\ (ax^2+bx+c) & \frac{Ax+b}{ax^2+bx+c} \\ (ax^2+bx+c)^n & \frac{A_1 x+B_1}{(ax^2+bx+c)} + \frac{A_2 x+B_2}{(ax^2+bx+c)^2}+ \cdots + \frac{A_n x+B_n}{(ax^2+bx+c)^n} \\ \end{array} \text {where } n=1,2,3,\cdots. \end{equation*}
Example 4.1.12.
  1. \begin{equation*} \frac{1}{(x-1)(x+2)} = \frac{A}{x-1} + \frac{B}{x+2} \end{equation*}
  2. \begin{equation*} \frac{1}{(x+3)^2} = \frac{A}{x+3} + \frac{B}{(x+3)^2} \end{equation*}
  3. \begin{equation*} \frac{1}{x^2+4} = \frac{Ax+B}{x^2+4} \end{equation*}
  4. \begin{equation*} \frac{1}{(x^2+4)^2} = \frac{A_1 x+B_1}{x^2+4} + \frac{A_2 x+B_2}{(x^2+4)^2} \end{equation*}
  5. \begin{equation*} \frac{1}{(x-1)(x+2)^2} = \frac{A}{x-1} + \frac{B}{x+2} + \frac{C}{(x+2)^2} \end{equation*}
  6. \begin{equation*} \frac{1}{(x-1)^2(x+2)} = \frac{A}{x-1} + \frac{B}{(x-1)^2} + \frac{C}{x+2} \end{equation*}
  7. \begin{equation*} \frac{1}{3x^3+4x^2-4x} = \frac{1}{x(3x^2+4x-4)} = \frac{1}{x(3x-2)(x+2)} = \frac{A}{x} + \frac{B}{3x-2} + \frac{C}{x+2} \end{equation*}
Example 4.1.13.
  1. \begin{equation*} \int \frac{3x+11}{x^2-x-6} \end{equation*}
  2. \begin{equation*} \int \frac{5x-2}{(x+3)^2} \end{equation*}
Solution.
  1. \begin{equation*} \int \frac{3x+11}{x^2-x-6} \end{equation*}
    • Step 1: Factor the denominator \(x^2 - x - 6\) as: \((x-3)(x+2)\)
    • Step 2: Partial fraction decomposition of the function \(\frac{3x+11}{(x-3)(x+2)}\) is: \(\frac{A}{x-3} + \frac{B}{x+2}\)
    • Step 3: Find the values of A and B by multiplying both sides of the equation by the denominator \((x-3)(x+2)\) and then equating the coefficients of the powers of x on both sides of the equation. We get: \(A(x+2) + B(x-3) = 3x + 11\)
    • Expand:
      \begin{equation*} 3x+11=Ax+2A+Bx-3B=(A+B)x+(2A-3B) \end{equation*}
      Equating the coefficients of x and the constant term, we get: \(A+B=3\) and \(2A-3B=11\) Solving these equations, we get: \(A=4\) and \(B=-1\)
    • Step 4: Now, we can write the function as: \(\frac{3x+11}{(x-3)(x+2)} = \frac{4}{x-3} - \frac{1}{x+2}\)
    • Step 5: Now, we can integrate the function as:
      \begin{equation*} \int \frac{3x+11}{x^2-x-6} \, dx = \int \left(\frac{4}{x-3} - \frac{1}{x+2}\right) \, dx \end{equation*}
      \begin{equation*} = 4\int \frac{1}{x-3} \, dx - \int \frac{1}{x+2} \, dx = 4\log |x-3| - \log |x+2| +C \end{equation*}
  2. \begin{equation*} \int \frac{5x-2}{(x+3)^2} \end{equation*}
    • Step 1: Partial fraction decomposition of the function \(\frac{5x-2}{(x+3)^2}\) is: \(\frac{A}{x+3} + \frac{B}{(x+3)^2}\)
    • Step 2: Find the values of A and B by multiplying both sides of the equation by the denominator \((x+3)^2\) and then equating the coefficients of the powers of x on both sides of the equation. We get: \(A(x+3) + B = 5x - 2\)
    • Step 3: Expand:
      \begin{equation*} 5x-2=Ax+3A+B \end{equation*}
      Equating the coefficients of x and the constant term, we get: \(A=5\) and \(3A+B=-2\) Solving these equations, we get: \(A=5\) and \(B=-17\)
    • Step 4: Now, we can write the function as: \(\frac{5x-2}{(x+3)^2} = \frac{5}{x+3} - \frac{17}{(x+3)^2}\)
    • Step 5: Now, we can integrate the function as:
      \begin{equation*} \int \frac{5x-2}{(x+3)^2} \, dx = \int \left(\frac{5}{x+3} - \frac{17}{(x+3)^2}\right) \, dx \end{equation*}
      \begin{equation*} = 5\int \frac{1}{x+3} \, dx - 17\int \frac{1}{(x+3)^2} \, dx = 5\log |x+3| + \frac{17}{x+3} +C \end{equation*}

Subsubsection 4.1.1.4 Integration by Parts:

The integration by parts is a method of integration which is used to integrate the product of two functions. The formula for integration by parts is given by:
\begin{equation*} \int u \, v\, dx = u\, \int v \, dx - \int \{\frac{du}{dx}\int v\, dx \}\, dx \end{equation*}
where \(u\) and \(v\) are two functions of \(x\text{.}\)
A commonly used mnemonics for choosing the first function and the second function in integration by parts is the ILATE rule (choose u in this priority order): Inverse trigonometric, Logarithmic, Algebraic (polynomials), Trigonometric, Exponential.
Example 4.1.14.
  1. \begin{equation*} \int x \sin x \, dx \end{equation*}
  2. \begin{equation*} \int x^2 e^x \, dx \end{equation*}
  3. \begin{equation*} \int x \log x \, dx \end{equation*}
  4. \begin{equation*} \int e^x \sin x \, dx \end{equation*}
  5. \begin{equation*} \int x^2 \cos x \, dx \end{equation*}
Solution.
  1. Let \(u=x\) and \(dv=\sin x \, dx\)
    \begin{equation*} or, \, du=dx \, \text{ and } \, v=-\cos x \end{equation*}
    \begin{equation*} \therefore \, \int x \sin x \, dx = -x\cos x +\int \cos x \, dx = -x\cos x +\sin x +C \end{equation*}
  2. Let \(u=x^2\) and \(dv=e^x \, dx\)
    \begin{equation*} or, \, du=2x\, dx \, \text{ and } \, v=e^x \end{equation*}
    \begin{equation*} \therefore \, \int x^2 e^x \, dx = x^2 e^x - 2\int xe^x\, dx \end{equation*}
    Now, we need to apply integration by parts again to evaluate the integral \(\int xe^x\, dx\text{.}\) Let \(u=x\) and \(dv=e^x\, dx\)
    \begin{equation*} or, \, du=dx \, \text{ and } \, v=e^x \end{equation*}
    \begin{equation*} \therefore \, 2\int xe^x\, dx = 2(xe^x -\int e^x\, dx) = 2xe^x - 2e^x +C \end{equation*}
    Now we can write the final answer as:
    \begin{equation*} \int x^2 e^x \, dx = x^2 e^x - (2xe^x - 2e^x) +C = (x^2 - 2x + 2)e^x +C \end{equation*}
  3. Let \(u=\log x\) and \(dv=x\, dx\)
    \begin{equation*} or, \, du=\frac{1}{x}\, dx \, \text{ and } \, v=\frac{x^2}{2} \end{equation*}
    \begin{equation*} \therefore \, \int x \log x \, dx = \frac{x^2}{2} \log x - \int \frac{x^2}{2} \cdot \frac{1}{x} \, dx = \frac{x^2}{2} \log x - \frac{1}{2}\int x \, dx \end{equation*}
    \begin{equation*} = \frac{x^2}{2} \log x - \frac{x^2}{4} +C \end{equation*}
  4. Let \(u=\sin x\) and \(dv=e^x \, dx\)
    \begin{equation*} or, \, du=\cos x\, dx \, \text{ and } \, v=e^x \end{equation*}
    \begin{equation*} \therefore \, \int e^x \sin x \, dx = -e^x \sin x + \int e^x \cos x \, dx \end{equation*}
    Now, we need to apply integration by parts again to evaluate the integral \(\int e^x \cos x \, dx\text{.}\) Let \(u=\cos x\) and \(dv=e^x\, dx\)
    \begin{equation*} or, \, du=-\sin x\, dx \, \text{ and } \, v=e^x \end{equation*}
    \begin{equation*} \therefore \, \int e^x \cos x \, dx = e^x \cos x + \int e^x \sin x \, dx \end{equation*}
    Now we can write the final answer as:
    \begin{equation*} \int e^x \sin x \, dx = -e^x \sin x + e^x \cos x + \int e^x \sin x \, dx \end{equation*}
    \begin{equation*} \Rightarrow \, 2\int e^x \sin x \, dx = e^x (\cos x - \sin x) +C \end{equation*}
    \begin{equation*} \therefore \, \int e^x \sin x \, dx = \frac{e^x (\cos x - \sin x)}{2} +C \end{equation*}
  5. Let \(u=x^2\) and \(dv=\cos x \, dx\)
    \begin{equation*} or, \, du=2x\, dx \, \text{ and } \, v=\sin x \end{equation*}
    \begin{equation*} \therefore \, \int x^2 \cos x \, dx = x^2 \sin x - 2\int x \sin x \, dx \end{equation*}
    Now, we need to apply integration by parts again to evaluate the integral \(\int x \sin x \, dx\text{.}\) Let \(u=x\) and \(dv=\sin x\, dx\)
    \begin{equation*} or, \, du=dx \, \text{ and } \, v=-\cos x \end{equation*}
    \begin{equation*} \therefore \, \int x \sin x \, dx = -x \cos x + \int \cos x \, dx = -x \cos x + \sin x +C \end{equation*}
    Now we can write the final answer as:
    \begin{equation*} \int x^2 \cos x \, dx = x^2 \sin x - 2(-x \cos x + \sin x) +C \end{equation*}
    \begin{equation*} = x^2 \sin x + 2x \cos x - 2\sin x +C \end{equation*}