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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

What is wrong with this equation

YA_10963798
14-Alexandrite

What is wrong with this equation

All the variables are defined , However I couldn't figure out why it is not working

YA_10963798_0-1708507067916.png

 

ACCEPTED SOLUTION

Accepted Solutions

Careful!

Simply summing is not the same as integration

View solution in original post

5 REPLIES 5

Integration requires that you have a function defined over the entire range.  You've got q defined at discrete points.  You might try simple linear interpolation to define a function.

LucMeekes
23-Emerald III
(To:YA_10963798)

It's always better to attach the Prime worksheet, and state which version of Prime you are using.

Regarding the integration: You have a vector of values. Simply sum the vector values for the range that coincides with z going from 0 to DeltaL. You can use the summing operator for that.

 

Success!

Luc

Careful!

Simply summing is not the same as integration


@Fred_Kohlhepp wrote:

Careful!

Simply summing is not the same as integration


Agreed on, but not the way you had shown it.

To approximate the integral we must multiply the function values by the differences of the z-values.

In the example you gave these differences are constant 1 in, so you have to multiply the H-sum by 1 in, not by the total 4 in.

Furthermore you have to omit either the last or the first value in vector H to get the lower or upper rectangle sum.

The mean of this sum is what you get using trapezoid "integration".

Werner_E_0-1708554211627.png

 

trapezoid is the very same as what you should get by using linear interpolation. Adding dummy values at the end we even can get Prime to give us the result for the integral over the interpolated function.

Werner_E_1-1708554311634.png

 

 

Thank you from the bottom of my heart that was incredibly helpful

Announcements

Top Tags