Trouble Calculating Integral of Absolute Value of Polynomials using Maxima and abs_integrate

63 Views Asked by At

I am currently working on a Maxima script that is supposed to calculate the definite integral from -1 to 1 of the absolute value of any given polynomial 'p'. In my case, I've chosen 'p' to be 'x^3-1/4', but it could be any other polynomial.

load("abs_integrate");
normaU(p):=integrate(abs(p),x,-1,1);
normaU(x^3-(1/4));

wxmaxima code

When I run the code, Maxima returns the integral expression integrate(abs(x^3-1/4),x,-1,1), but does not evaluate it.

What's troubling is that this issue only arises when the polynomial is of degree 3 or higher. For lower degree polynomials, the integration seems to work fine.

I couldn't find much information about the 'abs_integrate' package and how it works, which is why I'm turning to this community for help.

Can anyone explain why this might be happening and how I could go about solving this issue? Any insights or suggestions would be greatly appreciated!

Thank you in advance.

0

There are 0 best solutions below