cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Bug in symbolic integration?

ifomenko
15-Moonstone

Bug in symbolic integration?

I try to get formula for ellipse area in polar coordinates. I've got it but symbolic result is wrong. I can`t understand why?

Symbolic Area is zero.GIF

One more example with strange behaviour

Symbolic integration bug-2.GIF

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:ifomenko)

The Mupad version licensed by PTC for Mathcad seems to be very old and also quite limited in functionality (compared to whats possible in Matlab).

View solution in original post

14 REPLIES 14
LucMeekes
23-Emerald III
(To:ifomenko)

No, I'd rather think it's a bug in your formulation of the integral. Why additionally integrate from 0 to 1?

Ellipse.png

ifomenko
15-Moonstone
(To:LucMeekes)

Symbolic Area is zero (answer).GIF

LucMeekes
23-Emerald III
(To:ifomenko)

Check my attachment (I've attached the file to my first reply), and see where a difference (if any) occurs.

 

Success!
Luc

Werner_E
25-Diamond I
(To:LucMeekes)

Hi Luc!

Here's your file displayed in Mathcad 15.

The main difference seems to be Maple vs. Mupad.

Not sure though, why the plot looks different.

Bild.png

ifomenko
15-Moonstone
(To:LucMeekes)

I've got the same as Werner

Werner_E
25-Diamond I
(To:ifomenko)

Before evaluting the definite integral, Mathcads symbolics calculates the indefinite one and I guess that the problem lies here.

The expression MuPad calculates seems not to be valid for the full range of t (or its wrong completely?)

I guess that Lucs MC11 with Maple gives a different result

Bild.png

ifomenko
15-Moonstone
(To:Werner_E)

And,so is this Achilles' heel?

LucMeekes
23-Emerald III
(To:Werner_E)

It is quite different,... and wide.

For the curious I've copied the symbolic result to a new equation, stretched over two lines.

(You don't want to see what symplify does):

EllipseArea.png

 


@WernerExinger wrote:

Before evaluting the definite integral, Mathcads symbolics calculates the indefinite one and I guess that the problem lies here.


Then why is the polar plot already different?

 

Luc

LucMeekes
23-Emerald III
(To:LucMeekes)

But this is interesting:

EllipseSector.png

ifomenko
15-Moonstone
(To:LucMeekes)

unfortunately,assumptions a>0,b>0,t=real don't change situation.

what about MC Prime 4?

LucMeekes
23-Emerald III
(To:ifomenko)

Can't check, I'm limited to express.

 

Luc

Werner_E
25-Diamond I
(To:LucMeekes)




Then why is the polar plot already different?



This has nothing to do with the math, the expression and the symbolics.

Its seems that tha way, Mathcad choses the limits if you dont do it yourself has changed since version 11. You set the upper limit for r to 6 but the lower limit was chosen automatically by MC, MC had chosen r=0, MC15 chooses r=3. If change this manually to 0, I get the very same result as seen in your screenshot (see left plot in my pic).

Bild.png

Mupad in Mathcad always had very big problems with indefinite and also definite integrals in the past. It was horrible in MC14 and they changed a lot with MC15, but still we find bugs and errors. This seems to be one of them again.

Not sure if it makes sense to report it to PTC as they seem to have no interest in improving or at least bug fixing Mathcad and when it comes to the symbolics (MuPad) they are dependent on Mathworks.

 

ifomenko
15-Moonstone
(To:Werner_E)

I've checked this integral in matlab.Their MuPAD provide correct result.

Werner_E
25-Diamond I
(To:ifomenko)

The Mupad version licensed by PTC for Mathcad seems to be very old and also quite limited in functionality (compared to whats possible in Matlab).

Announcements

Top Tags