How do I get get of Complex I when intergrating

i have Maple 12 Student edition. when i do a 5th intergration, and eval at Pi, i get a complex answer. how would i get it to display a rational answer ?

h := t-> (1+t^3*cos(t))^(1/5);
((D@@5)(h))(Pi); evalf(%); simplify(%);

-.1245723200-0.905070854e-1*I

D1 := D(h); D2 := D(D1); D3 := D(D2); D4 := D(D3); D5 := D(D4):fsolve(D5(Pi));

-.1245723200-0.9050708540e-1*I

thanks

alec's picture

surd

Use surd,

h := t-> surd(1+t^3*cos(t),5);

Alec

same result, different answer

thanks. i tried that:

h := t-> surd((1+t^3*cos(t))^(1/5), 5);
((D@@5)(h))(Pi); evalf(%); simplify(%)

and i now get a different complex answer:

0.0667880766 + 0.00843729634 I
0.06678807660 + 0.008437296340 I

hmmm...

alec's picture

Get rid of 1/5

surd is a replacement for ^(1/5), so get rid of that. Use h in the form I wrote it.

Alec

acer's picture

evalf

I'm not sure what you mean by the term "intergration"[sic] in this context..

Are you saying that you want an exact result, instead of a floating-point approximation? If so, then don't apply evalf to the result.

Are you also saying that you are seeking a purely real result, with no nonzero imaginary component? If so then read the help-page ?root and note the item describing the "principal root". Maybe you do not actually intend to use the power 1/5, which will behave according to that description.

> h := t-> (1+t^3*cos(t))^(1/5):
> res := ((D@@5)(h))(Pi):
> simplify(res);
        1/5                              3          2          10           6
- 3 (-1)    (12500 - 60000 Pi + 140000 Pi  - 3125 Pi  - 2856 Pi   - 90000 Pi
 
                4            7           9           8          5         12
     - 468000 Pi  - 244800 Pi  - 63200 Pi  + 20250 Pi  - 5000 Pi  + 700 Pi
 
               11         14    /               3 24/5
     - 13000 Pi   + 875 Pi  )  /  (3125 (-1 + Pi )    )
                              /
 
> evalf(%);
                        -0.1245723166 - 0.09050708583 I
 
> H := t-> surd( (1+t^3*cos(t)), 5 ):
> Res := ((D@@5)(H))(Pi):
> simplify(Res);
                               3          2          10           6
3 (12500 - 60000 Pi + 140000 Pi  - 3125 Pi  - 2856 Pi   - 90000 Pi
 
                4            7           9           8          5         12
     - 468000 Pi  - 244800 Pi  - 63200 Pi  + 20250 Pi  - 5000 Pi  + 700 Pi
 
               11         14    /               3 24/5
     - 13000 Pi   + 875 Pi  )  /  (3125 (-1 + Pi )    )
                              /
 
> evalf(%);
                                 0.1539798515

> evalf(-(-1)^(1/5));
                        -0.8090169944 - 0.5877852523 I
 
> % * %%;
                       -0.1245723167 - 0.09050708586 I

So, the second result, Res, is purely real, and exact.

Notice that the exact results res and Res differ by a factor of -(-1)^(1/5), and that Maple takes that using the principal root concept mentioned in that help-page.

Do you truly intent to convey that the answer should be an exactly equal to some rational number, and if so, why? Or did you simply intead "real", instead of "rational"?

acer

THAT DID IT !

i removed the 1/5. thanks. you saved my ass ;-)

restart; H := t->surd(1+t^3*cos(t), 5) end proc;Res := ((D@@5)(H))(Pi);simplify(Res); evalf(%)

0.1539798515

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}