MHB Solution to Infinite series for E^(n^2x)

AI Thread Summary
The discussion focuses on finding a solution to the infinite series for e^(n^2x) that can be implemented in Excel or a VBA script. A user seeks assistance with the n^-2 term in the series, having previously understood e^-(n^2y). Suggestions include using a loop to sum terms until they fall below a specified threshold for accuracy or employing array formulas in Excel to calculate the series up to a certain n value. The importance of experimenting with iterations to ensure accuracy is emphasized. Overall, the conversation aims to provide practical methods for solving the mathematical problem related to gas flow through porous media.
IanM
Messages
2
Reaction score
0
This is my first time posting so forgive me if I have it in the wrong place,

i'm trying to find a solution to the following that I can stick into either excel or a VBA script. It has been 25 years since I looked at any serious maths and I'm stumped. I can find and digest e^-(n^2y) but can't work out the n^-2 addition. Happy to be walked though the steps if it helps me get a better understanding, for those interested it is part of a solution to determine the ability for gas to flow though a porous medium

View attachment 6510

Cheers

Ian
 

Attachments

  • Capture.JPG
    Capture.JPG
    3.4 KB · Views: 116
Mathematics news on Phys.org
IanM said:
This is my first time posting so forgive me if I have it in the wrong place,

i'm trying to find a solution to the following that I can stick into either excel or a VBA script. It has been 25 years since I looked at any serious maths and I'm stumped. I can find and digest e^-(n^2y) but can't work out the n^-2 addition. Happy to be walked though the steps if it helps me get a better understanding, for those interested it is part of a solution to determine the ability for gas to flow though a porous medium
Cheers

Ian

Hi IanM,

The usual way to make an approximation is to keep summing subsequent terms until the next term is below a certain threshold.
Something like:
Code:
n = 0
sum = 0
do
  n = n + 1
  term = (6 / pi) * exp(-(pi^2) * (n^2) * Kt / rs) / n^2
  sum = sum + term
while term > 0.0001
That will give us a result that is accurate up to the first 4 digits after the dot.
We'd have to look up how to do that in VBA exactly.

Alternatively, we can create a fixed column of numbers of, say, 1..10 in cells A1:A10.
And calculate the result up to $n=10$ as:
[M]=SUM((6/PI()) * EXP(-3*$A$1:$A10^2)/$A$1:$A10^2)[/M]
Use Ctrl+Shift+Enter when entering the formula, making it an array-formula.
Afterwards, it will show up as:
[M]{=SUM((6/PI()) * EXP(-3*$A$1:$A10^2)/$A$1:$A10^2)}[/M]

Or even fancier in a single cell:
[M]{=SUM((6/PI()) * EXP(-3*{1,2,3,4,5}^2)/{1,2,3,4,5}^2)}[/M]
(Don't forget Ctrl+Shift+Enter.)

We'll have to experiment a bit to see how many iterations are enough.
We could check whether
[M]{=SUM((6/PI()) * EXP(-3*{1,2,3,4,5,6}^2)/{1,2,3,4,5,6}^2) - SUM((6/PI()) * EXP(-3*{1,2,3,4,5}^2)/{1,2,3,4,5}^2)}[/M]
can be considered small enough. This is the indicator for the error in the result.
 
Fantastic thanks for the Help, even better it makes sense!
 
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...

Similar threads

Back
Top