Contents

Symbolic Integration: Second Stage


First method: Exponentials

A substitution

y = cx,  c constant

transforms the integrand into a rational function.

(%i3) integrate(exp(x)/(2 + 3*exp(2*x)), x);
					   x
				       3 %e
				 atan(-------)
				      sqrt(6)
(%o3) 				 -------------
				    sqrt(6)

When constants are used, Maxima may ask you about possible values of these constants. In the following example, the integral depends from the sign of the product a*b:

(%i4) integrate (exp(2*x)/(a + b*exp(4*x)), x);
Is  a b  positive or negative?

positive;
					  2 x
				      b %e
				atan(---------)
				     sqrt(a b)
(%o4) 			        ---------------
				  2 sqrt(a b)
(%i5) integrate (exp(2*x)/(a + b*exp(4*x)), x);
Is  a b  positive or negative?

negative;
				  2 x
			    2 b %e    - 2 sqrt(- a b)
			log(-------------------------)
				  2 x
			    2 b %e    + 2 sqrt(- a b)
(%o5) 		        ------------------------------
				4 sqrt(- a b)

When assumptions are used to inform Maxima about possible values of symbolic constants, no questions will be asked:

(%i6) assume(a>0, b<0);
(%o6) 			        [a > 0, b < 0]
(%i7) integrate (exp(2*x)/(a + b*exp(4*x)), x);
			       2 x
			 2 b %e	   - 2 sqrt(a) sqrt(- b)
		     log(-------------------------------)
			       2 x
			 2 b %e	   + 2 sqrt(a) sqrt(- b)
(%o7) 		     ------------------------------------
			     4 sqrt(a) sqrt(- b)

Second method: Integral powers of variables

A substitution

y = xk

where k is related to the greatest common divisor of the exponents, transforms the integrand into a simpler form.

(%i10) integrate (x^3*sin(x^2), x);
				  2     2      2
			     sin(x ) - x  cos(x )
(%o10) 			     --------------------
				      2
(%i11) integrate (x^7/(x^12 + 1), x);
					   4
					2 x  - 1
		     8	  4	   atan(--------)	 4
		log(x  - x  + 1)        sqrt(3)	    log(x  + 1)
(%o11) 	        ---------------- + -------------- - -----------
		       24	     4 sqrt(3)	        12

Third method: Rational roots of linear fractions.

The substitution

                 1/k
      /a*x + b\
y =  | ------- |
      \c*x + d/

gives a polynomial or a rational integrand.

(%i12) integrate (x*(x + 1)^(1/2), x);
				   5/2		  3/2
			  2 (x + 1)	 2 (x + 1)
(%o12) 			  ------------ - ------------
			       5	      3
(%i13) integrate (((x + 1)/(2*x + 3))^(1/2), x);
			    x + 1
		    4 sqrt(-------) - 2 sqrt(2)
			   2 x + 3
		log(---------------------------)
			    x + 1			 x + 1
		    4 sqrt(-------) + 2 sqrt(2)	   sqrt(-------)
			   2 x + 3		        2 x + 3
(%o13) 	     2 (-------------------------------- - -------------)
			   8 sqrt(2)		   8 (x + 1)
						   --------- - 4
						    2 x + 3

Fourth method: Chebyshev Integrals

This is a decision procedure for expressions of the form

A*xr*(c1 + c2*xq)p

where p, q, r are rational numbers.

(%i14) integrate (x^(1/2)*(1 + x)^(5/2), x);
		    x + 1		     x + 1
	 5 log(sqrt(-----) + 1)	  5 log(sqrt(-----) - 1)
		      x			       x
(%o14) - ---------------------- + ----------------------
		  128			   128

		    x + 1 7/2	    x + 1 5/2	    x + 1 3/2	        x + 1
		15 (-----)    + 73 (-----)    - 55 (-----)    + 15 sqrt(-----)
		      x		      x		      x			  x
	      + ---------------------------------------------------------------
			   4		  3		  2
		192 (x + 1)    768 (x + 1)    1152 (x + 1)    768 (x + 1)
		------------ - ------------ + ------------- - ----------- + 192
		      4		     3		    2		   x
		     x		    x		   x
(%i15) ratsimp(%);
		      x + 1		        x + 1		  4  x + 1 7/2
(%o15) - (15 log(sqrt(-----) + 1) - 15 log(sqrt(-----) - 1) - 30 x  (-----)
			x			  x		       x

		      4	 x + 1 5/2	  4  x + 1 3/2	     4	    x + 1
	       - 146 x  (-----)	   + 110 x  (-----)    - 30 x  sqrt(-----))/384
			   x		       x		      x
(%i16) integrate ( x^4*(1 - x^2)^(-5/2) ,x);
			    2
			   x		   2		    x
(%o16) 	  asin(x) + x (----------- - -------------) - --------------
			     2 3/2	     2 3/2		  2
		       (1 - x )	     3 (1 - x )	      3 sqrt(1 - x )

Fifth Method: Arctrigonometric Substitutions

(%i13) 'integrate (x^4/((1 - x^2)^(5/2)), x);
							 /      4
							 [     x
(%o13) 							 I ----------- dx
							 ]	 2 5/2
							 / (1 - x )
