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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

3-Visitor

## Trouble Using Trapezoidal Rule to Calculate Total Areas

I am struggling to get MathCAD Prime 7.0 to multiply two sets of data in order to find a total area. I know that the solution should be simple, but I cannot find the right way to go about getting the program to output the desired information without running into an error.

The question that I am attempting to solve is attached and so is the PDF of my current workings on MathCAD.

Any help or pointers would be greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions

Additionally to pictures and pdfs you should always attach your worksheet as well!

You should x define as  a vector, not a range. Then you should vectorize the function call f(x) to be on the save side even though it would not be necessary given your function is x^4.

Furthermore your approach ignores the fact that the lower integral limit is a=15 and not zero!

After correcting those errors it may look like this (done in MC15)

You can get rid of the vector "Multiplier" by using

But you may consider to write a utility function "trapezoid" to do the job so you can compare the results with different numbers for the ordinates easily

3 REPLIES 3

Additionally to pictures and pdfs you should always attach your worksheet as well!

You should x define as  a vector, not a range. Then you should vectorize the function call f(x) to be on the save side even though it would not be necessary given your function is x^4.

Furthermore your approach ignores the fact that the lower integral limit is a=15 and not zero!

After correcting those errors it may look like this (done in MC15)

You can get rid of the vector "Multiplier" by using

But you may consider to write a utility function "trapezoid" to do the job so you can compare the results with different numbers for the ordinates easily

3-Visitor
(To:Werner_E)

Thanks very much for your help Werner_E!

I've attached the .mcdx sheet that I was originally working with, but I will definitely use your input above and attempt to rectify my errors.