Computational Physics - Department of Physics
8.3 Finite difference methods 249 Noting that x(^1 )(t+h/ 2 ) = ( x(^1 )(t)+h 2 x(^2 )(t) ) +O(h^2 ), we obtain x(t+h) =x(t)+h+x ...
250 8 Differential equations Compute the slope atti, that is define the quantityk 1 =f(ti,yi). Make a predicition for the solut ...
8.4 More on finite difference methods, Runge-Kutta methods 251 However, we do not know the value ofyi+ 1 / 2. Here comes thus th ...
252 8 Differential equations k 3 =h f(ti+h/ 2 ,yi+k 2 / 2 ). (8.11) With the latter slope we can in turn predict the value ofyi ...
8.5 Adaptive Runge-Kutta and multistep methods 253 8.5 Adaptive Runge-Kutta and multistep methods In case the function to integr ...
254 8 Differential equations meaning that we can define this optimal step length as ̃h=h ( ξ ε ) 1 /(M+ 1 ) . Using this equatio ...
8.6 Physics examples 255 withξour defined tolerance. For more details behind the derivation of this method, see for example Ref. ...
256 8 Differential equations As mentioned earlier, in certain cases it is possible to rewrite a second-order differential equati ...
8.6 Physics examples 257 E 0 =^1 2 kx(t= 0 )^2 =^1 2 k. and use this when checking the numerically calculated energy from the Ru ...
258 8 Differential equations memory for the arrays containing the derivatives dydt = new double[n]; y = new double[n]; yout = ne ...
8.6 Physics examples 259 In Fig. 8.3 we exhibit the development of the difference between the calculated energy and the exact en ...
260 8 Differential equations 8.6.2 Damping of harmonic oscillations and external forces. Most oscillatory motion in nature does ...
8.6 Physics examples 261 I= dQ dt, we arrive at Eq. (8.18). This section was meant to give you a feeling of the wide range of ap ...
262 8 Differential equations sin(θ)≈θ. and rewrite the above differential equation as d^2 θ dt^2 =−g l θ, which is exactly of th ...
8.7 Physics Project: the pendulum 263 dθ dtˆ=vˆ, and dvˆ dtˆ =− vˆ Q −sin(θ)+Aˆcos(ωˆˆt). These are the equations to be solved. ...
264 8 Differential equations ( θ A ̃ ) 2 + ( vˆ ωˆA ̃ ) 2 = 1 with A ̃= Aˆ √ ( 1 −ωˆ^2 )^2 +ωˆ^2 /Q^2 . This curve forms an elli ...
8.7 Physics Project: the pendulum 265 such a curve in the limitτ→∞. It is called periodic, since it exhibits periodic motion in ...
266 8 Differential equations -1 -0.5 0 0.5 1 0 10 20 30 40 50 θ tˆ Fig. 8.8Plot ofθas function of timeτwithQ= 2 ,ωˆ= 2 / 3 andAˆ ...
8.7 Physics Project: the pendulum 267 -4 -3 -2 -1 0 1 2 3 4 0 20 40 60 80 100 θ tˆ Fig. 8.10Plot ofθas function of timeτwithQ= 2 ...
268 8 Differential equations several methods for solving the two coupled differential equations, from Euler’s method to adaptive ...
«
9
10
11
12
13
14
15
16
17
18
»
Free download pdf