Math 166
Computer Lab #7
Improper Integrals
Help on problem 3c and 3d

3. In this problem, we are going to be integrating x^(-1/3) over several different intervals.

c)  Now ask Mathematica to compute the definite integral over the range -1 to 3.  Your result is probably a complex number, which can't possibly be right.  What is going wrong?

(* If you issue an Integrate command, Mathematica  *)
(* gives you a reasonable answer that is not       *)
(* simplified.                                     *)

Integrate[x^(-1/3),{x,-1,3}]

(* If YOU replace (-1)^(2/3) by 1, everything      *)
(* works out fine.                                 *)

N[-3/2 + 3 * 3^(2/3)/2]

(* But if you ask Mathematica to replace (-1)^(2/3) *)
(* by a numerical value, it gets an unreasonable    *)
(* complex number!                                  *)
(*                                                  *)
(* This is the strange result we were expecting     *)
(* you to get here.                                 *)

N[Integrate[x^(-1/3),{x,-1,3}]]

d) Find the correct integral of 1/x^(1/3) from -1 to 3.

(* Now to do this part correctly, you should             *)

(* 1) set up the TWO integrals you need, from -1 to "b"  *)
(*    and from "a" to 3, since the "bad" argument value  *)
(*    is inside the integration range,                   *)

(* 2) Have Mathematica find the limit of each of these   *)
(*    integrals, as b goes to 0, and as a goes to 0.     *)

(* 3) Add the results.                                   *)

(* However, you may run up against the same problem that *)
(* occurred in problem 3c: Mathematica cannot produce    *)
(* a useful numerical value for (-1)^(2/3).              *)
(*                                                       *)
(* So when you carry out step 1 for the integral from    *)
(* -1 to b, look carefully at the result, and replace    *)
(* (-1)^(2/3) by 1, before proceeding.                   *)