|
|
scott wrote:
>> OTOH, almost all physical systems are of this type.
>
> Indeed, and the exact solution of that is a damped sine wave, which is
> why so much stuff vibrates and resonates in the real world.
Well, I don't know about that, but physics is mostly about forces, and
forces generate acceleration, and force is usually a function of
position (or perhaps velocity). Hence differential equations seem to be
kind of ubiquitous in physics.
(My memory may be defective, but I was under the impression that indeed
differential and integral calculus were *invented* by the eniment
physacist Newton...)
Interestingly, a trivial differential equation has exponential growth as
its solution, but you never see this in mechanical systems.
>> Right. I don't really understand why it has to be these exact points...
>> ...or why this specific weighting is the correct one. But hey, I guess
>> somebody had a reason for that.
>
> It matches the Taylor Series approximation of the function:
Taylor...series...?
I thought a Taylor series is just a way of constructing a polynomial
approximation to a function that you don't have any better way to
compute. (Assuming the series is even convergent in the first place.)
I'm not sure how you use that to construct an approximation to a
completely *unknown* function...
> http://grb.physics.unlv.edu/~zbb/files/RungeKuttaProof.pdf
"Hence the idea in Theorem 9.7 is that if the step size in the RK4
method is reduced by a factor of 1/2 we can expect that the overall
F.G.E. will be reduced by a factor of 1/16."
...OK, well *that* would certainly explain why it's drastically more
stable then. (Although it still doesn't explain how this phenominon
comes about in the first place.)
>> Clearly I'm going to have to meditate on exactly why that's the case.
>> I would have thought that taking 4 seperate steps would be more
>> accurate than computing 4 steps and then blurring them all into one
>> step, but hey.
>
> RK4 is not just taking 4 blind steps though, it's using the result of
> the previous ones to get the next ones, which is how it gets to be more
> accurate than a simple linear estimate.
And taking 4 linear steps uses the result of the previous steps for the
next one. I don't get why taking those steps, throwing the result away
and just keeping the intermediate results, and then mixing that all
together gives a better result. (Altough it clearly *does*.)
>> Hmm... How is momentum and velocity different?
>>
>> Oh, wait - the mass could be non-unital. I forgot about that...
>
> Yes that's rather key :-)
Only if the particle has non-unital mass. ;-)
> I also find that keeping momentum as a state
> variable rather than velocity (which would also work) avoids some of the
> confusion with the differential of position in the algorithm.
Perhaps.
>> But if you assume that acceleration is
>> constant, you can actually *exactly solve* for position. I can't
>> figure out the equation off the top of my head,
>
> x = x + dt x' + 1/2 x'' dt^2
Yeah, something like that. :-}
> That looks a bit like a Taylor Series expansion, doesn't it :-)
I wouldn't know.
> You can extend that to:
>
> x = x + dt x' + 1/2 x'' dt^2 + 1/6 x''' dt^3
>
> and also write it for x' instead of x:
>
> x' = x' + dt x'' + 1/2 x''' dt^2 + 1/6 x'''' dt^3
>
> And that is exactly what your RK4 algorithm is estimating :-)
I don't follow. (I.e., I don't see how the final formula is remotely
related to RK4.)
Post a reply to this message
|
|