I am sure that this has been reported before.
> assume(-3<t);additionally(t<3); > about(t); Originally t, renamed t~: is assumed to be: RealRange(Open(-3),Open(3)) > int(2/(t^2-9),t); > int(-2/(9-t^2),t); > -int(2/(9-t^2),t);
In each case the solution is 1/3ln(t~-3)-1/3ln(t~+3)
. Maple does not recognize the
domain of the integrand at all and we have the log of a negative number. Ugly.
If you allow for the constant of integration to be complex, then the result makes sense. If you evaluate this anitiderivative between real limits, you will get a real answer.
I do realize, however, that this is difficult to explain to a beginning calculus student when you’re trying to teach them Maple.
From the online help of ‘int’ the statement:
Note that no constant of integration appears in the result.
Therefore the integral of an real valued integrand can have a constant imaginary part;
> restart; > assume(-3<t, t<3); > int(2/(t^2-9),t): > evalc(%): > J := %; J := 1/3 ln(3 - t) - 1/3 ln(t + 3) + 1/3 I Pi > Jr := Re(J); Jr := 1/3 ln(3 - t) - 1/3 ln(t + 3)
For -3 < t < 3
this is a real valued expression.
Try:
> f := int(2/(x^2-9),x=0..t);
and Maple will recognize the assumption made on t.