How to use an integral for cell output value.

C

Corribus

Suppose in the A column, I have a column of data in cells A(1) to A(10).
I would like the output data in cells B(1) to B(10) to be given by the
formula:

B(N) = Integral of f(x)dx, evaluated from 0 to 10.

Where f(x) = sin[A(N) * pi * x / 10]

This integral gives a real # in all cases; my hand-held calculator can solve
them, but it's tedious to do each calculation individually (because in
reality I have way more than 10 values I need to solve). Iit would be handy
if I could have excel do this calculation for me, but I can't figure out how
to make excel use an integral for the output of column (B). Can I do this
easily?
 
R

Rik_UK

Not sure if this is right, but by using the equations below the following
results are obtained

ROW: COL A COL B Fomula in column B
1 0 0
2 1 0.28173 =SIN(A2*PI()*((A2-A1)/COUNT(A:A)))
3 2 0.54064 =SIN(A3*PI()*((A3-A2)/COUNT(A:A)))
4 3 0.75575 =SIN(A4*PI()*((A4-A3)/COUNT(A:A)))
5 4 0.90963 =SIN(A5*PI()*((A5-A4)/COUNT(A:A)))
6 5 0.98982 =SIN(A6*PI()*((A6-A5)/COUNT(A:A)))
7 6 0.98982 =SIN(A7*PI()*((A7-A6)/COUNT(A:A)))
8 7 0.90963 =SIN(A8*PI()*((A8-A7)/COUNT(A:A)))
9 8 0.75575 =SIN(A9*PI()*((A9-A8)/COUNT(A:A)))
10 9 0.54064 =SIN(A10*PI()*((A10-A9)/COUNT(A:A)))
11 10 0.28173 =SIN(A11*PI()*((A11-A10)/COUNT(A:A)))

The formula can be dragged down as many cells is as there is data in column
A...

Is this what you expected?
 
C

Corribus

Hi Rik -
Thanks for the reply. Unfortunately, the output values are not correct.

For example, if the input in column A is 1 (as it is in row, 2), the output
value in the associated B column should be

Integral of:

sin(pi * x / 10), evaluated from 0 to 10

Which, according to my calculation, should be 6.36619

Likewise, for A = 2, B = 0; A = 3, B = 2.12206; etc.

Obviously, in the case of the present formula, it's pretty simple for me to
evaluate these by hand. The formula I really need to use is a bit more
tedious to integrate by hand, however. The current (simplified) example is
just for me to learn how to use an integration as an output - if such a thing
is even possible.



Rik_UK said:
Not sure if this is right, but by using the equations below the following
results are obtained

ROW: COL A COL B Fomula in column B
1 0 0
2 1 0.28173 =SIN(A2*PI()*((A2-A1)/COUNT(A:A)))
3 2 0.54064 =SIN(A3*PI()*((A3-A2)/COUNT(A:A)))
4 3 0.75575 =SIN(A4*PI()*((A4-A3)/COUNT(A:A)))
5 4 0.90963 =SIN(A5*PI()*((A5-A4)/COUNT(A:A)))
6 5 0.98982 =SIN(A6*PI()*((A6-A5)/COUNT(A:A)))
7 6 0.98982 =SIN(A7*PI()*((A7-A6)/COUNT(A:A)))
8 7 0.90963 =SIN(A8*PI()*((A8-A7)/COUNT(A:A)))
9 8 0.75575 =SIN(A9*PI()*((A9-A8)/COUNT(A:A)))
10 9 0.54064 =SIN(A10*PI()*((A10-A9)/COUNT(A:A)))
11 10 0.28173 =SIN(A11*PI()*((A11-A10)/COUNT(A:A)))

The formula can be dragged down as many cells is as there is data in column
A...

Is this what you expected?


--
Kind regards

Rik


Corribus said:
Suppose in the A column, I have a column of data in cells A(1) to A(10).
I would like the output data in cells B(1) to B(10) to be given by the
formula:

B(N) = Integral of f(x)dx, evaluated from 0 to 10.

Where f(x) = sin[A(N) * pi * x / 10]

This integral gives a real # in all cases; my hand-held calculator can solve
them, but it's tedious to do each calculation individually (because in
reality I have way more than 10 values I need to solve). Iit would be handy
if I could have excel do this calculation for me, but I can't figure out how
to make excel use an integral for the output of column (B). Can I do this
easily?
 
C

Corribus

Ah, I see - I didn't check his formula, just noticed the answers didn't look
right. Thank you for the help, that makes sense.

David Biddulph said:
I think that Rik may have intended his formula to be
=SIN(A2*PI()/10)*(A2-A1)

If you use an interval of 1, as Rik did, the terms of the above formula sum
to 6.313752
If you change the interval to 0.1, the sum becomes 6.365754

As you are no doubt aware, the integral of x is the limit of the sum of (x *
dx) as dx tends to zero, so you can make the interval progressively smaller.
With an interval of 0.01, the sum is 6.366192.

You are better, of course, to say that the result of the integral is 20/PI()
[and thus get 6.366198], rather than doing the numerical integration.
--
David Biddulph

Corribus said:
Hi Rik -
Thanks for the reply. Unfortunately, the output values are not correct.

For example, if the input in column A is 1 (as it is in row, 2), the
output
value in the associated B column should be

Integral of:

sin(pi * x / 10), evaluated from 0 to 10

Which, according to my calculation, should be 6.36619

Likewise, for A = 2, B = 0; A = 3, B = 2.12206; etc.

Obviously, in the case of the present formula, it's pretty simple for me
to
evaluate these by hand. The formula I really need to use is a bit more
tedious to integrate by hand, however. The current (simplified) example
is
just for me to learn how to use an integration as an output - if such a
thing
is even possible.



Rik_UK said:
Not sure if this is right, but by using the equations below the following
results are obtained

ROW: COL A COL B Fomula in column B
1 0 0
2 1 0.28173 =SIN(A2*PI()*((A2-A1)/COUNT(A:A)))
3 2 0.54064 =SIN(A3*PI()*((A3-A2)/COUNT(A:A)))
4 3 0.75575 =SIN(A4*PI()*((A4-A3)/COUNT(A:A)))
5 4 0.90963 =SIN(A5*PI()*((A5-A4)/COUNT(A:A)))
6 5 0.98982 =SIN(A6*PI()*((A6-A5)/COUNT(A:A)))
7 6 0.98982 =SIN(A7*PI()*((A7-A6)/COUNT(A:A)))
8 7 0.90963 =SIN(A8*PI()*((A8-A7)/COUNT(A:A)))
9 8 0.75575 =SIN(A9*PI()*((A9-A8)/COUNT(A:A)))
10 9 0.54064 =SIN(A10*PI()*((A10-A9)/COUNT(A:A)))
11 10 0.28173 =SIN(A11*PI()*((A11-A10)/COUNT(A:A)))

The formula can be dragged down as many cells is as there is data in
column
A...

Is this what you expected?


--
Kind regards

Rik


:

Suppose in the A column, I have a column of data in cells A(1) to
A(10).
I would like the output data in cells B(1) to B(10) to be given by the
formula:

B(N) = Integral of f(x)dx, evaluated from 0 to 10.

Where f(x) = sin[A(N) * pi * x / 10]

This integral gives a real # in all cases; my hand-held calculator can
solve
them, but it's tedious to do each calculation individually (because in
reality I have way more than 10 values I need to solve). Iit would be
handy
if I could have excel do this calculation for me, but I can't figure
out how
to make excel use an integral for the output of column (B). Can I do
this
easily?


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top