Solution:
Key idea: First substitute to remove x 2 x^2 x 2 , e x e^x e x , sin x \sin x sin x or log x \log x log x , so that the integrand becomes a rational function of t t t with a quadratic denominator; then complete the square or use partial fractions.
Step 1 — Part (i): substitute t = x 2 t = x^2 t = x 2 .
We put x 2 = t x^2 = t x 2 = t , so x d x = d t 2 x\,dx = \dfrac{dt}{2} x d x = 2 d t and x 4 = t 2 x^4 = t^2 x 4 = t 2 .
∫ x d x x 4 + 2 x 2 + 3 = 1 2 ∫ d t t 2 + 2 t + 3 \int \dfrac{x\,dx}{x^4+2x^2+3} = \dfrac{1}{2}\int \dfrac{dt}{t^2+2t+3} ∫ x 4 + 2 x 2 + 3 x d x = 2 1 ∫ t 2 + 2 t + 3 d t
Step 2 — Part (i): complete the square and integrate.
Adding and subtracting 1 gives t 2 + 2 t + 3 = ( t + 1 ) 2 + ( 2 ) 2 t^2+2t+3 = (t+1)^2+(\sqrt{2})^2 t 2 + 2 t + 3 = ( t + 1 ) 2 + ( 2 ) 2 , the tan − 1 \tan^{-1} tan − 1 form with a = 2 a = \sqrt{2} a = 2 .
1 2 ∫ d t ( t + 1 ) 2 + ( 2 ) 2 = 1 2 2 tan − 1 t + 1 2 + C = 1 2 2 tan − 1 x 2 + 1 2 + C \begin{aligned}
\dfrac{1}{2}\int \dfrac{dt}{(t+1)^2+(\sqrt{2})^2} &= \dfrac{1}{2\sqrt{2}}\tan^{-1}\dfrac{t+1}{\sqrt{2}} + C \\
&= \dfrac{1}{2\sqrt{2}}\tan^{-1}\dfrac{x^2+1}{\sqrt{2}} + C
\end{aligned} 2 1 ∫ ( t + 1 ) 2 + ( 2 ) 2 d t = 2 2 1 tan − 1 2 t + 1 + C = 2 2 1 tan − 1 2 x 2 + 1 + C
Step 3 — Part (ii): substitute t = e x t = e^x t = e x .
We put e x = t e^x = t e x = t , so e x d x = d t e^x\,dx = dt e x d x = d t , and complete the square: adding and subtracting 9 gives t 2 + 6 t + 5 = ( t + 3 ) 2 − 2 2 t^2+6t+5 = (t+3)^2-2^2 t 2 + 6 t + 5 = ( t + 3 ) 2 − 2 2 .
∫ e x d x e 2 x + 6 e x + 5 = ∫ d t ( t + 3 ) 2 − 2 2 \int \dfrac{e^x\,dx}{e^{2x}+6e^x+5} = \int \dfrac{dt}{(t+3)^2-2^2} ∫ e 2 x + 6 e x + 5 e x d x = ∫ ( t + 3 ) 2 − 2 2 d t
Step 4 — Part (ii): integrate with X = t + 3 X = t+3 X = t + 3 , a = 2 a = 2 a = 2 .
This is the X 2 − a 2 X^2-a^2 X 2 − a 2 form with 2 a = 4 2a = 4 2 a = 4 ; then X − a = t + 1 X-a = t+1 X − a = t + 1 and X + a = t + 5 X+a = t+5 X + a = t + 5 , both positive because t = e x > 0 t = e^x > 0 t = e x > 0 .
∫ d t ( t + 3 ) 2 − 2 2 = 1 4 log ∣ t + 1 t + 5 ∣ + C = 1 4 log e x + 1 e x + 5 + C \begin{aligned}
\int \dfrac{dt}{(t+3)^2-2^2} &= \dfrac{1}{4}\log\left|\dfrac{t+1}{t+5}\right| + C \\
&= \dfrac{1}{4}\log\dfrac{e^x+1}{e^x+5} + C
\end{aligned} ∫ ( t + 3 ) 2 − 2 2 d t = 4 1 log t + 5 t + 1 + C = 4 1 log e x + 5 e x + 1 + C
Step 5 — Part (iii): substitute t = sin x t = \sin x t = sin x .
We put sin x = t \sin x = t sin x = t , so cos x d x = d t \cos x\,dx = dt cos x d x = d t .
Since ( 2 − t ) − ( 1 − t ) = 1 (2-t)-(1-t) = 1 ( 2 − t ) − ( 1 − t ) = 1 , the fraction splits as 1 1 − t − 1 2 − t \dfrac{1}{1-t}-\dfrac{1}{2-t} 1 − t 1 − 2 − t 1 .
∫ cos x d x ( 1 − sin x ) ( 2 − sin x ) = ∫ ( 1 1 − t − 1 2 − t ) d t = − log ∣ 1 − t ∣ + log ∣ 2 − t ∣ + C = log ∣ 2 − sin x 1 − sin x ∣ + C \begin{aligned}
\int \dfrac{\cos x\,dx}{(1-\sin x)(2-\sin x)} &= \int \left(\dfrac{1}{1-t}-\dfrac{1}{2-t}\right)dt \\
&= -\log|1-t|+\log|2-t| + C \\
&= \log\left|\dfrac{2-\sin x}{1-\sin x}\right| + C
\end{aligned} ∫ ( 1 − sin x ) ( 2 − sin x ) cos x d x = ∫ ( 1 − t 1 − 2 − t 1 ) d t = − log ∣1 − t ∣ + log ∣2 − t ∣ + C = log 1 − sin x 2 − sin x + C
This is the same as log ∣ sin x − 2 sin x − 1 ∣ + C \log\left|\dfrac{\sin x-2}{\sin x-1}\right| + C log sin x − 1 sin x − 2 + C ; it holds wherever sin x ≠ 1 \sin x \ne 1 sin x = 1 .
Step 6 — Part (iv): substitute t = log x t = \log x t = log x .
The integrand needs x > 0 x > 0 x > 0 . We put log x = t \log x = t log x = t , so d x x = d t \dfrac{dx}{x} = dt x d x = d t , and complete the square: t 2 + 7 t + 10 = ( t + 7 2 ) 2 − 49 4 + 10 t^2+7t+10 = \left(t+\dfrac{7}{2}\right)^2-\dfrac{49}{4}+10 t 2 + 7 t + 10 = ( t + 2 7 ) 2 − 4 49 + 10 .
t 2 + 7 t + 10 = ( t + 7 2 ) 2 − 9 4 = ( t + 7 2 ) 2 − ( 3 2 ) 2 \begin{aligned}
t^2+7t+10 &= \left(t+\dfrac{7}{2}\right)^2-\dfrac{9}{4} \\
&= \left(t+\dfrac{7}{2}\right)^2-\left(\dfrac{3}{2}\right)^2
\end{aligned} t 2 + 7 t + 10 = ( t + 2 7 ) 2 − 4 9 = ( t + 2 7 ) 2 − ( 2 3 ) 2
Step 7 — Part (iv): integrate with X = t + 7 2 X = t+\dfrac{7}{2} X = t + 2 7 , a = 3 2 a = \dfrac{3}{2} a = 2 3 .
This is the X 2 − a 2 X^2-a^2 X 2 − a 2 form with 2 a = 3 2a = 3 2 a = 3 ; then X − a = t + 2 X-a = t+2 X − a = t + 2 and X + a = t + 5 X+a = t+5 X + a = t + 5 .
∫ d t t 2 + 7 t + 10 = 1 3 log ∣ t + 2 t + 5 ∣ + C = 1 3 log ∣ log x + 2 log x + 5 ∣ + C \begin{aligned}
\int \dfrac{dt}{t^2+7t+10} &= \dfrac{1}{3}\log\left|\dfrac{t+2}{t+5}\right| + C \\
&= \dfrac{1}{3}\log\left|\dfrac{\log x+2}{\log x+5}\right| + C
\end{aligned} ∫ t 2 + 7 t + 10 d t = 3 1 log t + 5 t + 2 + C = 3 1 log log x + 5 log x + 2 + C
Step 8 — Part (v): simplify the denominator.
We use cos 2 θ = 1 − sin 2 θ \cos^2\theta = 1-\sin^2\theta cos 2 θ = 1 − sin 2 θ ; the denominator becomes a perfect square in sin θ \sin\theta sin θ .
5 − cos 2 θ − 4 sin θ = 5 − ( 1 − sin 2 θ ) − 4 sin θ = ( sin θ − 2 ) 2 \begin{aligned}
5-\cos^2\theta-4\sin\theta &= 5-(1-\sin^2\theta)-4\sin\theta \\
&= (\sin\theta-2)^2
\end{aligned} 5 − cos 2 θ − 4 sin θ = 5 − ( 1 − sin 2 θ ) − 4 sin θ = ( sin θ − 2 ) 2
Step 9 — Part (v): substitute t = sin θ t = \sin\theta t = sin θ and split.
We put sin θ = t \sin\theta = t sin θ = t , so cos θ d θ = d t \cos\theta\,d\theta = dt cos θ d θ = d t , and write 3 t − 2 = 3 ( t − 2 ) + 4 3t-2 = 3(t-2)+4 3 t − 2 = 3 ( t − 2 ) + 4 .
∫ ( 3 t − 2 ) d t ( t − 2 ) 2 = ∫ ( 3 t − 2 + 4 ( t − 2 ) 2 ) d t = 3 log ∣ t − 2 ∣ − 4 t − 2 + C = 3 log ( 2 − sin θ ) + 4 2 − sin θ + C \begin{aligned}
\int \dfrac{(3t-2)\,dt}{(t-2)^2} &= \int \left(\dfrac{3}{t-2}+\dfrac{4}{(t-2)^2}\right)dt \\
&= 3\log|t-2|-\dfrac{4}{t-2} + C \\
&= 3\log(2-\sin\theta)+\dfrac{4}{2-\sin\theta} + C
\end{aligned} ∫ ( t − 2 ) 2 ( 3 t − 2 ) d t = ∫ ( t − 2 3 + ( t − 2 ) 2 4 ) d t = 3 log ∣ t − 2∣ − t − 2 4 + C = 3 log ( 2 − sin θ ) + 2 − sin θ 4 + C
Here ∣ sin θ − 2 ∣ = 2 − sin θ |\sin\theta-2| = 2-\sin\theta ∣ sin θ − 2∣ = 2 − sin θ because sin θ ≤ 1 \sin\theta \le 1 sin θ ≤ 1 .
Therefore, (i) 1 2 2 tan − 1 x 2 + 1 2 + C \dfrac{1}{2\sqrt{2}}\tan^{-1}\dfrac{x^2+1}{\sqrt{2}} + C 2 2 1 tan − 1 2 x 2 + 1 + C ; (ii) 1 4 log e x + 1 e x + 5 + C \dfrac{1}{4}\log\dfrac{e^x+1}{e^x+5} + C 4 1 log e x + 5 e x + 1 + C ; (iii) log ∣ 2 − sin x 1 − sin x ∣ + C \log\left|\dfrac{2-\sin x}{1-\sin x}\right| + C log 1 − sin x 2 − sin x + C ; (iv) 1 3 log ∣ log x + 2 log x + 5 ∣ + C \dfrac{1}{3}\log\left|\dfrac{\log x+2}{\log x+5}\right| + C 3 1 log log x + 5 log x + 2 + C for x > 0 x > 0 x > 0 ; (v) 3 log ( 2 − sin θ ) + 4 2 − sin θ + C 3\log(2-\sin\theta)+\dfrac{4}{2-\sin\theta} + C 3 log ( 2 − sin θ ) + 2 − sin θ 4 + C .