100 Integrals (21-30) @blackpenredpen

Read Post

This post document the solutions to 100 integrals (Problem 21 to 30) solved by @blackpenredpen in his 5h++ marathon endeavor.

21. \(\int \mathrm{sin}^{3}(x)\mathrm{cos}^{2}(x) \ dx\)

\[\begin{aligned} \int \mathrm{sin}^{3}(x)\mathrm{cos}^{2}(x) \ dx &= \int \mathrm{sin}^{2}(x)\mathrm{sin}(x)\mathrm{cos}^{2}(x)\ dx\\ &= \int (1 - \mathrm{cos}^{2}(x))\mathrm{cos}^{2}(x)\mathrm{sin}(x)\ dx \end{aligned}\]

Trig Substitution:

\[\begin{aligned} u &= \mathrm{cos}(x)\\ du &= -\mathrm{sin}(x)\ dx\\ dx &= -\frac{du}{\mathrm{sin}(x)} \end{aligned}\] \[\begin{aligned} \int \Big(1 - \mathrm{cos}^{2}(x)\Big)\mathrm{cos}^{2}(x)\mathrm{sin}(x)\ dx &= -\int (1 - u^{2}) - u^{2}\ du\\ &= - \int u^{2} - u^{4} \ du\\ &= -\frac{1}{3}\mathrm{cos}^{3}(x) + \frac{1}{5}\mathrm{cos}^{5}(x) + C \end{aligned}\]

22. \(\int \frac{1}{x^{2}\sqrt{x^{2} + 1}} \ dx\)

\[\begin{aligned} \int \frac{1}{x^{2}\sqrt{x^{2} + 1}} \ dx &= \int \frac{1}{x^{2}\sqrt{x^{2}(1 + x^{-2})}} \ dx\\ &= \int \frac{1}{x^{2}\sqrt{x^{2}}\sqrt{(1 + x^{-2})}} \ dx\\ &= \int \frac{1}{x^{3}\sqrt{1 + x^{-2}}} \ dx\\ &= \int \frac{x^{-3}}{\sqrt{1 + x^{-2}}}\ dx \end{aligned}\]

Trig Substitution:

\[\begin{aligned} u &= 1 + x^{-2}\\ du &= -2x^{-3}\ dx\\ dx &= -\frac{du}{2x^{-3}}\ dx \end{aligned}\] \[\begin{aligned} \int \frac{x^{-3}}{\sqrt{1 + x^{-2}}}\ dx &= \int \frac{x^{-3}}{\sqrt{u}}\frac{du}{-2x^{-3}}\\ &= -\frac{1}{2}\int u^{-\frac{1}{2}}\ du\\ &= -\frac{1}{2}\times\frac{u^{-\frac{1}{2} + 1}}{-\frac{1}{2} + 1} + C\\ &= -\frac{1}{2}\times\frac{2}{1}u^{\frac{1}{2}} + C\\ &= -\sqrt{1 + x^{-2}} + C \end{aligned}\]

23. \(\int \mathrm{sin}(x)\mathrm{sec}(x)\mathrm{tan}(x)\ dx\)

\[\begin{aligned} \int \mathrm{sin}(x)\mathrm{sec}(x)\mathrm{tan}(x)\ dx &= \int \mathrm{sin}(x)\frac{1}{\mathrm{cos}(x)}\mathrm{tan}(x)\ dx\\ &= \int \mathrm{tan}(x)\mathrm{tan}(x)\ dx\\ &= \int \mathrm{tan}^{2}(x)\ dx \end{aligned}\]

Basic Pythagorean Identity:

\[\begin{aligned} \mathrm{sin}^{2}(x) + \mathrm{cos}^{2}(x) &= 1\\ \frac{\mathrm{sin}^{2}(x)}{\mathrm{cos}^{2}(x)} + \frac{\mathrm{cos}^{2}(x)}{\mathrm{cos}^{2}(x)} &= \frac{1}{\mathrm{cos}^{2}(x)}\\ \mathrm{tan}^{2}(x) + 1 &= \mathrm{sec}^{2}(x) \end{aligned}\] \[\begin{aligned} \int \mathrm{tan}^{2}(x)\ dx &= \int \mathrm{sec}^{2}(x) - 1\ dx &= \mathrm{tan}(x) - x + C \end{aligned}\]

24. \(\int \mathrm{sec}^{3}(x)\ dx\)

\[\begin{aligned} \int \mathrm{sec}^{3}(x)\ dx \end{aligned}\]

