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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Integration tool Problem

CW_10436044
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

Here is A turned into a function of b

Werner_E_0-1664454215623.png

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

Werner_E_0-1664456218490.png

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

Werner_E_1-1664456926000.png

you would use

Werner_E_2-1664456944521.png

to get the correct result.

 

View solution in original post

6 REPLIES 6

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

Here is A turned into a function of b

Werner_E_0-1664454215623.png

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

Werner_E_0-1664456218490.png

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

Werner_E_1-1664456926000.png

you would use

Werner_E_2-1664456944521.png

to get the correct result.

 

GeoffD
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 

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

GeoffD
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


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

Top Tags