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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Mathcad 14 evaluates integration wrongly

xEnOn
1-Visitor

Mathcad 14 evaluates integration wrongly

It seems that my Mathcad 14 has given me a few wrong symbolic evaluation for indefinite integrations, or at least it is different from what I worked out on paper. Or are they actually the same?

The first one I had is this:

integrate(1-x).png

I tried to integrate this but apparent the answer is different from what I get from doing on paper. My answer is: -ln(1-x) instead of what Mathcad had given me.

The other one is this:

integrate(xlnx).png

The answer I get from doing by hand is ((x^2)/2)ln(x) - (3/4)x^2

How come Mathcad gives me an evalution that looks so different from what I do manually? And is Mathcad wrong?

Thanks.

6 REPLIES 6
PhilipOakley
12-Amethyst
(To:xEnOn)

The first answer is correct within a constant of integration. Remember that (x-1) = -1*(1-x), so when doing the log of the product you have a ln(-1), which is -i.pi as a the (complex) constant of intergation. This trips up many.

The second answer isn't what I get for intergal x*ln(x) dx, or (x^1)*ln(x) - I'm using V15 M005.

Philip

wayne
12-Amethyst
(To:xEnOn)

I am agreement with Philip, just adding comment:

If you want to see if two answers are the same, just subtract one from the other.

In the first case, if you do symbolically, you get 1.

rag
12-Amethyst
12-Amethyst
(To:wayne)

If you want to see if two answers are the same, just subtract one from the other.

In the first case, if you do symbolically, you get 1.

This would surprise me, as the difference should be i*pi or -i*pi (the ln(-1) that is). You have to assume x>1 or x<1 to get Mathcad to simplify it that way.

Concerning the second integral it seems, that the "3" in Ken'smanual solution is a mistake and should be a "1"

The solution he tells us he is getting from Mathcad I can only duplicate, if I format the "x" in "ln(x)" in a different style (not "Variable"). Then "ln(x)" is treated as a constant factor.

Regards

PhilipOakley
12-Amethyst
(To:rag)

Winfrod wrote:

Concerning the second integral it seems, that the "3" in Ken'smanual solution is a mistake and should be a "1"

The solution he tells us he is getting from Mathcad I can only duplicate, if I format the "x" in "ln(x)" in a different style (not "Variable"). Then "ln(x)" is treated as a constant factor.

It is good to see an explanation and a method of replication of the 'fault'.

The cases where the variable style changes can be tricky!

I'm guessing that the variable/constant style swap was the problem. In the newer veresions you can end up with variables that are in constant style (or is that vice versa). This is more obvious if you apply colour to the style. I use a soft brown for constants, which makes it more visible when the initial typing produces such 'mistakes'.

Philip

xEnOn
1-Visitor
(To:rag)

Apparently, the "x" in the ln(x) is set as a variable style in my evaluation.

RichardJ
19-Tanzanite
(To:xEnOn)

What is the style of the other x's?

Announcements

Top Tags