SamplePublisher`GrassmannCalculus`
IntegrationByParts |
|
| | ||||
|
| | ||||
Details and Options
Examples
(1)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`<<Presentations`
The indefinite integral form of :
IntegrationByParts
In[2]:=
Clear[f,g]step1=
[t]
IntegrationByParts |
Out[2]=
∫f[t][t]tf[t]g[t]-∫g[t][t]t
′
g
′
f
To evaluate the following integral, we can easily differentiate the factor and integrate the factor.
x
Sin[x/2]
In[3]:=
integral=Inactive[Integrate][xSin[x/2],x]
[x]%/.{fFunction[x,x],gFunction[x,Integrate[Sin[x/2],x]]}MapAt[Activate[#]+C&,%,2]
IntegrationByParts |
Out[3]=
xSinx
x
2
Out[3]=
∫f[x][x]xf[x]g[x]-∫g[x][x]x
′
g
′
f
Out[3]=
xSinx-2xCos--2Cosx
x
2
x
2
x
2
Out[3]=
xSinxC-2xCos+4Sin
x
2
x
2
x
2
In the following we can easily differentiate and integrate . We use a slightly different method of evaluation by turning the expression into a Rule.
Log[x]
3
x
IntegrationByParts
In[4]:=
integral=Inactive[Integrate][Log[x],x]Rule@@
[x]replaceRule=%/.{tx,fFunction[x,Log[x]],gFunction[x,Integrate[,x]]}integral+C/.replaceRule//Activate
3
x
IntegrationByParts |
3
x
Out[4]=
∫Log[x]x
3
x
Out[4]=
∫f[x][x]xf[x]g[x]-∫g[x][x]x
′
g
′
f
Out[4]=
∫Log[x]xLog[x]-x
3
x
1
4
4
x
3
x
4
Out[4]=
C-+Log[x]
4
x
16
1
4
4
x
The following is a definite integral, which uses a limits bracket. Two integration by parts are performed to obtain a remaining simple integral. If the power of was higher we could keep tabulating rules until we arrived at a simple integral.
θ
In[5]:=
integral=Inactive[Integrate][Sin[2θ],{θ,0,π/2}]ibp=Rule@@
[{θ,0,π/2}]Print["Integrate by parts once:"]rule1=ibp/.{fFunction[x,],gFunction[x,Integrate[Sin[2x],x]]}/.
Print["Integrate the second term by parts"]rule2=ibp/.{fFunction[x,x],gFunction[x,Integrate[Cos[2x],x]]}/.
Print["Substitute for the original integral and evaluate:"]integral/.rule1/.rule2//Activate//EvaluateLimitsBracket//Simplify
2
θ
IntegrationByParts |
2
x
IntegralConstantsRules |
IntegralConstantsRules |
Out[5]=
π
2
∫
0
2
θ
Out[5]=
π
2
∫
0
′
g
π 2 |
0 |
π
2
∫
0
′
f
Integrate by parts once:
Out[5]=
π
2
∫
0
2
θ
1
2
2
θ
π 2 |
0 |
π
2
∫
0
Integrate the second term by parts
Out[5]=
π
2
∫
0
1
2
π 2 |
0 |
1
2
π
2
∫
0
Substitute for the original integral and evaluate:
Out[5]=
1
8
2
π
|
|
""

