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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

A confusing integration encountered in chemisoption calculation

FanCG
1-Visitor

A confusing integration encountered in chemisoption calculation

Hi, everyone

i encountered a integration recently, which cannot be evaluated correctly in my mathcad. i solved this problem with maple. can anybody give me some suggestions on how to integrate it in mathcad?

here is the integration, mathcad doesnot want to give a definite answer

confused integ mcd.JPG

and i have to resort to maple, and got,

confused integ mw.JPG

16 REPLIES 16
f.kohlhepp
12-Amethyst
(To:FanCG)

Fan CG wrote:

Hi, everyone

i encountered a integration recently, which cannot be evaluated correctly in my mathcad. i solved this problem with maple. can anybody give me some suggestions on how to integrate it in mathcad?

here is the integration, mathcad doesnot want to give a definite answer

confused integ mcd.JPG

and i have to resort to maple, and got,

confused integ mw.JPG

Maybe my old eyes deceive me; but it looks like (in the Mathcad expression you have (t/t)^3 {not t/tau)^3 in the denominator of the first fraction.

Since I've still got version 11 (with Maple!) it won't help if I check.

RichardJ
19-Tanzanite
(To:f.kohlhepp)

Maybe my old eyes deceive me; but it looks like (in the Mathcad expression you have (t/t)^3 {not t/tau)^3 in the denominator of the first fraction.

Good observation, but it doesn't help. Neither the MuPad engine in MC15 nor the Maple engine in MC11 can solve the integral.

wayne
12-Amethyst
(To:FanCG)

Fan CG,

I think f.kohlhepp is correct, you have a t instead of tau;

However, I think you have found a new way to calculate the number 1, clever.

Joking aside, the maple solution reduces to 1. I cannot get a symplic solution in Mathcad either, but numerically I get 1, or very close to 1 for a wide range of values of tau and B.

Maybe it's me, but it seams that Mathcad will only go so far symbolically, I must complete by eye. Mathcad does not simpify the Maple solution to 1, and neither, apparently, does Maple.

Wayne

RichardJ
19-Tanzanite
(To:wayne)

Joking aside, the maple solution reduces to 1.

No it doesn't.

numerically I get 1, or very close to 1 for a wide range of values of tau and B.

You need to try a wider range

Maybe it's me, but it seams that Mathcad will only go so far symbolically, I must complete by eye.

Sometimes the symbolic processor does need a little coaxing to get it to the solution, and sometimes it does not find the solution, even when one exists. You should be very careful about "completing it by eye" though, because maybe it's not the symbolic processor that is wrong.

Mathcad does not simpify the Maple solution to 1, and neither, apparently, does Maple.

You are making a mistake that is very common. You are making implicit asssumptions about the domain of tau and B, but the symbolic processor does not do that. You are assuming they are both real and positive, but the symbolic processor does not even make the assumption that they are real, let alone positive.

wayne
12-Amethyst
(To:RichardJ)

Thanks, Richard

you humbled student (wheather you want one or not)

FanCG
1-Visitor
(To:RichardJ)

i learnt so much from your reply

FanCG
1-Visitor
(To:FanCG)

thanks, f.kohlhepp and Richard. Maybe mathcad cannot solve this.

wayne
12-Amethyst
(To:FanCG)

Don't give up so fast.

See the attahced, not very clean, just messing around, but I think you can solve the problem with more information.

For a real solution, and for real values of B and Tao, mathcad can find a solution.

Do the physics of the problem add any information that can be used? I am sure it does.

RichardJ
19-Tanzanite
(To:wayne)

Nice job of getting the solutoin for two parts of the domain. If you simplify your solution for those domains you will find that you get the same answer as the Maple solution simplified over those domains.

I agree that tau an B cannot be zero, but if the Maple answer is correct then your statement that B and tau must be of the same sign to get a real solution is not correct.

RichardJ
19-Tanzanite
(To:RichardJ)

However, if we look at the behavior of the kernel it seems the Maple solution is actually not correct!

wayne
12-Amethyst
(To:RichardJ)

Assuming I didn't make a mistake in changing the format of the integral by moving the constants out,

I am pretty sure the integral is always real

The constant, however, you will be taking the root of a negative number if Ba and tao are not the same sign.

Anyway, with your comments, I see that what may appear to be problem with Mathcad, many times it is actually the user (me for example)
not taking the time to understand what the problem is. Mathcad is a tool, not an end.

Bloviating again, I see a lot of posts about the limitations of Mathcad, but the more I participate in the collab, the more I appreciate it's capabilities.

In another post, the comparison to a spell checker was made, regarging units. But If i cant' get close enough to the correct spelling, I may not get a result back, or worse, get the wrong word.

RichardJ
19-Tanzanite
(To:wayne)

I am pretty sure the integral is always real

Yes, I think you are correct. Which confirms that the Maple answer can't be right.

IRstuff
12-Amethyst
(To:RichardJ)

I tried the kernel of the integral in the online Mathematica integrator and it said there was no solution.

TTFN

RichardJ
19-Tanzanite
(To:IRstuff)

Good idea! it's nice to get one more confirming piece of information!

LouP
12-Amethyst
(To:RichardJ)

Assuming that both B and tau are real, then the Maple solution in the original post is correct as long as the integral exists. Although not explicit in this post, it has already been pointed out that the integral exists (is finite) only when B and tau have the same sign. When both are positive, the integral = 1 independent of B and tau. When both are negative, then integral = -exp(-|B|) = -exp(B). The Maple expression reduces to these forms, as shown in RJ's sheet for these specific cases. I don't know why the original result is presented in such an obtuse form.

Mathcad can solve the integral, as Wayne's sheet shows. However, since tau*sqrt[1/(B*tau^3)] and sqrt[1/(B*tau)] are not the same for B & tau negative, the "alterate form" and the case 2 solution are incorrect.

For the physical problem, I would imagine that tau is a real, positive time constant, which would require that B also be positive for the integral to exist, in which case its value is indeed always = 1. Is this a probability density for some process that is functionally dependent on the parameters B, tau? This would be consistent with the integral=1 condition.

I'm embarrassed to say that I had to convince myself of the solution by pen & paper, since I don't completely trust the symbolics. For positive parameters, it's easy to show independence of the integral on tau, leaving only a possible integral =I(B). One can show that dI(B)/dB=0 for B>0, establishing it as a constant fct. Then evaluate at a fixed B(=1 or =0). Separating magnitudes and sign in the original integral, it is straightforward to show that Int(B<0, tau<0) = -Int(|B|)*exp(-|B|), which is consistent with the Maple result since Int(|B|)=1.

Lou

RichardJ
19-Tanzanite
(To:LouP)

Assuming that both B and tau are real, then the Maple solution in the original post is correct as long as the integral exists.

Yes, but when the integral does not exist it's wrong.

Maybe Maple included some information about the valid domain of the solution that did not get copied to the forum post, but without such information the Maple solution is not correct.

However, since tau*sqrt[1/(B*tau^3)] and sqrt[1/(B*tau)] are not the same for B & tau negative, the "alterate form" and the case 2 solution are incorrect.

Yes, you are correct. I missed that. Rather ironically, it's the second example in the worksheet I posted: the square root of x squared is not equal to x.

Announcements

Top Tags