Subject: Difference between area under curve and integrate
From: Alexander Klimov
Date: Mon, 9 Jan 2012 12:53:24 +0200
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