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: 117
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!
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
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...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...

Similar threads

Back
Top