Integrals: Rational Functions R[x]= P x

Integrals: Rational Functions R[x]= P@xD
Q@xD
Ÿ 1 Base
1
à
âx
x
1
à
âx
x2
+1
1
à
âx
x2
Log@xD
ArcTan@xD
1
x
Ÿ Deg<2
1
à
âx
ax+b
Log@b + a xD
a
ax+b
ApartB
F
cx+d
a
bc-ad
+
c
c Hd + c xL
Together@%D
b+ax
d+cx
ax+b
à
âx
cx+d
ax
Hb c - a dL Log@d + c xD
+
c
c2
2
matkem20101213mat3int.nb
Ÿ Deg<3 ” (0,2), (1,2), (2,2)
1
à
âx
x2
-6x+8
1
1
Log@4 - xD -
2
Log@- 2 + xD
2
1
ApartB
F
x2
-6x+8
1
1
-
2 H- 4 + xL
2 H- 2 + xL
1
à
âx
x2
+6x+9
1
3+x
1
ApartB
F
x2
+6x+9
1
H3 + xL2
1
ApartB
F
x2
+2x+4
1
4 + 2 x + x2
1
à
âx
x2
+2x+4
ArcTanB
1+x
F
3
3
2x+5
à
âx
x2
+2x+4
1+x
3 ArcTanB
F + LogA4 + 2 x + x2 E
3
DAx2 + 2 x + 4, xE
2x+5
==
x2
+2x+4
3
 Simplify
+
x2
+2x+4
x2
+2x+4
True
Summary: Assume that deg of den =2, i.e, Q@xD = x2 + b x + c
3 different cases:
i) two different real roots
ii) one real root
iii) no real root
If deg P=1, separate (a constant multiple of )the derivative of Q!
matkem20101213mat3int.nb
Summary: Assume that deg of den =2, i.e, Q@xD = x2 + b x + c
3 different cases:
i) two different real roots
ii) one real root
iii) no real root
If deg P=1, separate (a constant multiple of )the derivative of Q!
Ÿ Deg=n (general)
Idea: Factorize, get the partial fractions, integrate them one by one!
Example
1
f1 =
;
x3
-8
Factor@Denominator@f1DD
H- 2 + xL I4 + 2 x + x2 M
? Deno*
Denominator@exprD gives the denominator of expr.
PF1 = Apart@f1D
1
-4 - x
+
12 H- 2 + xL
12 I4 + 2 x + x2 M
PF1P1T
1
12 H- 2 + xL
à PF1P1T â x
1
Log@- 2 + xD
12
PF1P2T
-4 - x
12 I4 + 2 x + x2 M
D@PF1P2, 3, 1T, xD  - 2  Expand
-1 - x
‡
3
4
matkem20101213mat3int.nb
à PF1P2T â x
1
1+x
3 ArcTanB
-
1
LogA4 + 2 x + x2 E
F-
12
3
2
à PF1 â x
ArcTanB
1+x
F
1
3
-
1
Log@- 2 + xD -
+
4
12
3
LogA4 + 2 x + x2 E
24
Question: How to get partial fractions?
Factor@Denominator@f1DD
H- 2 + xL I4 + 2 x + x2 M
Denominator@f1D . x ® 2
0
a
bx+c
 Together  Numerator
+
x2 + 2 x + 4
x-2
4 a - 2 c + 2 a x - 2 b x + c x + a x2 + b x2
CoefficientList@%, xD
84 a - 2 c, 2 a - 2 b + c, a + b<
Thread@Equal@%, 81, 0, 0<DD
84 a - 2 c Š 1, 2 a - 2 b + c Š 0, a + b Š 0<
Solve@%D
1
1
1
,b®-
::a ®
12
,c®12
>>
3
Apart@f1D
1
-4 - x
+
12 I4 + 2 x + x2 M
12 H- 2 + xL
Final remark If Deg P³Q division with remainder
x4 - 8 x + 1
f2 =
;
x3 - 8
Apart@f2D
1
-4 - x
+x+
12 H- 2 + xL
12 I4 + 2 x + x2 M
PolynomialQuotientAx4 - 8 x + 1, x3 - 8, xE
x
matkem20101213mat3int.nb
x Ix3 - 8M  Expand
x4 - 8 x + 1 - I- 8 x + x4 M
1
PolynomialRemainderAx4 - 8 x + 1, x3 - 8, xE
1
à f2 â x
1
12 x2 - 2
1+x
3 ArcTanB
24
F + 2 Log@- 2 + xD - LogA4 + 2 x + x2 E
3
Reduction to Rational Functions
Clear@fD
f = HoldForm@1  Sin@xDD;
f
1
Sin@xD
1 - u2
2u
f2 = f . :Sin@xD ®
, Cos@xD ®
1 + u2
>  FullSimplify
1 + u2
1
2u
1+u2
2
f3 = f2
 ReleaseHold
1 + u2
1
u
à f3 â u
Log@uD
% . u ® Tan@x  2D
x
LogBTanB FF
2
à Hf  ReleaseHoldL â x  FullSimplify
x
x
- LogBCosB FF + LogBSinB FF
2
2
Improper Integrals
5
6
matkem20101213mat3int.nb
Improper Integrals
¥
Ÿ 1 Ùa f @xD â x = ?
¥
1
âx
à
x2
1
1
1
Ω
FullSimplifyBà
1
â x, Assumptions ® 8Ω ³ 1<F
x2
-1 + Ω
Ω
Limit@%, Ω ® ¥D
1
Outlook: Probability theory, continuous random vars DF, CDF
¥
2
-x
âx
à E
-¥
Π
2
PlotAE-x , 8x, - 5, 5<, Filling ® Axis, FillingStyle ® RedE
1.0
0.8
0.6
0.4
0.2
-4
¥
1
à
-¥
1
2Π
-2
2 ‘2
E-x
âx
2
4
matkem20101213mat3int.nb
PDF@NormalDistribution@Μ, ΣD, xD
Hx-ΜL2
2 Σ2
ã
2Π Σ
Integrate@PDF@NormalDistribution@Μ, ΣD, xD, 8x, - ¥, ¥<, Assumptions ® 8Im@ΜD Š 0, Σ > 0<D
1
¥
à PDF@NormalDistribution@Μ, ΣD, xD â x,
FullSimplifyB
-¥
Assumptions ® 8Im@ΜD Š 0, Σ > 0<F
1
x
2
à
0
2
E-t â t
Π
Erf@xD
Area
R
FullSimplifyBà
R2 - x2 â x, Assumptions ® 8R > 0<F
-R
Π R2
2
PlotB
22 - x2 , 8x, - 2, 2<, Filling ® Axis, FillingStyle ® RedF
2.0
1.5
1.0
0.5
-2
-1
1
2
7
8
matkem20101213mat3int.nb
PlotA95 - 2 x, x2 - 4 x - 3=, 8x, - 5, 5<, Filling ® 81 ® 882<, 8White, Orange<<<E
40
30
20
10
-4
-2
2
Solve@5 - 2 x Š x ^ 2 - 4 x - 3, xD
88x ® - 2<, 8x ® 4<<
4
à HH5 - 2 xL - Hx ^ 2 - 4 x - 3LL â x
-2
36
Integrate@HH5 - 2 xL - Hx ^ 2 - 4 x - 3LL, xD
8 x + x2 -
x3
3
% . x ® 4
80
3
% . x ® - 2
28
3
80 + 28
108
%3
36
4