I have some data
rA = [-0.2 -0.0167 -0.00488 -0.00286 -0.00204];
X = [0 0.1 0.4 0.7 0.9];
and I made a plot of rA/60 vs. X.
If I want to numerically integrate this between X = X1 and X = X2, how can I do that? What is important to note is that I don't only want to be bounded by having to do it for the data points. For example, suppose I want to numerically integrate from X = 0.5 to X = 0.6, how might I do that? trapz seems to only let me integrate the whole thing.
I have an equation Volume = integral(dX/rA) from bounds X1 to X2. rA is a function of X, although not well defined. I need to initially solve for X1. How might I make it so that it will integrate until it reaches an X2 such that the integral equates to the known Volume?