Introduce an integral function in a spreadsheet (Excel MS)

In summary: GNU Octave is largely compatible with Matlab but distributed for free under the GNU General Public License. It is a powerful tool for data analysis and can be used for a variety of purposes beyond scientific computing.
  • #1
Peter Sterken
Homework Statement
introduce integral function in spreadsheet (Excel MS), to construct the Lambda-CDM model myself
Relevant Equations
"( .443s^3+1)^(-1/2) for the integrand, type in s for the variable and 1 to 2 for the limits. Press submit, then change 2→3→4→5 and repeat."
I found some interesting equations on cosmology and I was wondering how to introduce the integral in an excel sheet:
"Paste ( .443s^3+1)^(-1/2) in for the integrand, type in s for the variable and 1 to 2 for the limits. Press submit, then change 2→3→4→5 and repeat."
(from the thread https://www.physicsforums.com/threa...simplifying-the-standard-cosmic-model.811718/ )

Any suggestion would be greatly appreciated!
Greetings,
Peter
 
Physics news on Phys.org
  • #2
I’m not 100% sure I understand what you want but I think this might sort it out…

I’m no Excel expert but I believe Excel doesn’t provide an integration function.

If you have ExceLab say, you can use the QUADF function for integration. Instructions are available online (including on YouTube).

Otherwise, you could use Desmos. Go here:
https://www.desmos.com/calculator/caqq1d7gsx
You’ll see I’ve already set it up for you (using ‘x’ rather then ‘s’) with integration limits from 1 to 2.

It’s a really useful free tool.
 
  • #3
It would be pretty easy to have it compute some riemann sums for you by using some formulas.
 
  • #4
Just to make sure I understand, your integral is the following, right?

$$ \int \frac{1}{ \sqrt{.443s^3+1}} ds $$

The gnarly thing here is that it is ##s^3##.

So, are you stuck on doing the integral? Or on getting it into Excel?
 
  • #5
I think you implement [itex]F(x) = \int_1^x (0.443s^3+1)^{-1/2}\,ds[/itex] as a user-defined function in VBA, with the integral approximated by either the Trapezoid Rule or Simpson's Rule.

Or you avoid Excel entirely, and use Wolfram Alpha or similar.
 
  • #6
Steve4Physics said:
I’m not 100% sure I understand what you want but I think this might sort it out…

I’m no Excel expert but I believe Excel doesn’t provide an integration function.

If you have ExceLab say, you can use the QUADF function for integration. Instructions are available online (including on YouTube).

Otherwise, you could use Desmos. Go here:
https://www.desmos.com/calculator/caqq1d7gsx
You’ll see I’ve already set it up for you (using ‘x’ rather then ‘s’) with integration limits from 1 to 2.

It’s a really useful free tool.
thanks a lot @Steve4Physics the desmos tool looks great!
 
  • #7
Office_Shredder said:
It would be pretty easy to have it compute some riemann sums for you by using some formulas.
that sounds pretty heavy @Office_Shredder :-D
 
  • #8
BillOnne said:
Just to make sure I understand, your integral is the following, right?

$$ \int \frac{1}{ \sqrt{.443s^3+1}} ds $$

The gnarly thing here is that it is ##s^3##.

So, are you stuck on doing the integral? Or on getting it into Excel?
yes, that's the integral, and I'm stuck on both... Thanks @BillOnne :-D
 
  • #9
pasmith said:
I think you implement [itex]F(x) = \int_1^x (0.443s^3+1)^{-1/2}\,ds[/itex] as a user-defined function in VBA, with the integral approximated by either the Trapezoid Rule or Simpson's Rule.

Or you avoid Excel entirely, and use Wolfram Alpha or similar.
I'll have a look at that, thanks a lot @pasmith ! greetings
 
  • #10
If your goal is to investigate the ΛCDM model there are a few tools on the web e.g. https://light-cone-calc.github.io/ and https://cosmocalc.icrar.org/

If you want to duplicate these calculations yourself then I have three questions:
  1. Why (for example to learn more about how we use computers to solve problems in physics, or to learn more about the implications of the ΛCDM model)?
  2. How much do you already know about numerical analysis, and particularly numerical integration (usually known as quadrature)?
  3. What experience do you have with computer languages?
 
  • Like
Likes BvU
  • #11
pbuk said:
If your goal is to investigate the ΛCDM model there are a few tools on the web e.g. https://light-cone-calc.github.io/ and https://cosmocalc.icrar.org/

If you want to duplicate these calculations yourself then I have three questions:
  1. Why (for example to learn more about how we use computers to solve problems in physics, or to learn more about the implications of the ΛCDM model)?
  2. How much do you already know about numerical analysis, and particularly numerical integration (usually known as quadrature)?
  3. What experience do you have with computer languages?
Dear @pbuk , thank you for the links to the calculators!

My answers are :
1. pure fascination and a hobby
2. very little as I'm self-taught (even though I have already published 4+ peer-reviewed papers on physics and trees)... math is not my forte
3. just MS Excel, as Matlab and Phyton are beyond my current capabilities

best regards,
Peter
 
  • #13
Peter Sterken said:
3. just MS Excel, as Matlab and Phyton are beyond my current capabilities
Excel is not very suited for scientific computing. You have identified Matlab and Python as more advanced options and they can both be very useful. You do not need to know a lot to make basic use of them and there is a lot of help and reference available online.

To learn bit by bit based on interest is a good way to approach the issue and knowing either will be beneficial in many scenarios.

I’ll also just mention GNU Octave, which is largely compatible with Matlab but distributed for free under GPL.
 
  • Informative
Likes Peter Sterken
  • #14
Great, thanks for the support! :biggrin:
 

FAQ: Introduce an integral function in a spreadsheet (Excel MS)

What is an integral function in a spreadsheet?

An integral function in a spreadsheet is a mathematical function that calculates the area under a curve. It is used to find the total value of a function over a given interval.

How do I introduce an integral function in Excel MS?

To introduce an integral function in Excel MS, you can use the built-in function called "INT" or "INTG". Simply enter the function in a cell and specify the range of values for the function to calculate the integral.

What are the benefits of using an integral function in a spreadsheet?

An integral function in a spreadsheet allows for quick and accurate calculation of the area under a curve, which can be useful in many applications such as finance, economics, and engineering. It also eliminates the need for manual calculations, saving time and reducing the risk of errors.

Can I customize the integral function in Excel MS?

Yes, you can customize the integral function in Excel MS by adjusting the range of values, changing the interval, and using different mathematical operations. You can also combine the integral function with other functions to create more complex calculations.

Are there any limitations to using an integral function in a spreadsheet?

While integral functions in spreadsheets are powerful tools, they do have limitations. For example, they may not be able to accurately calculate the area under a curve for complex functions or when there are discontinuities in the curve. It is important to understand the limitations and use the function appropriately.

Similar threads

Replies
5
Views
1K
Replies
4
Views
1K
Replies
2
Views
3K
Replies
7
Views
2K
Replies
2
Views
13K
Replies
28
Views
6K
Back
Top