Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

** 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

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Sep 29, 2022
06:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 29, 2022
06:42 AM

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?

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Sep 29, 2022
08:31 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 29, 2022
08:31 AM

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

Sep 29, 2022
07:20 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 29, 2022
07:20 AM

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).

Sep 29, 2022
08:31 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 29, 2022
08:31 AM

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.

Sep 29, 2022
12:33 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 29, 2022
12:33 PM

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

Sep 29, 2022
07:52 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 29, 2022
07:52 PM

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

Sep 30, 2022
06:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 30, 2022
06:53 AM

Hi, there.

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

If you need any more help just ask.

Thanks

Sep 29, 2022
07:27 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 29, 2022
07:27 AM

@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?