calculating area under graph

jeamy12

New member
Joined
Oct 20, 2013
Messages
3
Hi i am trying to obtain the shaded area under the graph from 0 - 5000.
There are 2 graph in this picture.

I know that integration, Simpson, trapezium rule works but i not sure how to use those formula as i never study amath.

#This are the value to plot the graph
REDX1 = [+15E+03, +11E+03, +8E+03, +4E+03, +1E+03, +552E+00, -708E+00, -8E+03, -8E+00, +10E+03, +15E+03]
REDY1 = [+30E-06, +13E-06, +2E-06, -179E-09, -7E-06, -19E-06, -30E-06, -10E-06, -1.9E-06, +30E-06, +30E-06]
BlackX2 = [+10E+03, +4E+03, +447E+00, -4E+03, -6E+03, -9E+03, -4E+03,-122E+00, 4E+03, +9.E+03,+10E+03]
BlackY2 = [+27E-06,+28E-06,+28E-06,+27E-06,+28E-06,-30E-06,-28E-06,-27E-06,+27E-06,+29E-06,+27E-06]

123456.jpg
 
Hi i am trying to obtain the shaded area under the graph from 0 - 5000.
There are 2 graph in this picture.

I know that integration, Simpson, trapezium rule works but i not sure how to use those formula as i never study amath.

#This are the value to plot the graph
REDX1 = [+15E+03, +11E+03, +8E+03, +4E+03, +1E+03, +552E+00, -708E+00, -8E+03, -8E+00, +10E+03, +15E+03]
REDY1 = [+30E-06, +13E-06, +2E-06, -179E-09, -7E-06, -19E-06, -30E-06, -10E-06, -1.9E-06, +30E-06, +30E-06]
BlackX2 = [+10E+03, +4E+03, +447E+00, -4E+03, -6E+03, -9E+03, -4E+03,-122E+00, 4E+03, +9.E+03,+10E+03]
BlackY2 = [+27E-06,+28E-06,+28E-06,+27E-06,+28E-06,-30E-06,-28E-06,-27E-06,+27E-06,+29E-06,+27E-06]

View attachment 3340

In theory, area under a graph is the integral of the top function minus the bottom function evaluated from [a,b]. In this case [a,b] is [0,5000], but I can't make heads or tails out of what the top and bottom functions are.
 
Hi i am trying to obtain the shaded area under the graph from 0 - 5000.
There are 2 graph in this picture.

I know that integration, Simpson, trapezium rule works but i not sure how to use those formula as i never study amath.

#This are the value to plot the graph
REDX1 = [+15E+03, +11E+03, +8E+03, +4E+03, +1E+03, +552E+00, -708E+00, -8E+03, -8E+00, +10E+03, +15E+03]
REDY1 = [+30E-06, +13E-06, +2E-06, -179E-09, -7E-06, -19E-06, -30E-06, -10E-06, -1.9E-06, +30E-06, +30E-06]
BlackX2 = [+10E+03, +4E+03, +447E+00, -4E+03, -6E+03, -9E+03, -4E+03,-122E+00, 4E+03, +9.E+03,+10E+03]
BlackY2 = [+27E-06,+28E-06,+28E-06,+27E-06,+28E-06,-30E-06,-28E-06,-27E-06,+27E-06,+29E-06,+27E-06]

View attachment 3340
The question is not completely clear. Perhaps you could back up and tell us more about what the numbers represent.

It looks like you want the area that is inside the black figure and also below the red figure. I have extracted what I think are the relevant points on each curve:
REDX1 = [+8E+03, +4E+03, +1E+03, +552E+00, -708E+00]
REDY1 = [+2E-06, -179E-09, -7E-06, -19E-06, -30E-06]
BlackX2 = [ -4E+03,-122E+00, 4E+03,+9.E+03]
BlackY2 = [-28E-06,-27E-06,+27E-06,+29E-06]


For each point on the red line, interpolate to find the corresponding point on the black line, that is, Y2 as a function of X1.
Also interpolate in both lines to find Y1(X=0), Y1(X=5000), Y2(X=0), and Y2(X=5000)
Then you will be able to find the difference (Y1 - Y2) as a function of X, at five values of X.
If you draw that on a larger scale, and draw vertical lines at each value of X, you will form four trapezoids. Can you find those four areas and add then up?

Please show us what you can do with theses hints - or tell us what the problem really is.
 
#This are the value to plot the graph
REDX1 = [15000, +11000, +8000, +4000, +1000, +552, -708, -8000, -8, +10000, +15000]
REDY1 = [+30E-06, +13E-06, +2E-06, -179E-09, -7E-06, -19E-06, -30E-06, -10E-06, -1.9E-06, +30E-06, +30E-06]
BlackX2 = [+10E+03, +4E+03, +447E+00, -4E+03, -6E+03, -9E+03, -4E+03,-122E+00, 4E+03, +9.E+03,+10E+03]
BlackY2 = [+27E-06,+28E-06,+28E-06,+27E-06,+28E-06,-30E-06,-28E-06,-27E-06,+27E-06,+29E-06,+27E-06]

E-06 is something like Value x 10 to the power of -6
There are 2 graph in the picture..
RedX1 and RedY1 is used to plot the red color graph
BlackX2 and BlackY2 is used to plot the black color graph

I am trying to get the area under the graph when both line intercepted ( The Shaded portion in the picture )
 
The first thing you should do is sort your x values in increasing order and, of course, write your y values by the corresponding x values. Only one of the "red" graphs is relevant and it wasn't clear, in your initial post, whether that was "red1" or "red2" but apparently, from your new post it is "red1". Are we to assume that the y values correspond to the x values in the given order? That is, x= 15000 corresponds to y= "30 E-06"= 0.000006; x= 11000 corresponds to y= "13 E=-06"= 0.0000013, etc.
 
#This are the value to plot the graph
REDX1 = [15000, +11000, +8000, +4000, +1000, +552, -708, -8000, -8, +10000, +15000]
REDY1 = [+30E-06, +13E-06, +2E-06, -179E-09, -7E-06, -19E-06, -30E-06, -10E-06, -1.9E-06, +30E-06, +30E-06]
BlackX2 = [+10E+03, +4E+03, +447E+00, -4E+03, -6E+03, -9E+03, -4E+03,-122E+00, 4E+03, +9.E+03,+10E+03]
BlackY2 = [+27E-06,+28E-06,+28E-06,+27E-06,+28E-06,-30E-06,-28E-06,-27E-06,+27E-06,+29E-06,+27E-06]

E-06 is something like Value x 10 to the power of -6
There are 2 graph in the picture..
RedX1 and RedY1 is used to plot the red color graph
BlackX2 and BlackY2 is used to plot the black color graph

I am trying to get the area under the graph when both line intercepted ( The Shaded portion in the picture )
I repeat my previous post. The only relevant portions of the red and black closed figures are the line segments that border the shaded area:

REDX1 = [+8E+03, +4E+03, +1E+03, +552E+00, -708E+00]
REDY1 = [+2E-06, -179E-09, -7E-06, -19E-06, -30E-06]
BlackX2 = [ -4E+03,-122E+00, 4E+03,+9.E+03]
BlackY2 = [-28E-06,-27E-06,+27E-06,+29E-06]


I gave detailed instructions on how to divide the area into four trapezoids. Have you tried that?
 
Top