Undergrad Numerical Integration twice (acceleration to displacement)

Click For Summary
The discussion focuses on the challenge of numerically integrating an acceleration function, a = t^t, to find displacement after 5 seconds. The user successfully uses Simpson's rule for velocity but struggles with the double integration needed for displacement, particularly with the term involving t ∫ t^t. Suggestions include using forward Euler for numerical integration with small steps or employing more advanced methods like Verlet integration for repeated calculations. Additionally, a reference to precise cubature methods for numerical integration is provided, emphasizing the use of Newton-Cotes formulas for accurate results. The conversation highlights the complexities of integrating non-elementary functions and the importance of precision in numerical methods.
Pcmath
Messages
9
Reaction score
0
Hello everyone

I have the following question regarding numerical integration twice from acceleration to displacement.

Suppose that a particle has acceleration function of a = tt (which has non-elementary integral), to find the velocity it is easy as I can use Simpson's rule for numerical integration. But now I would like to find the displacement of the particle after some time, let say 5 seconds, how do I calculate it?

Note that I need very accurate answer, so I usually integrate numerically using Excel with thousand interval.

I prefer to use Newton-Cotes formula if possible.

EDIT
I tried using integration by parts, but I always reach a point where I can't continue.
a = tt
Let v = ∫ tt
s = ∫ v
= t*v - ∫ t*tt
= t ∫ tt - ∫ t*tt

For example, to find the displacement after t = 5 seconds
∫ t*tt from 0 to 5 is easy to integrate numerically
But the problem is t ∫ tt I don't know how to do it because there is variable outside the integral.

For those who don't know, I am using integration by parts formula for definite integral, it includes find the value of
( t ∫ tt ) from 0 to 5
 
Last edited:
Mathematics news on Phys.org
Hello pcmath, : welcome:

You have ## \ a = t^t\ ## and with ##\ a = \displaystyle {dv\over dt} \ ## you get ##\ v = \int a\;dt\ = \int t^t\; dt##.

Then , with ##\ v= \displaystyle {ds\over dt} \ ## you can write ##\ s = \int \left (\ \int t^t\; dt\ \right ) dt' ##. Written with bounds:$$
s(t) = \int_{t'= 0}^t \left (\ \int_{t''=0}^{t' } t''^{(t'')} \; dt''\ \right ) dt' $$
That is your double integral.
Pcmath said:
s = ∫ v = t*v - ∫ t*tt = t ∫ tt - ∫ t*tt
is something I cannot agree with.

You could do a double numerical integration using forward Euler
$$ v(t+\Delta t) = v(t) + a(t) * \Delta t \\ s(t+\Delta t) = s(t) + v(t) * \Delta t \ $$ and you would indeed have to take very small steps because a(t) is so steep.
 
Last edited:
If you just need this once do it with tiny integration steps (or check WolframAlpha). If you need it many times, it is worth implementing a better integration scheme - Verlet integration or one of the other methods discussed there.
 
Thank you guys for your help, I will try it.

BvU said:
is something I cannot agree with.
This is actually correct as I have tried it. Assuming that a = x^2 then you can find s using that way, it gives the same value as integrate twice.
 
Pcmath said:
This is actually correct as I have tried it
Note that one successful example does not a proof constitute. It looks like integration by parts and then the question is: what is the time derivative of ##t^t##
 
Pcmath said:
Hello everyone

I have the following question regarding numerical integration twice from acceleration to displacement.

Suppose that a particle has acceleration function of a = tt (which has non-elementary integral), to find the velocity it is easy as I can use Simpson's rule for numerical integration. But now I would like to find the displacement of the particle after some time, let say 5 seconds, how do I calculate it?

Note that I need very accurate answer, so I usually integrate numerically using Excel with thousand interval.

I prefer to use Newton-Cotes formula if possible.

EDIT
I tried using integration by parts, but I always reach a point where I can't continue.
a = tt
Let v = ∫ tt
s = ∫ v
= t*v - ∫ t*tt
= t ∫ tt - ∫ t*tt

For example, to find the displacement after t = 5 seconds
∫ t*tt from 0 to 5 is easy to integrate numerically
But the problem is t ∫ tt I don't know how to do it because there is variable outside the integral.

For those who don't know, I am using integration by parts formula for definite integral, it includes find the value of
( t ∫ tt ) from 0 to 5
Hallo

You can use precise cubatures of Gauss type according: "Computation of definite integral over repeated integral" Tatra mountains, publ. 75 (2018). The Newton-Cotes is in preparation now. Shortly, for order 5 you can use standard quadrature Newton-Cotes: v5= v0+5h/288(19a0+75a1+50a2+50a3+75a4+19a5)
and cubature for displacement: s5=s0+v0*(5*h)+25h*h/2016(122a0+475a1+100a2+250a3+50a4+11a5)
The polynomial precision is 5.
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
835
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K