Numerical Integration twice (acceleration to displacement)

In summary: The Newton-Cotes v5 and cubature s5 are exact for linear acceleration a(t) and quadratic acceleration a(t)=t*t. Good luck!In summary, the conversation discusses the process of finding displacement using numerical integration twice. The person asks for help in calculating displacement after a certain time using integration by parts or Newton-Cotes formula. Other participants provide suggestions such as using precise cubatures of Gauss type or implementing a better integration scheme.
  • #1
Pcmath
9
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
  • #2
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:
  • #3
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.
 
  • #4
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.
 
  • #5
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##
 
  • #6
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.
 

1. What is numerical integration twice?

Numerical integration twice, also known as double integration, is a method used to approximate the definite integral of a function by dividing the interval into smaller subintervals and approximating the area under the curve using a numerical method.

2. How is numerical integration twice different from single integration?

Numerical integration twice involves integrating a function twice, while single integration involves integrating a function only once. This is typically done when the function is not integrable in closed form or when the integral cannot be solved using simple integration techniques.

3. What is the purpose of using numerical integration twice?

The purpose of using numerical integration twice is to approximate the value of a definite integral when the function cannot be integrated in closed form. It is also used to solve differential equations and to calculate the area under a curve when the function is not known analytically.

4. What are some common numerical methods used for double integration?

Some common numerical methods used for double integration include the trapezoidal rule, Simpson's rule, and the midpoint rule. These methods use different techniques to approximate the area under the curve and provide different levels of accuracy.

5. Can numerical integration twice produce exact results?

No, numerical integration twice cannot produce exact results. It is an approximation method and the accuracy of the results depends on the number of subintervals used and the chosen numerical method. However, as the number of subintervals increases, the approximation becomes more accurate.

Similar threads

Replies
3
Views
414
  • General Math
Replies
2
Views
770
Replies
2
Views
1K
  • General Math
Replies
4
Views
999
Replies
2
Views
350
Replies
5
Views
2K
  • Programming and Computer Science
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
684
Replies
3
Views
1K
  • Quantum Physics
Replies
1
Views
571
Back
Top