Why can't maple solve the integral $\int x^2 \sqrt{R^2-x^2} dx$?

299 Views Asked by At

I ran into this integral in a problem in which I was trying to calculate moment of inertia.

I used Maple to try to solve it but Maple just returns the integral itself. I do not know why it can't do the trigonometric substitution and solve the integral.

int(x^2*sqrt(R^2 - x^2), x = 0 .. R)
2

There are 2 best solutions below

0
On

Here is what I get. Maple 2019.2

image

Did you get that warning? If not, perhaps you turned it off in one of your preferences.

0
On

You asked "why" it happens. It happens because the answer depends on the whether R is greater or less then 0, and you have not told Maple what to do about that. In the syntax of Maple's int command the range 0..R does not by itself imply that R is greater than 0. That syntax also allows for inverted ranges.

When I execute your original call I get the following warning in addition to the unevaluated result.

int(x^2*sqrt(R^2-x^2),x=0..R);

Warning, unable to determine if -R is
between 0 and R; try to use assumptions
or use the AllSolutions option

Warnings are usually emitted for a good reason, and it is a good idea to learn to try and read them. Suitably following either of its two suggestions can obtain an answer.

The following answer contains a piecewise.

int(x^2*sqrt(R^2-x^2),x=0..R,allsolutions);

         4    /{ -1        R <= 0\
   1/16 R  Pi |{                 |
              \{ 1         0 < R /   

Using assumptions we could separately attain either of those two conditional results.

int(x^2*sqrt(R^2-x^2),x=0..R) assuming R>0;

             4
            R  Pi
            -----
             16

int(x^2*sqrt(R^2-x^2),x=0..R) assuming R<0;

             4
            R  Pi
          - -----
             16

Another good idea is reading the Help page for the int command, and its related page for Help topic int,details. These are avaliable offline, in the product's own Help system. It contains examples of the functionality I used here.