Integration by parts:

\[\begin{aligned} u &= \mathrm{sec}(x)\\ dv &= \mathrm{sec}^{2}(x)\ dx\\ v &= \mathrm{tan}(x)\\ du &= \mathrm{sec}(x)\mathrm{tan}(x)\ dx\\ \int u \ dv &= uv - \int v\ du\\ &= \mathrm{sec}(x)\mathrm{tan}(x) - \int \mathrm{sec}(x)\mathrm{tan}^{2}(x)\ dx \end{aligned}\] \[\begin{aligned} \mathrm{sec}(x)\mathrm{tan}(x) - \int \mathrm{sec}(x)\mathrm{tan}^{2}(x)\ dx &= \mathrm{sec}(x)\mathrm{tan}(x) - \int \mathrm{sec}(x)(\mathrm{sec}^{2}(x) - 1)\ dx\\ &= \mathrm{sec}(x)\mathrm{tan}(x) - \int \mathrm{sec}^{3}(x) + \int \mathrm{sec}(x)\ dx\\ \int \mathrm{sec}^{3}(x)\ dx + \int \mathrm{sec}^{3}(x)\ dx &= \mathrm{sec}(x)\mathrm{tan}(x) + \int \mathrm{sec}(x)\ dx\\ 2\int \mathrm{sec}^{3}(x)\ dx &= \mathrm{sec}(x)\mathrm{tan}(x) + \mathrm{ln}|\mathrm{sec}(x) + \mathrm{tan}(x)| + C\\ \int \mathrm{sec}^{3}(x)\ dx &= \frac{1}{2}\mathrm{sec}(x)\mathrm{tan}(x) + \frac{1}{2}\mathrm{ln}|\mathrm{sec}(x) + \mathrm{tan}(x)| + C_{1}\\ \end{aligned}\]

25. \(\int \frac{1}{x\sqrt{9x^{2} - 1}}\ dx\)

\[\begin{aligned} \int \frac{1}{x\sqrt{9x^{2} - 1}}\ dx &= \int \frac{1}{x\sqrt{(3x)^{2} - 1}}\ dx \end{aligned}\]

Trig Substitution:

\[\begin{aligned} \mathrm{sec}(\theta) &= 3x\\ \frac{1}{3}\mathrm{sec}(\theta) &= x\\ \frac{1}{3}\mathrm{sec}(\theta)\mathrm{tan}(\theta)\ d\theta &= dx \end{aligned}\] \[\begin{aligned} \int \frac{1}{x\sqrt{(3x)^{2} - 1}}\ dx &= \int \frac{1}{\frac{1}{3}\mathrm{sec}(\theta)\sqrt{\mathrm{sec}^{2}(theta) - 1}} \frac{1}{3}\mathrm{sec}(\theta)\mathrm{tan}(\theta)\ d\theta\\ &= \int \frac{1}{\frac{1}{3}\mathrm{sec}(\theta)\sqrt{\mathrm{tan}^{2}(theta)}\frac{1}{3}\mathrm{sec}(\theta)\mathrm{tan}(\theta)\ d\theta}\\ &= \int \frac{1}{\frac{1}{3}\mathrm{sec}(\theta)\mathrm{tan}(theta)\frac{1}{3}\mathrm{sec}(\theta)\mathrm{tan}(\theta)\ d\theta}\\ &= \int 1\ d\theta\\ &= \theta + C\\ &= \mathrm{sec}^{-1}(3x) + C \end{aligned}\]

26. \(\int \mathrm{cos}(\sqrt{x})\ dx\)

Trig Substitution:

\[\begin{aligned} u &= \sqrt{x}\\ du &= \frac{1}{2}x^{-\frac{1}{2}}\ dx\\ &= \frac{1}{2u}\ dx\\ dx &= 2u\ du \end{aligned}\] \[\begin{aligned} \int \mathrm{cos}(\sqrt{x})\ dx &= \int \mathrm{cos}(u)2u\ du \end{aligned}\]

Integration by parts:

\[\begin{aligned} u &= 2u\\ dv &= \mathrm{cos}(u)\ du\\ v &= \mathrm{sin}(u)\\ du &= 2\\ \int u \ dv &= uv - \int v\ du\\ &= 2u\times\mathrm{sin}(u) - \int 2\mathrm{sin}(u)\ du\\ &= 2u\times\mathrm{sin}(u) + 2 \mathrm{cos}(u) + C \end{aligned}\] \[\begin{aligned} \int \mathrm{cos}(u)2u\ du &= 2u\mathrm{sin}(u) + 2 \mathrm{cos}(u) + C\\ &= 2\sqrt{x}\mathrm{sin}(\sqrt{x}) + 2 \mathrm{cos}(\sqrt{x}) + C \end{aligned}\]

