Difference between area under curve and integrate



"If you want the number there is no point to do symbolic integration:"

Yes, but sometimes you want the solution in exact form.  This integral 
evaluates to gamma_incomplete(1/3,-1)/3-gamma_incomplete(1/3,8)/3 which is 
an exact form and better than just a number.  Except that in this case it is 
wrong.

Rich




-----Original Message----- 
From: Alexander Klimov
Sent: Monday, January 09, 2012 5:53 AM
To: Richard Hennessy
Cc: Maxima List
Subject: Re: [Maxima] Difference between area under curve and integrate

On Sun, 8 Jan 2012, Richard Hennessy wrote:
> Is there a way to force Maxima to try to find a real solution to an
> integration problem so that it represents the area under the curve
> in cases where you get a complex number?
>
> Consider,
> kill(all)$
> load(abs_integrate)$
> rectform(float(rectform(integrate(exp(-signum(x-1)*x^3),x,-1,2))));
> 0.22200130530517 - 1.162123315419017 %i
>
> If you plot the integrand it is just a real valued function with a
> well defined area under it but in this case it gives a complex
> number for an answer.

If you want the number there is no point to do symbolic integration:

(%i1) quad_qags(exp(-signum(x-1)*x^3),x,-1,2);
(%o1)         [2.234857932271402, 7.871672202952595e-10, 441, 0]

-- 
Regards,
ASK