(%i14) ev (%, integrate);
						      2
						     x		     2		      x
(%o14) 				    asin(x) + x (----------- - -------------) - --------------
						       2 3/2	       2 3/2		    2
						 (1 - x )      3 (1 - x )       3 sqrt(1 - x )

(%i16) 'integrate (((a^2 + b^2 - b^2*y^2)^(1/2))/(1 - y^2), y);
						   /	     2  2    2	  2
						   [ sqrt(- b  y  + b  + a )
(%o16) 						   I ----------------------- dy
						   ]		  2
						   /	     1 - y
(%i17) ev(%, integrate);
			   2  2	   2    2	    2				    2  2    2	 2	     2
	       2 a sqrt(- b  y  + b  + a )	 2 a	     2	        2 a sqrt(- b  y  + b  + a )	  2 a	      2
	 a log(--------------------------- + ------------ + b )	  a log(--------------------------- + ------------ - b )
		      abs(2 y + 2)	     abs(2 y + 2)		       abs(2 y - 2)	      abs(2 y - 2)
(%o17) - ------------------------------------------------------ + ------------------------------------------------------
				   2							    2

															 2
															b  y
													 + b asin(----------------)
															4    2  2
														  sqrt(b  + a  b )

Sixth Method: Trigonometric functions

(%i8) integrate (sin(2*x)*cos(x), x);
							  cos(3 x)   cos(x)
(%o8) 						        - -------- - ------
							     6	       2
(%i9) integrate(sin(x)^2, x);
							       sin(2 x)
							   x - --------
								  2
(%o9) 							   ------------
								2
(%i10) integrate (sec(t)^2/(1 + sec(t)^2 - 3*tan(t)), t);
(%o10) 						 log(tan(t) - 2) - log(tan(t) - 1)
(%i11) integrate (1/(1 + cos(x)), x);
							      sin(x)
(%o11) 							    ----------
							    cos(x) + 1

Seventh Method: Rational function times an Exponential

(%i18) 'integrate (x*exp(x)/(x + 1)^2, x);
							   /	  x
							   [  x %e
(%o18) 							   I -------- dx
							   ]	    2
							   / (x + 1)
(%i19) ev(%, integrate);
								  x
								%e
(%o19) 							       -----
							       x + 1

(%i20) 'integrate ( (2*x^6 + 5*x^4 + x^3 + 4*x^2 + 1)/((x^2 + 1)^2)*exp(x^2), x);
										 2
					      /	    6	   4    3      2        x
					      [ (2 x  + 5 x  + x  + 4 x  + 1) %e
(%o20) 					      I ---------------------------------- dx
					      ]		      2	    2
					      /		    (x  + 1)
(%i21) ev(%, integrate);
									   2
							   3		  x
						       (2 x  + 2 x + 1) %e
(%o21) 						       ---------------------
								2
							     2 x  + 2

(%i22) integrate (exp(x^2), x);
		       sqrt(%pi) %i erf(%i x)
		     - ----------------------
				 2

Eight Method: Rational Function

Hermite reduction is used to compute the rational part of the integral. The transcendental part can be computed for integrands with special denominators, if that is not possible, an unevaluated integral is answered.

integrate (x/(x^3 + 1), x);
				  2 x - 1
		2	     atan(-------)
	   log(x  - x + 1)	  sqrt(3)    log(x + 1)
       	   --------------- + ------------- - ----------
		  6	        sqrt(3)		 3

Occasionally, Maxima gives an answer that contains an integral:

integrate((x^8+7*x^6+42*x^4+48*x^2+30)/(x^10+8*x^8+19*x^6+9*x^4+27) ,x)
		       /    2
		       [   x  + 1	        x
       		       I ----------- dx + -------------
		       ]  4    2	   4	  2
		       / x  - x  + 1	  x  + 6 x  + 9

Nineth Method: Arctrigonometric or Lorgarithmic Function with Rational Coefficients

(%i25) integrate (x^2*asin(x), x);
							  2	      2		       2
							 x  sqrt(1 - x )   2 sqrt(1 - x )
					   3	       - --------------- - --------------
					  x  asin(x)	        3		 3
(%o25) 					  ---------- - ----------------------------------
					      3			       3
(%i26) integrate (x* log(x), x);
							   2	       2
							  x  log(x)   x
(%o26) 							  --------- - --
							      2	      4

Tenth Method: Rational functions of Logarithms

(%i1) 'integrate (log(x)/(log(x) + 1)^2, x);
			      /
			      [	   log(x)
(%o1) 			      I ------------- dx
			      ]		    2
			      / (log(x) + 1)
(%i2) ev(%, integrate);
				      x
(%o2) 				  ----------
				  log(x) + 1

Eleventh Method: Expansion of the Integrand:

(%i3) integrate (x*(cos(x) + sin(x)), x);
(%o3) 		     x sin(x) + sin(x) - x cos(x) + cos(x)
(%i4) integrate ((x + exp(x))/exp(x), x);
					  - x
(%o4) 			      (- x - 1) %e    + x


Contents