27. \(\int \mathrm{csc}(x) \ dx\)

\[\begin{aligned} \int \mathrm{csc}(x) \ dx &= \int \frac{\mathrm{csc}(x)\Big(\mathrm{csc}(x) - \mathrm{cot}(x)\Big)}{\mathrm{csc}(x) - \mathrm{cot}(x)}\ dx \end{aligned}\]

Trig Substitution:

\[\begin{aligned} u &= \mathrm{csc}(x) - \mathrm{cot}(x)\\ du &= \Big(-\mathrm{csc}(x)\mathrm{cot}(x) + \mathrm{csc}^{2}(x)\Big)\ dx\\ &= \mathrm{csc}(x)\Big(-\mathrm{cot}(x) + \mathrm{csc}(x)\Big)\ dx dx &= \frac{du}{\mathrm{csc}(x)(\mathrm{csc}(x) - \mathrm{cot}(x))} \end{aligned}\] \[\begin{aligned} \int \frac{\mathrm{csc}(x)\Big(\mathrm{csc}(x) - \mathrm{cot}(x)\Big)}{\mathrm{csc}(x) - \mathrm{cot}(x)}\ dx &= \int \frac{\mathrm{csc}(x)\Big(\mathrm{csc}(x) - \mathrm{cot}(x)\Big)}{\mathrm{csc}(x) - \mathrm{cot}(x)}\frac{du}{\mathrm{csc}(x)\Big(\mathrm{csc}(x) - \mathrm{cot}(x)\Big)}\\ &= \int \frac{1}{\mathrm{csc}(x) - \mathrm{cot}(x)}\ dx\\ &= \mathrm{ln}|\mathrm{csc}(x) - \mathrm{cot}(x)| + C \end{aligned}\]

28. \(\int \sqrt{x^{2} + 4x + 13} \ dx\)

\[\begin{aligned} \int \sqrt{x^{2} + 4x + 13} \ dx &= \int \sqrt{x^{2} + 4x + 4 - 4 + 13} \ dx\\ &= \int \sqrt{x^{2} + 4x + 4 - 9} \ dx\\ &= \int \sqrt{(x + 2)^{2} + 3^{2}}\ dx \end{aligned}\]

Trig Substitution:

\[\begin{aligned} x + 2 &= 3\mathrm{tan}(\theta)\\ dx &= 3 \mathrm{sec}^{2}(\theta)\ d\theta \end{aligned}\] \[\begin{aligned} \int \sqrt{(x + 2)^{2} + 3^{2}}\ dx &= \int \sqrt{\Big(3 \mathrm{tan}(\theta)\Big)^{2} + 3^{2}} \times 3 \mathrm{sec}^{2}(\theta)d \theta\\ &= \int 3\sqrt{\mathrm{tan}^{2}(\theta) + 1} \times 3 \mathrm{sec}^{2}(\theta)d \theta\\ &= \int 3\sqrt{\mathrm{sec}^{2}(\theta)} \times 3 \mathrm{sec}^{2}(\theta)d \theta\\ &= 9 \int \mathrm{sec}^{3}(\theta)d \theta \end{aligned}\]

We already solved \(\int \mathrm{sec}^{3}\ dx\) in 24.

\[\begin{aligned} 9 \int \mathrm{sec}^{3}(\theta)d \theta &= 9\Big( \frac{1}{2}\mathrm{sec}(\theta)\mathrm{tan}(\theta) + \frac{1}{2} \mathrm{ln}|\mathrm{sec}(\theta) + \mathrm{tan}(\theta)| \Big) \end{aligned}\]

We know that:

\[\begin{aligned} x + 2 &= 3\mathrm{tan}(\theta)\\ \mathrm{tan}(\theta) &= \frac{x + 2}{3} \end{aligned}\]

Picture a triangle with opposite side: \(x+2\) and adjacent side: $$3. Then the hypotenuse is:

\[\begin{aligned} (x + 2)^{2} + 3^{2} &= x^{2} + 2x + 4 + 9\\ &= x^{2} + 2x + 13 \end{aligned}\]

Therefore:

