Is this correct second order approximation?

Alexandre
Messages
29
Reaction score
0
I have a second order differential equation of the form (theta is a function of time):
\theta ''=F\left(\theta ,\theta '\right)

Turning them to two first order equations I get:
\begin{cases} \theta '\:=\omega \\ \omega '=F\left(\theta ,\omega \right) \end{cases}

And here's the algorithm which I need to know whether it's correct or not:
Given the initial conditions \theta _1 and \omega _1 run loop for n
k_1=\omega _n
k_2=\omega _n+\Delta t\cdot k_1

j_1=F\left(\theta _n,\omega _n\right)
j_2=F\left(\theta _n+\Delta t\cdot j_1,\omega _n+\Delta t\cdot k_1\right)

\theta _{n+1}=\theta _n+\frac{\Delta t}{2}\cdot \left(k_1+k_2\right)
\omega _{n+1}=\omega _n+\frac{\Delta t}{2}\left(j_1+j_2\right)

It does give me a solution that is really close to first order approximation but the thing is, when I look at the phase space, first order approximation conserves energy better because curves are closer to being closed (the equation is non dissipative), so I'm wondering why is that. Second order approximation is supposed to be better.
 
Mathematics news on Phys.org
Is this Heun's method? I think it would go something like this given ##\theta_0,\,\omega_0##:

$$
\theta' = \omega = F_1(t,\theta) \\
\theta'' = \omega ' = F_2(t,\theta,\theta') \\
\\
k_1 = \theta_i + \Delta t F_1(t_i,\theta_1) \\
\theta_{i+1} = \theta_i + \frac{\Delta t}{2} \left [ F_1(t_i,\theta_i) + F_1(t_{i+1},k_1) \right ] \\
j_1 = \omega_i + \Delta t F_2(t_i,\theta_i,\omega_i) \\
\omega_{i+1} = \omega_i + \frac{\Delta t}{2} \left [ F_2(t_i,\theta_i,\omega_i) + F_2(t_{i+1}, \theta_{i+1}, j_1) \right ]
$$
 
Yes it's Heun's method, a.k.a. two stage Runge–Kutta method. In my case F is time independent.

I don't seem to understand what F1 and F2 are in your algorithm.
 
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...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top