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 called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

3-Visitor

## Integration tool Problem

Hi All,

I'm trying to calculate the properties of a weld. As part of this i need to integrate to the shape area to find area, second moment of area, etc.

One of the piece wise function's gives an error once i go over a certain number on the depth.

The function works fine when calculating properties about the x axis but not the Yaxis. Please find the problematic function attached.

Any idea's how to fix this?

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:Werner_E)

Here is A turned into a function of b

As we can see, the algorithm used by Mathcad ever so often misses the two peaks for certain end values.

I wrote a quick (and inefficient) integral function just to show what it should look like

But I won't recommend using this function as it is.

To improve the results of Mathcads integrals you may decrease the value of TOL or chose a different integration method. But neither helps in your case.

I guess you should follow the advice given in the help which says

• Sharply-peaked integrands, discontinuous integrands, or integrands whose shape is not readily characterized by a single length scale, may not evaluate accurately. We recommend integrating such functions by parts. See methods of numerical integration for more detail.

So instead of

you would use

to get the correct result.

6 REPLIES 6
24-Ruby V
(To:CW_10436044)

Which error do you encounter?

I can't see any error message in your sheet.

EDIT: Ah, I see! You were not talking about a Mathcad error but rather about wrong results. The numeric integration of your step function has a of of strange results at various values of b. You can see it clearer if you turn A into a function of b and plot it against b.
Not sure how to fix this other than calculating the area without an integral (which is easy in case of your function but may be a problem with others).

24-Ruby V
(To:Werner_E)

Here is A turned into a function of b

As we can see, the algorithm used by Mathcad ever so often misses the two peaks for certain end values.

I wrote a quick (and inefficient) integral function just to show what it should look like

But I won't recommend using this function as it is.

To improve the results of Mathcads integrals you may decrease the value of TOL or chose a different integration method. But neither helps in your case.

I guess you should follow the advice given in the help which says

• Sharply-peaked integrands, discontinuous integrands, or integrands whose shape is not readily characterized by a single length scale, may not evaluate accurately. We recommend integrating such functions by parts. See methods of numerical integration for more detail.

So instead of

you would use

to get the correct result.

13-Aquamarine
(To:Werner_E)

Hi,

I have had similar problems when working with point loads on beams.

Things that I have found to sometimes work are:

1) Using the adaptive RungeKutta integration option

2) Convert the square pulse into a cosine pulse with the same area as the pulse.

See attached

3-Visitor
(To:GeoffD)

Thanks,

I have mathcad 15, so I can't open your file. Can you put up a screenshot?

It's been a while since I have done much calculus.

Thanks

13-Aquamarine
(To:CW_10436044)

Hi, there.

Attached is a pdf - which Prime 8 is good at producing.

If you need any more help just ask.

Thanks

24-Ruby II
(To:CW_10436044)

@CW_10436044 wrote:

....One of the piece wise function's gives an error once i go over a certain number on the depth...

1. Please show a screenshot of this error.

2. What version of the program are you using?

Announcements
Top Tags