ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Area under trendline (https://www.excelbanter.com/excel-discussion-misc-queries/135494-area-under-trendline.html)

Josh

Area under trendline
 
Does anybody know how to find the area under the curve of a trendline (6th
degree polynomial in my case).

Thanks in advance for any help.

David Biddulph[_2_]

Area under trendline
 
Two ways:
1 Divide into relatively small intervals, & in each interval muliply the
width by the average height.
2 As you've got a polynomial in x, you can use the integration formula:
integral(x^n)dx = (x^(n+1))/(n+1)
... so the integral from 0 to A2 of your formula (3E+09x6 - 7E+08x5 +
8E+07x4 - 4E+06x3 + 42077x2 + 1197.x) becomes
=3E+09*A2^7/7 - 7E+08*A2^6/6 + 8E+07*A2^5/5 - 4E+06*A2^4/4 +
42077*A2^3/3 + 1197*A2^2/2
--
David Biddulph

"Josh" wrote in message
...
Does anybody know how to find the area under the curve of a trendline (6th
degree polynomial in my case).

Thanks in advance for any help.




Jerry W. Lewis

Area under trendline
 
There is no native Excel function for integration, but integrating a
polynomial is straightforward. Assume the coefficients are in A2:G2 (as in
output of LINEST for fitting a polynomial) and the corresponding powers are
in A1:G1. The value of the polynomial at x is then
=SUMPRODUCT(A2:G2,x^A1:G1), and the integral from a to b of the polynomial is
=SUMPRODUCT(A2:G2/(A1:G1+1),b^(A1:G1+1))-SUMPRODUCT(A2:G2/(A1:G1+1),a^(A1:G1+1))

Jerry

"Josh" wrote:

Does anybody know how to find the area under the curve of a trendline (6th
degree polynomial in my case).

Thanks in advance for any help.



All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com