It is easy to compute the integral ∫ e x d x \int{{e}}^{{x}}{d}{x} ∫ e x d x , but how to handle integrals like ∫ x e x d x \int{x}{{e}}^{{x}}{d}{x} ∫ x e x d x ? In general, if you have under the integral sign a product of functions that can be easily integrated separately, you should use integration by parts.
Formula for integration by parts : ∫ u d v = u v − ∫ v d u \int{u}{d}{v}={u}{v}-\int{v}{d}{u} ∫ u d v = u v − ∫ v d u .
Proof
Using the product rule , we have that ( f ( x ) g ( x ) ) ′ = f ′ ( x ) g ( x ) + f ( x ) g ′ ( x ) {\left({f{{\left({x}\right)}}}{g{{\left({x}\right)}}}\right)}'={f{'}}{\left({x}\right)}{g{{\left({x}\right)}}}+{f{{\left({x}\right)}}}{g{'}}{\left({x}\right)} ( f ( x ) g ( x ) ) ′ = f ′ ( x ) g ( x ) + f ( x ) g ′ ( x ) .
Integrating both sides gives: ∫ ( f ( x ) g ( x ) ) ′ d x = ∫ ( f ′ ( x ) g ( x ) + f ( x ) g ′ ( x ) ) d x \int{\left({f{{\left({x}\right)}}}{g{{\left({x}\right)}}}\right)}'{d}{x}=\int{\left({f{'}}{\left({x}\right)}{g{{\left({x}\right)}}}+{f{{\left({x}\right)}}}{g{'}}{\left({x}\right)}\right)}{d}{x} ∫ ( f ( x ) g ( x ) ) ′ d x = ∫ ( f ′ ( x ) g ( x ) + f ( x ) g ′ ( x ) ) d x .
This can be rewritten as f ( x ) g ( x ) = ∫ f ′ ( x ) g ( x ) d x + ∫ f ( x ) g ′ ( x ) d x {f{{\left({x}\right)}}}{g{{\left({x}\right)}}}=\int{f{'}}{\left({x}\right)}{g{{\left({x}\right)}}}{d}{x}+\int{f{{\left({x}\right)}}}{g{'}}{\left({x}\right)}{d}{x} f ( x ) g ( x ) = ∫ f ′ ( x ) g ( x ) d x + ∫ f ( x ) g ′ ( x ) d x or ∫ f ( x ) g ′ ( x ) d x = f ( x ) g ( x ) − ∫ f ′ ( x ) g ( x ) d x \int{f{{\left({x}\right)}}}{g{'}}{\left({x}\right)}{d}{x}={f{{\left({x}\right)}}}{g{{\left({x}\right)}}}-\int{f{'}}{\left({x}\right)}{g{{\left({x}\right)}}}{d}{x} ∫ f ( x ) g ′ ( x ) d x = f ( x ) g ( x ) − ∫ f ′ ( x ) g ( x ) d x .
If we take u = f ( x ) {u}={f{{\left({x}\right)}}} u = f ( x ) and v = g ( x ) {v}={g{{\left({x}\right)}}} v = g ( x ) , we have that d u = f ′ ( x ) d x {d}{u}={f{'}}{\left({x}\right)}{d}{x} d u = f ′ ( x ) d x and d v = g ′ ( x ) d x {d}{v}={g{'}}{\left({x}\right)}{d}{x} d v = g ′ ( x ) d x , and the above formula can be rewritten using the substitution rule as ∫ u d v = u v − ∫ v d u \int{u}{d}{v}={u}{v}-\int{v}{d}{u} ∫ u d v = u v − ∫ v d u .
As can be seen, integration by parts corresponds to the product rule (just like the substitution rule corresponds to the chain rule ).
In fact, every differentiation rule has a corresponding integration rule, because these processes are the inverse of each other.
Example 1 . Evaluate ∫ x e x d x \int{x}{{e}}^{{x}}{d}{x} ∫ x e x d x .
Let u = x {u}={x} u = x and d v = e x d x {d}{v}={{e}}^{{x}}{d}{x} d v = e x d x . Then, d u = ( x ) ′ d x = d x {d}{u}={\left({x}\right)}'{d}{x}={d}{x} d u = ( x ) ′ d x = d x , and v = ∫ e x d x = e x {v}=\int{{e}}^{{x}}{d}{x}={{e}}^{{x}} v = ∫ e x d x = e x .
So, ∫ x e x d x = ∫ ( x ) ⏞ u ( e x d x ) ⏞ d v = ( x ) ⏞ u ( e x ) ⏞ v − ∫ ( e x ) ⏞ v ( d x ) ⏞ d u = x e x − e x + C \int{x}{{e}}^{{x}}{d}{x}=\int\overbrace{{\left({x}\right)}}^{{u}}\overbrace{{\left({{e}}^{{x}}{d}{x}\right)}}^{{{d}{v}}}=\overbrace{{\left({x}\right)}}^{{u}}\overbrace{{\left({{e}}^{{x}}\right)}}^{{v}}-\int\overbrace{{\left({{e}}^{{x}}\right)}}^{{v}}\overbrace{{\left({d}{x}\right)}}^{{{d}{u}}}={x}{{e}}^{{x}}-{{e}}^{{x}}+{C} ∫ x e x d x = ∫ ( x ) u ( e x d x ) d v = ( x ) u ( e x ) v − ∫ ( e x ) v ( d x ) d u = x e x − e x + C .
Note that it is very important to choose appropriate u {u} u and v {v} v , because a wrong choice will only complicate the integral.
For example, assume that, instead of choosing u = x {u}={x} u = x and d v = e x d x {d}{v}={{e}}^{{x}}{d}{x} d v = e x d x in the above example, we choose u = e x {u}={{e}}^{{x}} u = e x and v = x d x {v}={x}{d}{x} v = x d x . Then, d u = ( e x ) ′ d x = e x d x {d}{u}={\left({{e}}^{{x}}\right)}'{d}{x}={{e}}^{{x}}{d}{x} d u = ( e x ) ′ d x = e x d x , and v = ∫ x d x = x 2 2 {v}=\int{x}{d}{x}=\frac{{{x}}^{{2}}}{{2}} v = ∫ x d x = 2 x 2 .
So, ∫ x e x d x = ∫ ( e x ) ⏞ u ( x d x ) ⏞ d v = ( e x ) ⏞ u ( 1 2 x 2 ) ⏞ v − ∫ ( 1 2 x 2 ) ⏞ v ( e x d x ) ⏞ d u \int{x}{{e}}^{{x}}{d}{x}=\int\overbrace{{\left({{e}}^{{x}}\right)}}^{{u}}\overbrace{{\left({x}{d}{x}\right)}}^{{{d}{v}}}=\overbrace{{\left({{e}}^{{x}}\right)}}^{{u}}\overbrace{{\left(\frac{{1}}{{2}}{{x}}^{{2}}\right)}}^{{v}}-\int\overbrace{{\left(\frac{{1}}{{2}}{{x}}^{{2}}\right)}}^{{v}}\overbrace{{\left({{e}}^{{x}}{d}{x}\right)}}^{{{d}{u}}} ∫ x e x d x = ∫ ( e x ) u ( x d x ) d v = ( e x ) u ( 2 1 x 2 ) v − ∫ ( 2 1 x 2 ) v ( e x d x ) d u .
Although this equation is true, the integral ∫ 1 2 x 2 e x d x \int\frac{{1}}{{2}}{{x}}^{{2}}{{e}}^{{x}}{d}{x} ∫ 2 1 x 2 e x d x is more difficult to evaluate than the integral we started with.
Example 2 . Evaluate ∫ x 2 cos ( x ) d x \int{{x}}^{{2}}{\cos{{\left({x}\right)}}}{d}{x} ∫ x 2 cos ( x ) d x .
Notice that x 2 {{x}}^{{2}} x 2 becomes simpler when differentiated. Therefore, let u = x 2 {u}={{x}}^{{2}} u = x 2 and d v = cos ( x ) d x {d}{v}={\cos{{\left({x}\right)}}}{d}{x} d v = cos ( x ) d x . Then, d u = ( x 2 ) ′ d x = 2 x d x {d}{u}={\left({{x}}^{{2}}\right)}'{d}{x}={2}{x}{d}{x} d u = ( x 2 ) ′ d x = 2 x d x , and v = ∫ cos ( x ) d x = sin ( x ) {v}=\int{\cos{{\left({x}\right)}}}{d}{x}={\sin{{\left({x}\right)}}} v = ∫ cos ( x ) d x = sin ( x ) .
So, ∫ x 2 cos ( x ) d x = x 2 sin ( x ) − ∫ 2 x sin ( x ) d x = x 2 sin ( x ) − 2 ∫ x sin ( x ) d x \int{{x}}^{{2}}{\cos{{\left({x}\right)}}}{d}{x}={{x}}^{{2}}{\sin{{\left({x}\right)}}}-\int{2}{x}{\sin{{\left({x}\right)}}}{d}{x}={{x}}^{{2}}{\sin{{\left({x}\right)}}}-{2}\int{x}{\sin{{\left({x}\right)}}}{d}{x} ∫ x 2 cos ( x ) d x = x 2 sin ( x ) − ∫ 2 x sin ( x ) d x = x 2 sin ( x ) − 2 ∫ x sin ( x ) d x .
We've obtained a simpler integral, but still it is not obvious. Therefore, we apply integration by parts once more to the integral ∫ x sin ( x ) d x \int{x}{\sin{{\left({x}\right)}}}{d}{x} ∫ x sin ( x ) d x :
let u = x {u}={x} u = x and d v = sin ( x ) d x {d}{v}={\sin{{\left({x}\right)}}}{d}{x} d v = sin ( x ) d x ; then, d u = ( x ) ′ d x = d x {d}{u}={\left({x}\right)}'{d}{x}={d}{x} d u = ( x ) ′ d x = d x , and v = ∫ sin ( x ) d x = − cos ( x ) {v}=\int{\sin{{\left({x}\right)}}}{d}{x}=-{\cos{{\left({x}\right)}}} v = ∫ sin ( x ) d x = − cos ( x ) .
So, ∫ ( x ) ⏞ u ( sin ( x ) d x ) ⏞ d v = ( x ) ⏞ u ( − cos ( x ) ) ⏞ v − ∫ ( − cos ( x ) ) ⏞ v ( d x ) ⏞ d u = − x cos ( x ) + ∫ cos ( x ) d x = \int\overbrace{{\left({x}\right)}}^{{u}}\overbrace{{\left({\sin{{\left({x}\right)}}}{d}{x}\right)}}^{{{d}{v}}}=\overbrace{{\left({x}\right)}}^{{u}}\overbrace{{\left(-{\cos{{\left({x}\right)}}}\right)}}^{{v}}-\int\overbrace{{\left(-{\cos{{\left({x}\right)}}}\right)}}^{{{v}}}\overbrace{{\left({d}{x}\right)}}^{{{d}{u}}}=-{x}{\cos{{\left({x}\right)}}}+\int{\cos{{\left({x}\right)}}}{d}{x}= ∫ ( x ) u ( sin ( x ) d x ) d v = ( x ) u ( − cos ( x ) ) v − ∫ ( − cos ( x ) ) v ( d x ) d u = − x cos ( x ) + ∫ cos ( x ) d x =
= − x cos ( x ) + sin ( x ) + C =-{x}{\cos{{\left({x}\right)}}}+{\sin{{\left({x}\right)}}}+{C} = − x cos ( x ) + sin ( x ) + C .
Finally, ∫ x 2 cos ( x ) d x = x 2 sin ( x ) − 2 ∫ x sin ( x ) d x = x 2 sin ( x ) − 2 ( − x cos ( x ) + sin ( x ) + C ) = \int{{x}}^{{2}}{\cos{{\left({x}\right)}}}{d}{x}={{x}}^{{2}}{\sin{{\left({x}\right)}}}-{2}\int{x}{\sin{{\left({x}\right)}}}{d}{x}={{x}}^{{2}}{\sin{{\left({x}\right)}}}-{2}{\left(-{x}{\cos{{\left({x}\right)}}}+{\sin{{\left({x}\right)}}}+{C}\right)}= ∫ x 2 cos ( x ) d x = x 2 sin ( x ) − 2 ∫ x sin ( x ) d x = x 2 sin ( x ) − 2 ( − x cos ( x ) + sin ( x ) + C ) =
= x 2 sin ( x ) + 2 x cos ( x ) − 2 sin ( x ) + C 1 ={{x}}^{{2}}{\sin{{\left({x}\right)}}}+{2}{x}{\cos{{\left({x}\right)}}}-{2}{\sin{{\left({x}\right)}}}+{C}_{{1}} = x 2 sin ( x ) + 2 x cos ( x ) − 2 sin ( x ) + C 1 where C 1 = − 2 C {C}_{{1}}=-{2}{C} C 1 = − 2 C .
Example 2 shows that in some cases we need to apply integration by parts more than once.
Example 3 . Evaluate ∫ ln ( x ) d x \int{\ln{{\left({x}\right)}}}{d}{x} ∫ ln ( x ) d x .
Here, there is only one choice for u {u} u and v {v} v , namely u = ln ( x ) {u}={\ln{{\left({x}\right)}}} u = ln ( x ) and d v = d x {d}{v}={d}{x} d v = d x ; so,d u = ( ln ( x ) ) ′ d x = 1 x d x {d}{u}={\left({\ln{{\left({x}\right)}}}\right)}'{d}{x}=\frac{{1}}{{x}}{d}{x} d u = ( ln ( x ) ) ′ d x = x 1 d x , and v = ∫ d x = x {v}=\int{d}{x}={x} v = ∫ d x = x .
Therefore, ∫ ( ln ( x ) ) ⏞ u ( d x ) ⏞ d v = ( ln ( x ) ) ⏞ u ( x ) ⏞ v − ∫ ( x ) ⏞ v ( 1 x d x ) ⏞ d u = \int\overbrace{{\left({\ln{{\left({x}\right)}}}\right)}}^{{u}}\overbrace{{\left({d}{x}\right)}}^{{{d}{v}}}=\overbrace{{\left({\ln{{\left({x}\right)}}}\right)}}^{{u}}\overbrace{{\left({x}\right)}}^{{v}}-\int\overbrace{{\left({x}\right)}}^{{v}}\overbrace{{\left(\frac{{1}}{{x}}{d}{x}\right)}}^{{{d}{u}}}= ∫ ( ln ( x ) ) u ( d x ) d v = ( ln ( x ) ) u ( x ) v − ∫ ( x ) v ( x 1 d x ) d u =
= x ln ( x ) − ∫ d x = x ln ( x ) − x + C ={x}{\ln{{\left({x}\right)}}}-\int{d}{x}={x}{\ln{{\left({x}\right)}}}-{x}+{C} = x ln ( x ) − ∫ d x = x ln ( x ) − x + C .
Example 4 . Evaluate ∫ e x sin ( x ) d x \int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x} ∫ e x sin ( x ) d x .
Neither e x {{e}}^{{x}} e x nor sin ( x ) {\sin{{\left({x}\right)}}} sin ( x ) become simpler when differentiated, but we try choosing u = e x {u}={{e}}^{{x}} u = e x and v = sin ( x ) d x {v}={\sin{{\left({x}\right)}}}{d}{x} v = sin ( x ) d x .
Then, d u = ( e x ) ′ d x = e x d x {d}{u}={\left({{e}}^{{x}}\right)}'{d}{x}={{e}}^{{x}}{d}{x} d u = ( e x ) ′ d x = e x d x , and v = ∫ sin ( x ) d x = − cos ( x ) d x {v}=\int{\sin{{\left({x}\right)}}}{d}{x}=-{\cos{{\left({x}\right)}}}{d}{x} v = ∫ sin ( x ) d x = − cos ( x ) d x .
Therefore, ∫ e x sin ( x ) d x = − e x cos ( x ) − ∫ − cos ( x ) e x d x = − e x cos ( x ) + ∫ e x cos ( x ) d x \int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x}=-{{e}}^{{x}}{\cos{{\left({x}\right)}}}-\int-{\cos{{\left({x}\right)}}}{{e}}^{{x}}{d}{x}=-{{e}}^{{x}}{\cos{{\left({x}\right)}}}+\int{{e}}^{{x}}{\cos{{\left({x}\right)}}}{d}{x} ∫ e x sin ( x ) d x = − e x cos ( x ) − ∫ − cos ( x ) e x d x = − e x cos ( x ) + ∫ e x cos ( x ) d x .
The integral obtained is not simpler than the original one, but it is not more difficult either. So, we apply integration by parts once more: let u = e x {u}={{e}}^{{x}} u = e x and d v = cos ( x ) d x {d}{v}={\cos{{\left({x}\right)}}}{d}{x} d v = cos ( x ) d x ; then, d u = ( e x ) ′ d x = e x d x {d}{u}={\left({{e}}^{{x}}\right)}'{d}{x}={{e}}^{{x}}{d}{x} d u = ( e x ) ′ d x = e x d x , and v = ∫ cos ( x ) d x = sin ( x ) {v}=\int{\cos{{\left({x}\right)}}}{d}{x}={\sin{{\left({x}\right)}}} v = ∫ cos ( x ) d x = sin ( x ) .
So, ∫ e x cos ( x ) d x = e x sin ( x ) − ∫ e x sin ( x ) d x \int{{e}}^{{x}}{\cos{{\left({x}\right)}}}{d}{x}={{e}}^{{x}}{\sin{{\left({x}\right)}}}-\int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x} ∫ e x cos ( x ) d x = e x sin ( x ) − ∫ e x sin ( x ) d x .
We've obtained the initial integral! It seems that we obtained nothing because we've arrived at ∫ e x sin ( x ) d x \int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x} ∫ e x sin ( x ) d x , which is where we had started.
However, since ∫ e x sin ( x ) d x = − e x cos ( x ) + ∫ e x cos ( x ) d x \int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x}=-{{e}}^{{x}}{\cos{{\left({x}\right)}}}+\int{{e}}^{{x}}{\cos{{\left({x}\right)}}}{d}{x} ∫ e x sin ( x ) d x = − e x cos ( x ) + ∫ e x cos ( x ) d x , it can be stated that
∫ e x sin ( x ) d x = − e x cos ( x ) + ( e x sin ( x ) − ∫ e x sin ( x ) d x ) \int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x}=-{{e}}^{{x}}{\cos{{\left({x}\right)}}}+{\left({{e}}^{{x}}{\sin{{\left({x}\right)}}}-\int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x}\right)} ∫ e x sin ( x ) d x = − e x cos ( x ) + ( e x sin ( x ) − ∫ e x sin ( x ) d x ) .
This can be regarded as an equation with the unknown variable ∫ e x sin ( x ) d x \int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x} ∫ e x sin ( x ) d x .
This equation can be rewritten as 2 ∫ e x sin ( x ) d x = e x ( sin ( x ) − cos ( x ) ) {2}\int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x}={{e}}^{{x}}{\left({\sin{{\left({x}\right)}}}-{\cos{{\left({x}\right)}}}\right)} 2 ∫ e x sin ( x ) d x = e x ( sin ( x ) − cos ( x ) ) .
Dividing by 2 and adding the constant of integration yields the final answer: ∫ e x sin ( x ) d x = 1 2 e x ( sin ( x ) − cos ( x ) ) + C \int{{e}}^{{x}}{\sin{{\left({x}\right)}}}{d}{x}=\frac{{1}}{{2}}{{e}}^{{x}}{\left({\sin{{\left({x}\right)}}}-{\cos{{\left({x}\right)}}}\right)}+{C} ∫ e x sin ( x ) d x = 2 1 e x ( sin ( x ) − cos ( x ) ) + C .
Example 5 . Prove the reduction formula. ∫ sin n ( x ) d x = − 1 n cos ( x ) sin n − 1 ( x ) + n − 1 n ∫ sin n − 2 ( x ) d x \int{{\sin}}^{{n}}{\left({x}\right)}{d}{x}=-\frac{{1}}{{n}}{\cos{{\left({x}\right)}}}{{\sin}}^{{{n}-{1}}}{\left({x}\right)}+\frac{{{n}-{1}}}{{n}}\int{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{d}{x} ∫ sin n ( x ) d x = − n 1 cos ( x ) sin n − 1 ( x ) + n n − 1 ∫ sin n − 2 ( x ) d x , where n ≥ 2 {n}\ge{2} n ≥ 2 is an integer.
Let u = sin n − 1 ( x ) {u}={{\sin}}^{{{n}-{1}}}{\left({x}\right)} u = sin n − 1 ( x ) and d v = sin ( x ) d x {d}{v}={\sin{{\left({x}\right)}}}{d}{x} d v = sin ( x ) d x ; then,d u = ( sin n − 1 ) ′ d x = ( n − 1 ) sin n − 2 ( x ) ( sin ( x ) ) ′ d x = ( n − 1 ) sin n − 2 ( x ) cos ( x ) d x {d}{u}={\left({{\sin}}^{{{n}-{1}}}\right)}'{d}{x}={\left({n}-{1}\right)}{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{\left({\sin{{\left({x}\right)}}}\right)}'{d}{x}={\left({n}-{1}\right)}{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{\cos{{\left({x}\right)}}}{d}{x} d u = ( sin n − 1 ) ′ d x = ( n − 1 ) sin n − 2 ( x ) ( sin ( x ) ) ′ d x = ( n − 1 ) sin n − 2 ( x ) cos ( x ) d x , and v = ∫ sin ( x ) d x = − cos ( x ) {v}=\int{\sin{{\left({x}\right)}}}{d}{x}=-{\cos{{\left({x}\right)}}} v = ∫ sin ( x ) d x = − cos ( x ) .
So, ∫ sin n ( x ) d x = ∫ sin n − 1 sin ( x ) d x = − cos ( x ) sin n − 1 ( x ) − ∫ cos ( x ) ( n − 1 ) sin n − 2 ( x ) cos ( x ) d x = \int{{\sin}}^{{n}}{\left({x}\right)}{d}{x}=\int{{\sin}}^{{{n}-{1}}}{\sin{{\left({x}\right)}}}{d}{x}=-{\cos{{\left({x}\right)}}}{{\sin}}^{{{n}-{1}}}{\left({x}\right)}-\int{\cos{{\left({x}\right)}}}{\left({n}-{1}\right)}{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{\cos{{\left({x}\right)}}}{d}{x}= ∫ sin n ( x ) d x = ∫ sin n − 1 sin ( x ) d x = − cos ( x ) sin n − 1 ( x ) − ∫ cos ( x ) ( n − 1 ) sin n − 2 ( x ) cos ( x ) d x =
= − cos ( x ) sin n − 1 ( x ) + ( n − 1 ) ∫ sin n − 2 ( x ) cos 2 ( x ) d x =-{\cos{{\left({x}\right)}}}{{\sin}}^{{{n}-{1}}}{\left({x}\right)}+{\left({n}-{1}\right)}\int{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{{\cos}}^{{2}}{\left({x}\right)}{d}{x} = − cos ( x ) sin n − 1 ( x ) + ( n − 1 ) ∫ sin n − 2 ( x ) cos 2 ( x ) d x .
Since cos 2 ( x ) = 1 − sin 2 ( x ) {{\cos}}^{{2}}{\left({x}\right)}={1}-{{\sin}}^{{2}}{\left({x}\right)} cos 2 ( x ) = 1 − sin 2 ( x ) , it can be stated that( n − 1 ) ∫ sin n − 2 ( x ) cos 2 ( x ) d x = ( n − 1 ) ∫ sin n − 2 ( x ) ( 1 − sin 2 ( x ) ) d x = {\left({n}-{1}\right)}\int{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{{\cos}}^{{2}}{\left({x}\right)}{d}{x}={\left({n}-{1}\right)}\int{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{\left({1}-{{\sin}}^{{2}}{\left({x}\right)}\right)}{d}{x}= ( n − 1 ) ∫ sin n − 2 ( x ) cos 2 ( x ) d x = ( n − 1 ) ∫ sin n − 2 ( x ) ( 1 − sin 2 ( x ) ) d x =
= ( n − 1 ) ∫ sin n − 2 ( x ) d x − ( n − 1 ) ∫ sin n − 2 sin 2 ( x ) d x = ={\left({n}-{1}\right)}\int{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{d}{x}-{\left({n}-{1}\right)}\int{{\sin}}^{{{n}-{2}}}{{\sin}}^{{2}}{\left({x}\right)}{d}{x}= = ( n − 1 ) ∫ sin n − 2 ( x ) d x − ( n − 1 ) ∫ sin n − 2 sin 2 ( x ) d x =
= ( n − 1 ) ∫ sin n − 2 ( x ) d x − ( n − 1 ) ∫ sin n ( x ) d x ={\left({n}-{1}\right)}\int{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{d}{x}-{\left({n}-{1}\right)}\int{{\sin}}^{{n}}{\left({x}\right)}{d}{x} = ( n − 1 ) ∫ sin n − 2 ( x ) d x − ( n − 1 ) ∫ sin n ( x ) d x .
Therefore,
∫ sin n ( x ) d x = − cos ( x ) sin n − 1 ( x ) + ( n − 1 ) ∫ sin n − 2 ( x ) d x − ( n − 1 ) ∫ sin n ( x ) d x \int{{\sin}}^{{n}}{\left({x}\right)}{d}{x}=-{\cos{{\left({x}\right)}}}{{\sin}}^{{{n}-{1}}}{\left({x}\right)}+{\left({n}-{1}\right)}\int{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{d}{x}-{\left({n}-{1}\right)}\int{{\sin}}^{{n}}{\left({x}\right)}{d}{x} ∫ sin n ( x ) d x = − cos ( x ) sin n − 1 ( x ) + ( n − 1 ) ∫ sin n − 2 ( x ) d x − ( n − 1 ) ∫ sin n ( x ) d x .
This is an equation with an unknown variable ∫ sin n ( x ) d x \int{{\sin}}^{{n}}{\left({x}\right)}{d}{x} ∫ sin n ( x ) d x .
It can be rewritten as n ∫ sin n ( x ) d x = − cos ( x ) sin n − 1 ( x ) + ( n − 1 ) ∫ sin n − 2 ( x ) d x {n}\int{{\sin}}^{{n}}{\left({x}\right)}{d}{x}=-{\cos{{\left({x}\right)}}}{{\sin}}^{{{n}-{1}}}{\left({x}\right)}+{\left({n}-{1}\right)}\int{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{d}{x} n ∫ sin n ( x ) d x = − cos ( x ) sin n − 1 ( x ) + ( n − 1 ) ∫ sin n − 2 ( x ) d x .
So, finally, we have that ∫ sin n ( x ) d x = − 1 n cos ( x ) sin n − 1 ( x ) + n − 1 n ∫ sin n − 2 ( x ) d x \int{{\sin}}^{{n}}{\left({x}\right)}{d}{x}=-\frac{{1}}{{n}}{\cos{{\left({x}\right)}}}{{\sin}}^{{{n}-{1}}}{\left({x}\right)}+\frac{{{n}-{1}}}{{n}}\int{{\sin}}^{{{n}-{2}}}{\left({x}\right)}{d}{x} ∫ sin n ( x ) d x = − n 1 cos ( x ) sin n − 1 ( x ) + n n − 1 ∫ sin n − 2 ( x ) d x .
The last question in this section is how to calculate definite integrals with the help of integration by parts. In fact, it is very easy: just combine integration by parts with the Newton-Leibniz formula : ∫ a b u d v = u v ∣ a b − ∫ a b v d u {\int_{{a}}^{{b}}}{u}{d}{v}={u}{v}{{\mid}_{{a}}^{{b}}}-{\int_{{a}}^{{b}}}{v}{d}{u} ∫ a b u d v = u v ∣ a b − ∫ a b v d u .
Example 6 . Calculate ∫ 0 1 tan − 1 ( x ) d x {\int_{{0}}^{{1}}}{{\tan}}^{{-{1}}}{\left({x}\right)}{d}{x} ∫ 0 1 tan − 1 ( x ) d x .
Let u = tan − 1 ( x ) {u}={{\tan}}^{{-{1}}}{\left({x}\right)} u = tan − 1 ( x ) and d v = d x {d}{v}={d}{x} d v = d x ; then, d u = ( tan − 1 ( x ) ) ′ d x = 1 x 2 + 1 d x {d}{u}={\left({{\tan}}^{{-{1}}}{\left({x}\right)}\right)}'{d}{x}=\frac{{1}}{{{{x}}^{{2}}+{1}}}{d}{x} d u = ( tan − 1 ( x ) ) ′ d x = x 2 + 1 1 d x , and v = ∫ d x = x {v}=\int{d}{x}={x} v = ∫ d x = x .
So, ∫ 0 1 tan − 1 ( x ) d x = x tan − 1 ( x ) ∣ 0 1 − ∫ 0 1 x x 2 + 1 d x = {\int_{{0}}^{{1}}}{{\tan}}^{{-{1}}}{\left({x}\right)}{d}{x}={x}{{\tan}}^{{-{1}}}{\left({x}\right)}{{\mid}_{{0}}^{{1}}}-{\int_{{0}}^{{1}}}\frac{{x}}{{{{x}}^{{2}}+{1}}}{d}{x}= ∫ 0 1 tan − 1 ( x ) d x = x tan − 1 ( x ) ∣ 0 1 − ∫ 0 1 x 2 + 1 x d x =
= ( 1 ⋅ tan − 1 ( 1 ) − 0 ⋅ tan − 1 ( 0 ) ) − ∫ 0 1 x x 2 + 1 d x = π 4 − ∫ 0 1 x x 2 + 1 d x ={\left({1}\cdot{{\tan}}^{{-{1}}}{\left({1}\right)}-{0}\cdot{{\tan}}^{{-{1}}}{\left({0}\right)}\right)}-{\int_{{0}}^{{1}}}\frac{{x}}{{{{x}}^{{2}}+{1}}}{d}{x}=\frac{\pi}{{4}}-{\int_{{0}}^{{1}}}\frac{{x}}{{{{x}}^{{2}}+{1}}}{d}{x} = ( 1 ⋅ tan − 1 ( 1 ) − 0 ⋅ tan − 1 ( 0 ) ) − ∫ 0 1 x 2 + 1 x d x = 4 π − ∫ 0 1 x 2 + 1 x d x .
To calculate ∫ 0 1 x x 2 + 1 d x {\int_{{0}}^{{1}}}\frac{{x}}{{{{x}}^{{2}}+{1}}}{d}{x} ∫ 0 1 x 2 + 1 x d x , we use the substitution rule: let t = x 2 + 1 {t}={{x}}^{{2}}+{1} t = x 2 + 1 ; then,d t = ( x 2 + 1 ) ′ d x = 2 x d x {d}{t}={\left({{x}}^{{2}}+{1}\right)}'{d}{x}={2}{x}{d}{x} d t = ( x 2 + 1 ) ′ d x = 2 x d x , or x d x = 1 2 d t {x}{d}{x}=\frac{{1}}{{2}}{d}{t} x d x = 2 1 d t .
Since x {x} x is changing from 0 to 1, it can be stated that t {t} t is changing from 2 ⋅ 0 = 0 {2}\cdot{0}={0} 2 ⋅ 0 = 0 to 2 ⋅ 1 = 2 {2}\cdot{1}={2} 2 ⋅ 1 = 2 .
So, ∫ 0 1 x x 2 + 1 d x = ∫ 1 2 1 t 1 2 d t = 1 2 [ ln ∣ t ∣ ] 1 2 = 1 2 ( ln ( 2 ) − ln ( 1 ) ) = {\int_{{0}}^{{1}}}\frac{{x}}{{{{x}}^{{2}}+{1}}}{d}{x}={\int_{{1}}^{{2}}}\frac{{1}}{{t}}\frac{{1}}{{2}}{d}{t}=\frac{{1}}{{2}}{{\left[{\ln}{\left|{t}\right|}\right]}_{{1}}^{{2}}}=\frac{{1}}{{2}}{\left({\ln{{\left({2}\right)}}}-{\ln{{\left({1}\right)}}}\right)}= ∫ 0 1 x 2 + 1 x d x = ∫ 1 2 t 1 2 1 d t = 2 1 [ ln ∣ t ∣ ] 1 2 = 2 1 ( ln ( 2 ) − ln ( 1 ) ) =
= 1 2 ( ln ( 2 ) − 0 ) = 1 2 ln ( 2 ) =\frac{{1}}{{2}}{\left({\ln{{\left({2}\right)}}}-{0}\right)}=\frac{{1}}{{2}}{\ln{{\left({2}\right)}}} = 2 1 ( ln ( 2 ) − 0 ) = 2 1 ln ( 2 ) .
Finally, we can see that ∫ 0 1 tan − 1 ( x ) = π 4 − ∫ 0 1 x x 2 + 1 d x = π 4 − 1 2 ln ( 2 ) {\int_{{0}}^{{1}}}{{\tan}}^{{-{1}}}{\left({x}\right)}=\frac{\pi}{{4}}-{\int_{{0}}^{{1}}}\frac{{x}}{{{{x}}^{{2}}+{1}}}{d}{x}=\frac{\pi}{{4}}-\frac{{1}}{{2}}{\ln{{\left({2}\right)}}} ∫ 0 1 tan − 1 ( x ) = 4 π − ∫ 0 1 x 2 + 1 x d x = 4 π − 2 1 ln ( 2 ) .