Výpočet určitého integralu 

Metoda per partes pro určitý integrál 

> with(student):
 

Příklad 1 

> i1:=Int((x^2+1)*ln(x), x=1..2);
 

(Typesetting:-mprintslash)([i1 := Int((x^2+1)*ln(x), x = 1 .. 2)], [Int((x^2+1)*ln(x), x = 1 .. 2)]) 

> i1=intparts(i1, ln(x));
 

Int((x^2+1)*ln(x), x = 1 .. 2) = 14/3*ln(2)-Int((1/3*x^3+x)/x, x = 1 .. 2) 

> i1=value(lhs(%));
 

Int((x^2+1)*ln(x), x = 1 .. 2) = -16/9+14/3*ln(2) 

Příklad 2 

> i2:=Int(x^2*cos(x), x=0..Pi);
 

(Typesetting:-mprintslash)([i2 := Int(x^2*cos(x), x = 0 .. Pi)], [Int(x^2*cos(x), x = 0 .. Pi)]) 

> i2=intparts(i2, x^2);
 

Int(x^2*cos(x), x = 0 .. Pi) = -Int(2*x*sin(x), x = 0 .. Pi) 

> i2=intparts(rhs(%), 2*x);
 

Int(x^2*cos(x), x = 0 .. Pi) = -2*Pi+Int(-2*cos(x), x = 0 .. Pi) 

> i2=value(rhs(%));
 

Int(x^2*cos(x), x = 0 .. Pi) = -2*Pi 

Příklad 3 

> i3:=Int(exp(x)*cos(x), x=0..Pi);
 

(Typesetting:-mprintslash)([i3 := Int(exp(x)*cos(x), x = 0 .. Pi)], [Int(exp(x)*cos(x), x = 0 .. Pi)]) 

> intparts(i3, cos(x));
 

-exp(Pi)-1-Int(-sin(x)*exp(x), x = 0 .. Pi) 

> i3=intparts(%, sin(x));
 

Int(exp(x)*cos(x), x = 0 .. Pi) = -exp(Pi)-1+Int(-exp(x)*cos(x), x = 0 .. Pi) 

> simplify(%);
 

Int(exp(x)*cos(x), x = 0 .. Pi) = -exp(Pi)-1-Int(exp(x)*cos(x), x = 0 .. Pi) 

> isolate(%,i3);
 

Int(exp(x)*cos(x), x = 0 .. Pi) = -1/2*exp(Pi)-1/2 

Substituční metoda pro určitý integrál 

Příklad 4 

> i4:=Int(x*(x^2-1)^3, x=0..1);
 

(Typesetting:-mprintslash)([i4 := Int(x*(x^2-1)^3, x = 0 .. 1)], [Int(x*(x^2-1)^3, x = 0 .. 1)]) 

> i4=changevar(x^2-1=t, i4, t);
 

Int(x*(x^2-1)^3, x = 0 .. 1) = Int(1/2*t^3, t = -1 .. 0) 

> i4=value(rhs(%));
 

Int(x*(x^2-1)^3, x = 0 .. 1) = (-1)/8 

Příklad 5 

> i5:=Int(exp(sin(x))*cos(x), x=Pi..2*Pi);
 

(Typesetting:-mprintslash)([i5 := Int(exp(sin(x))*cos(x), x = Pi .. 2*Pi)], [Int(exp(sin(x))*cos(x), x = Pi .. 2*Pi)]) 

> i5=changevar(sin(x)=t, i5, t);
 

Int(exp(sin(x))*cos(x), x = Pi .. 2*Pi) = Int(-exp(t), t = 0 .. 0) 

> i5=value(rhs(%));
 

Int(exp(sin(x))*cos(x), x = Pi .. 2*Pi) = 0 

Příklad 6 

> i6:=Int(sin(x)*cos(x)^2/(1+cos(x)^3)^(1/4), x=0..Pi/2);
 

(Typesetting:-mprintslash)([i6 := Int(sin(x)*cos(x)^2/(1+cos(x)^3)^(1/4), x = 0 .. 1/2*Pi)], [Int(sin(x)*cos(x)^2/(1+cos(x)^3)^(1/4), x = 0 .. 1/2*Pi)]) 

> mezi:=i6=changevar(1+cos(x)^3=u, i6, u);
 

(Typesetting:-mprintslash)([mezi := Int(sin(x)*cos(x)^2/(1+cos(x)^3)^(1/4), x = 0 .. 1/2*Pi) = Int(1/3/u^(1/4), u = 1 .. 2)], [Int(sin(x)*cos(x)^2/(1+cos(x)^3)^(1/4), x = 0 .. 1/2*Pi) = Int(1/3/u^(1/4... 

"Ruční" kontrola nových mezí: 

> dolni:=1+cos(0);
 

(Typesetting:-mprintslash)([dolni := 2], [2]) 

> horni:=1+cos(Pi/2);
 

(Typesetting:-mprintslash)([horni := 1], [1]) 

> du:=diff(1+cos(x)^3,x);
 

(Typesetting:-mprintslash)([du := -3*cos(x)^2*sin(x)], [-3*cos(x)^2*sin(x)]) 

> i6=value(rhs(mezi));
 

Int(sin(x)*cos(x)^2/(1+cos(x)^3)^(1/4), x = 0 .. 1/2*Pi) = -4/9+4/9*2^(3/4) 

Příklad 7 

> i7:=Int((sqrt(x)-1)/(sqrt(x)+1), x=1..4);
 

(Typesetting:-mprintslash)([i7 := Int((x^(1/2)-1)/(x^(1/2)+1), x = 1 .. 4)], [Int((x^(1/2)-1)/(x^(1/2)+1), x = 1 .. 4)]) 

> assume(u>0);
 

> i7=simplify(changevar(x=u^2, i7, u));
 

Int((x^(1/2)-1)/(x^(1/2)+1), x = 1 .. 4) = 2*Int((u-1)*u/(u+1), u = 1 .. 2) 

> i7=simplify(value(rhs(%)));
 

Int((x^(1/2)-1)/(x^(1/2)+1), x = 1 .. 4) = -1-4*ln(2)+4*ln(3) 

Příklad 8 

> i8:=Int(1/(sqrt(x^2+1)-x), x=0..1);
 

(Typesetting:-mprintslash)([i8 := Int(1/((x^2+1)^(1/2)-x), x = 0 .. 1)], [Int(1/((x^2+1)^(1/2)-x), x = 0 .. 1)]) 

> assume(t>0);
 

> i8=simplify(changevar(sqrt(x^2+1)-x=t, i8, t));
 

Int(1/((x^2+1)^(1/2)-x), x = 0 .. 1) = 1/2*Int((1+t^2)/t^3, t = 2^(1/2)-1 .. 1) 

> i8=value(rhs(%));
 

Int(1/((x^2+1)^(1/2)-x), x = 0 .. 1) = -1/2*(-1+2*ln(2^(1/2)-1)*2^(1/2)-3*ln(2^(1/2)-1)+2^(1/2))/(-3+2*2^(1/2)) 

> i8=expand(rationalize((rhs(%))));
 

Int(1/((x^2+1)^(1/2)-x), x = 0 .. 1) = 1/2+1/2*2^(1/2)-1/2*ln(2^(1/2)-1)