Integration

>

Simple indefinite integrals

> I1:=int( x^3*sin(2*x) , x ) ;

I1 := -1/2*x^3*cos(2*x)+3/4*x^2*sin(2*x)-3/8*sin(2*...

Simple definite integrals

> I2:=int( x^2*ln(x) , x=2..3 );

I2 := -19/9+9*ln(3)-8/3*ln(2)

> I3:=int( ln(x)/x^2 , x=1..infinity);

I3 := 1

Many special functions appear when doing integrals

> I4:=int ( ln(x)/(1+x) , x );

I4 := dilog(1+x)+ln(x)*ln(1+x)

> I5:=int ( sqrt(1+x^3) , x=0..1 );

I5 := 2/5*sqrt(2)+2/5*3^(3/4)*EllipticK(1/4*sqrt(2)...

> evalf(I5);

1.111447979

Some integrals can simply not be done

> I6:=int( ln(1+x)*exp(-x^2) , x );

I6 := int(ln(1+x)*exp(-x^2),x)

> I7:=int( sin(1+x^2)/(1+exp(x)) , x=0..1 );

I7 := int(sin(1+x^2)/(1+exp(x)),x = 0 .. 1)

>

Maple is very good at integrals, but not good at writing the answer in the most sensible form.

Look at I8 below....the answer is real, but Maple uses I !!

Look at I9 below...the answer is equal to Pi*exp(-1) !!

> I8:=int( cos(x)/(1+x^2), x );

I8 := -1/2*I*(-I*Si(x-I)*sinh(1)+Ci(x-I)*cosh(1))+1...

> I9:=int( cos(x)/(1+x^2), x=-infinity..infinity );

I9 := -Pi*sinh(1)+Pi*cosh(1)

>

The student package

> with(student);

[D, Diff, Doubleint, Int, Limit, Lineint, Product, ...
[D, Diff, Doubleint, Int, Limit, Lineint, Product, ...

Int is an "inert" form of int:

> I10:=Int( x^3*sin(x), x);

I10 := Int(x^3*sin(x),x)

intparts takes two arguments: the first is an unevaluated integral, the second is the factor to differentiate

> I11:=intparts( I10, x^3 );

I11 := -x^3*cos(x)-Int(-3*x^2*cos(x),x)

> I12:=intparts( I11, x^2 );

I12 := -x^3*cos(x)+3*x^2*sin(x)+Int(-6*x*sin(x),x)

> I13:=intparts( I12, x );

I13 := -x^3*cos(x)+3*x^2*sin(x)+6*x*cos(x)-Int(6*co...

> I14:=intparts( I13, 1 );

I14 := -x^3*cos(x)+3*x^2*sin(x)+6*x*cos(x)-6*sin(x)...

changevar takes three arguments: the first is an equation defining x in terms of u, the second is an unevaluated integral, the third is the name of the new variable

> I15:=Int( x*sin(x^2), x);

I15 := Int(x*sin(x^2),x)

> I16:=changevar( x^2=u, I15, u );

I16 := Int(1/2*sin(u),u)

> I17:=Int( arcsin(x), x );

I17 := Int(arcsin(x),x)

Sometimes Maple does not do what you want.....

> I18:=changevar( x=sin(u), I17, u);

I18 := Int(arcsin(sin(u))*cos(u),u)

> I19:=Int(u*cos(u),u);

I19 := Int(u*cos(u),u)

To find the value of an unevaluated integral use "value"

> value(I19);

cos(u)+u*sin(u)

Partial fractions:

> a1:=(1+x^3)/(2+x+2*x^2+x^3);

a1 := (1+x^3)/(2+x+2*x^2+x^3)

> a2:=convert(a1,parfrac,x);

a2 := 1-7/5*1/(x+2)-1/5*(-1+3*x)/(1+x^2)

> a3:=1/(1+x^4);

a3 := 1/(1+x^4)

> a4:=convert(a3,parfrac,x);

a4 := 1/(1+x^4)

> a5:=convert(a3,parfrac,x,sqrt(2));

a5 := 1/4*(2+x*sqrt(2))/(x^2+x*sqrt(2)+1)-1/4*(-2+x...

> a6:=convert(a3,parfrac,x,{sqrt(2),I});

a6 := (-1/4-1/4*I)*sqrt(2)/(2*x-sqrt(2)-I*sqrt(2))+...

> a7:=convert(a3,parfrac,x,real);

a7 := (.5000000000+.3535533905*x)/(x^2+1.414213562*...

>

> int(a3,x);

1/8*sqrt(2)*ln((x^2+x*sqrt(2)+1)/(x^2-x*sqrt(2)+1))...

> int(a5,x);

1/8*sqrt(2)*ln(x^2+x*sqrt(2)+1)+1/4*sqrt(2)*arctan(...