分部積分法又稱作部分積分法(英語:Integration by parts),是一種積分的技巧。它是由微分的乘法定則和微積分基本定理推導而來的。其基本思路是將不易求得結果的積分形式,轉化為等價的但易於求出結果的積分形式。
假設
與
是兩個連續可導函數。由乘積法則可知

對上述等式兩邊求不定積分,得

移項整理,得不定積分形式的分部積分方程

由以上等式我們可以推導出分部積分法在區間
的定積分形式
![{\displaystyle \int _{a}^{A}{\frac {{\rm {d}}h}{{\rm {d}}x}}k\ {\rm {d}}x={\big [}hk{\big ]}_{a}^{A}-\int _{a}^{A}h{\frac {{\rm {d}}k}{{\rm {d}}x}}\ {\rm {d}}x}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c212cf5b6e2c0d26b05d7b13466a33cdb5d983cc)
已經積出的部分
可以代入上下限
表示為以下等式,
![{\displaystyle {\big [}hk{\big ]}_{a}^{A}=h(A)k(A)-h(a)k(a)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/be74fe408ac45cefd85ac6ea1d7cf7439a8267bc)
而以上這條等式可以通過函數求導乘積法則,以及微積分基本定理通過以下方式倒推並得以驗證

在傳統的微積分教材裏分部積分法通常寫成不定積分形式:

如果更簡單些,令
、
,微分
和
,,就可以得到更常見到的形式:
。
注意,上面的原式中含有g的導數;在使用這個規則時必須先找到不定積分g,並且積分
必須是可積的。
在級數的離散分析中也可以用到類似的公式表達,稱為分部求和。
另一可用的表達方式可以將原表達方式裏的因子僅寫成f和g,但缺點是引進了鑲套積分:
。
這個表達方式只有當f是連續可導而且g是連續的時才有效。
在黎曼-斯蒂爾吉斯積分和勒貝格-斯蒂爾吉斯積分有更多分部積分的公式。
提示:部分積分下面這樣更複雜一點的積分運算裏也是有效的:
。
用分部積分法求積分:

先設:
- u = x,故du = dx,
- dv = cos(x) dx,故v = sin(x).
代入原積分:

這裏C是任意積分常數。
連續使用分部積分可以求解這類積分:

每次分部積分後x的冪減低1次。
下面這個例子需要用點技巧:

和其他例題不同的是分部積分之後得出的結果里含有要求解的積分式,在這時不必再按積分做下去。
此題要使用兩次分部積分。先令:
- u = cos(x);故du = −sin(x) dx
- dv = ex dx;故v = ex
於是有:

對餘下的積分式再用分部積分,設:
- u = sin(x); du = cos(x) dx
- v = ex; dv = ex dx
得到:
|
|
把兩次分部積分的結果合在一起:

注意,要求解的積分式同時出現在等式兩邊。我們只要把它移到等式一邊就可以得到積分結果:


同樣, C在這裏是積分常數。
同樣的技巧用在求解正割函數的立方的積分里。
另外兩個很有用的分部積分範例是分部積分法用在函數本身和1的乘積。這裏的前提是函數的導數是已知的,而且這個導數和x的乘積的積分已知。
第一個範例是∫ ln(x) dx.我們把它寫成:

設:
- u = ln(x); du = 1/x dx
- v = x; dv = 1·dx
於是:
|
|
|
|


同樣, C是積分常數。
第二個範例是∫ arctan(x) dx,這裏arctan(x)是反三角函數。成重寫入下:

令:
- u = arctan(x); du = 1/(1+x2) dx
- v = x; dv = 1·dx
代入後有:
|
|
|
|
其中用到換元積分法和自然對數積分。
LIATE法則是一條經驗法則,由選擇以下列表中首先出現的函數為u組成:[1]
- L: 對數函數:
等。
- I: 反三角函數:
等。
- A: 代數函數:
等。
- T: 三角函數:
等。
- E: 指數函數:
等。
要成為dv的函數以這個列表中的後一個為準,因為求列在後面的函數的不定積分比列在前面的更容易。LIATE這個口訣代表優先選擇的順序。該法則有時候會寫作"DETAIL",其中D代表dv。
為了展示LIATE法則,以下面這個積分作示範:

根據LIATE法則,u = x和dv = cos x dx,於是du = dx和v = sin x ,這個積分就變成

等同於

總的來說,在選u和dv時都是選得du比u 簡單,並且dv容易被積。如果選cos x為u,x為dv,就要求這樣的積分

在遞歸應用分部積分法後,會陷入一個無限循環產生無意義的結果。
LIATE法則儘管很有用,也還是會有例外。所以有時可以用"ILATE"順序替換。另外,在個別情況要將指數項拆開。例如,求積分

要拆成

所以有

然後

最終的積分結果為

分部積分法通常被用作數學分析中證明定理的工具。