\[\begin{aligned} \mathrm{tan}(\theta) &= \frac{\text{opposite}}{\text{adjacent}}\\[5pt] &= \frac{x + 2}{3}\\[5pt] \mathrm{sec}(\theta) &= \frac{\text{hypotenuse}}{\text{adjacent}}\\[5pt] &= \frac{x^{2} + 2x + 13}{3} \end{aligned}\] \[\begin{aligned} 9\Big( \frac{1}{2}\mathrm{sec}(\theta)\mathrm{tan}(\theta) + \frac{1}{2} \mathrm{ln}|\mathrm{sec}(\theta) + \mathrm{tan}(\theta)| \Big) &= 9\Big( \frac{1}{2}\times\frac{\sqrt{x^{2} + 2x + 13}}{3}\times\frac{x + 2}{3} + \frac{1}{2} \mathrm{ln}\Big(\sqrt{\frac{x^{2} + 2x + 13}{3}} + \frac{x + 2}{3}\Big) \Big) + C\\ &= \frac{1}{2}(x + 2)\sqrt{x^{2} + 4x + 13} + \frac{9}{2}\mathrm{ln}(\sqrt{x^{2} + 4x + 13} + x + 2) - \frac{1}{2}\mathrm{ln}\Big(\frac{1}{3}\Big) + C\\ &= \frac{1}{2}(x + 2)\sqrt{x^{2} + 4x + 13} + \frac{9}{2}\mathrm{ln}(\sqrt{x^{2} + 4x + 13} + x + 2) + C_{1} \end{aligned}\]

29. \(\int e^{2x}\mathrm{cos}(x) \ dx\)

\[\begin{aligned} \int e^{2x}\mathrm{cos}(x) \ dx \end{aligned}\]

Integration by parts:

\[\begin{aligned} u &= e^{2x}\\ dv &= \mathrm{cos}(x) \ dx\\ v &= \mathrm{sin}(x)\ dx\\ du &= 2e^{x}\ dx\\ \int u \ dv &= uv - \int v\ du\\ &= e^{2x}\mathrm{sin}(x) - 2\int \mathrm{sin}(x)e^{2x}\ dx\\[5pt] u &= 2e^{2x}\\ dv &= \mathrm{sin}(x) \ dx\\ v &= -\mathrm{cos}(x)\ dx\\ du &= 4e^{2x}\ dx\\ \int u \ dv &= uv - \int v\ du\\ &= -2e^{2x}\mathrm{cos}(x) + 4\int e^{2x}\mathrm{cos}(x)\ dx \end{aligned}\] \[\begin{aligned} \int e^{2x}\mathrm{cos}(x) \ dx &= e^{x}\mathrm{sin}(x) - \int \mathrm{sin}(x)e^{x}\ dx\\ &= e^{x}\mathrm{sin}(x) + 2e^{2x}\mathrm{cos}(x) - 4\int e^{2x}\mathrm{cos}(x)\ dx\\ 5\int e^{2x}\mathrm{cos}(x) \ dx &= e^{x}\mathrm{sin}(x) + 2e^{2x}\mathrm{cos}(x) + C\\ \int e^{2x}\mathrm{cos}(x) \ dx &= \frac{1}{5}e^{x}\mathrm{sin}(x) + \frac{2}{5}e^{2x}\mathrm{cos}(x) + C_{1}\\ \end{aligned}\]

30. \(\int_{x = 3}^{x = 5} (x - 3)^{9} \ dx\)

\[\begin{aligned} \int_{x = 3}^{x = 5} (x - 3)^{9} \ dx \end{aligned}\]

Trig Substitution:

\[\begin{aligned} u &= x - 3 du &= dx\\ u_{2} &= 5 - 3\\ &= 2\\ u_{1} &= 3 - 3\\ &= 0 \end{aligned}\] \[\begin{aligned} \int_{u = 0}^{u = 2} u^{9} \ du &= \frac{1}{10}u^{10}\Big|_{u = 0}^{u = 2}\\ &= \frac{1}{10}2^{10} - \frac{1}{10}0^{10}\\ &= \frac{1024}{10}\\ &= 102.4 \end{aligned}\]

\(\)

\[\begin{aligned} \int \ dx \end{aligned}\]

See Also

Problem 1 to 10

Problem 11 to 20

References

100 integrals (world record?) @blackpenredpen

Jason

Passionate software developer with a background in CS, Math, and Statistics. Love challenges and solving hard quantitative problems with interest in the area of finance and ML.