Skip to main content
Best answer by Werner_E

How about this approach?

Note that you must use the old legacy symbolics (muPad). It will not work when using the new friCAS.

clipboard_image_1.png

Worksheet in P6 format attached.

6 replies

25-Diamond I
October 17, 2019

Mathcad and Prime never had much luck with integrals, neither symbolically nor numerical as in your example.

Defining the function in a different way like the two shown in the pic does not help much:

clipboard_image_0.png

23-Emerald IV
October 17, 2019

Not necessarily restricted to Prime 6, Prime 4 shows the same.

Mathcad 11 too:

clipboard_image_0.png

The value of TOL has some effect.

As usual, symbolics is right:

clipboard_image_1.png

How is that in Prime?

 

Luc

25-Diamond I
October 17, 2019

clipboard_image_1.png

How is that in Prime?


Here you are!

I gave it a try with Prime 6 using the new and future symbolics (friCAS) and the old one (muPad). The new symbolic is not really convincing. The simplification of muPad is (even without using simplify) even more compact than your Maple result 😉

clipboard_image_0.png

21-Topaz II
October 17, 2019

Hi,

you shouldn't square the function containing the Heaviside function but only the function defined in the window created with the step function. See the picture:

ttokoro bug.jpg 

don't square U(t). However, the rms is still zero.....

23-Emerald IV
October 17, 2019

Squaring the sine 'within' gives you a different function:

clipboard_image_0.png

with a different symbolic result:

clipboard_image_1.png

but numerically it's still flawed...

clipboard_image_2.png

Luc

25-Diamond I
October 17, 2019

I think you misunderstood what Francesco meant.

 

The idea was not to replace V(t) by his U(t) but rather replace V(t)^2 by his U(t).

I am not sure what the benefit of doing so would be, though.

 

BTW, here is more clearly the deficiency of the new symbolics (friCAS) in Prime when it comes to integration with the Heaviside function with the step inside the integration interval:

clipboard_image_1.png

We always moaned about Prime would not be developed (or not fast enough). Replacing the very old symbolics engine muPad by a new, more modern one sure is a good a big development step. When we moaned in the past about development, have we forgot to state the direction in which we would like to see development taking place? We did not meant the direction of making things worse!!

ttokoro
21-Topaz I
ttokoro21-Topaz IAuthor
21-Topaz I
October 18, 2019

image.pngUsing 3D plot, the bug region is visible.

For Fourier analysis, if the signal is f(t)=-f(t+T/2) integral from 0 to pi is OK. Otherwise, we should integral from 0 to 2*pi. Therefore, this bug is sever problem.

 

t.t.
Werner_E25-Diamond IAnswer
25-Diamond I
October 18, 2019

How about this approach?

Note that you must use the old legacy symbolics (muPad). It will not work when using the new friCAS.

clipboard_image_1.png

Worksheet in P6 format attached.

21-Topaz II
October 18, 2019

Hi,

Mathcad 15 gives almost the same results. However, if we change the integration algorithm the result is not null; see photo:

ttokoro bug +.jpg

23-Emerald I
October 18, 2019

Attached is a slightly different approach (Prime 6.0)

ttokoro
21-Topaz I
ttokoro21-Topaz IAuthor
21-Topaz I
October 18, 2019

Thanks for using time for my question.

In electricel engineering RMS of sin(t) must 1/sqrt(2)=0.7. The denominator is fixed to T, that is a period of fundamental signal, in this case 2pi.

t.t.