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

Trouble Using Trapezoidal Rule to Calculate Total Areas

MarineBeanpole
3-Newcomer

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!

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)

Werner_E_0-1648143705944.png

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

Werner_E_2-1648144367334.png

 

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

Werner_E_1-1648143772047.png

 

 

View solution in original post

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)

Werner_E_0-1648143705944.png

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

Werner_E_2-1648144367334.png

 

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

Werner_E_1-1648143772047.png

 

 

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.

 

Thank you for your help.

Fine, feel free to ask again if something still is unclear

Announcements

Top Tags