From b39dddb31e189c5257ea2340e54a890db6d273aa Mon Sep 17 00:00:00 2001 From: Wesley Kuhron Jones Date: Sun, 23 Apr 2023 04:03:04 +0000 Subject: [PATCH] small note --- Chaos/DECircularMotion.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Chaos/DECircularMotion.py b/Chaos/DECircularMotion.py index d19f9049..26379ad4 100644 --- a/Chaos/DECircularMotion.py +++ b/Chaos/DECircularMotion.py @@ -23,6 +23,7 @@ # now we adjust the angle of the motion so it stays on the correct circle dx = lambda x, y, dt: x * np.cos(2*np.pi*dt) - y * np.sin(2*np.pi*dt) - x dy = lambda x, y, dt: y * np.cos(2*np.pi*dt) + x * np.sin(2*np.pi*dt) - y +# if we treat higher powers of dt as negligible, then we get that sin(2 pi dt) = 2 pi dt and cos(2 pi dt) = 1, which causes these difference equations to reduce to the previous ones, so we need higher order terms of dt xs2, ys2 = get_trajectory_of_differential_equation([dx, dy], [x0, y0], 1, 0.01, 1e6) @@ -31,4 +32,5 @@ plt.savefig("Images/DECircle.png") plt.gcf().clear() +# being able to make this correction relies on knowing the closed form of the trajectory so you can just subtract trajectory positions and simplify the expression, so yeah this won't work in general for a differential equation whose path you don't know