Introduce an integral function in a spreadsheet (Excel MS)

Click For Summary

Homework Help Overview

The discussion revolves around integrating a specific function related to cosmology using Excel. The original poster seeks guidance on how to implement the integral of the function \((0.443s^3+1)^{-1/2}\) within a spreadsheet environment, specifically Excel, and is exploring various methods to achieve this.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the limitations of Excel regarding integration functions and suggest alternatives like ExceLab and Desmos. There are inquiries about whether the original poster is struggling with the integral itself or the implementation in Excel. Some suggest using user-defined functions in VBA or numerical methods for approximation.

Discussion Status

Participants are actively exploring various tools and methods for numerical integration. Some have provided links to online calculators and resources, while others have posed questions to clarify the original poster's goals and background knowledge. There is a mix of suggestions and inquiries, indicating a collaborative effort to address the original poster's challenges.

Contextual Notes

The original poster has expressed limited experience with numerical analysis and programming languages, indicating a preference for using Excel despite its limitations for scientific computing. There is an acknowledgment of alternative tools like Matlab and Python, which may be more suitable for such tasks.

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
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.
 
It would be pretty easy to have it compute some riemann sums for you by using some formulas.
 
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?
 
I think you implement F(x) = \int_1^x (0.443s^3+1)^{-1/2}\,ds 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.
 
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!
 
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
 
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
 
pasmith said:
I think you implement F(x) = \int_1^x (0.443s^3+1)^{-1/2}\,ds 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   Reactions: 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   Reactions: Peter Sterken
  • #14
Great, thanks for the support! :biggrin:
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 277 ·
10
Replies
277
Views
23K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 105 ·
4
Replies
105
Views
12K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
14K
  • · Replies 28 ·
Replies
28
Views
7K
  • · Replies 32 ·
2
Replies
32
Views
7K
  • · Replies 12 ·
Replies
12
Views
4K