[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Solving 2nd degree differntial equatation
From: |
Maverick |
Subject: |
Re: Solving 2nd degree differntial equatation |
Date: |
Sat, 4 Jun 2016 07:29:46 -0700 (PDT) |
@Juan Pablo Carbajal-2 I know that results may vary, but difference seems
just to much for me.
Alright as you both suggested i tested it with something known:
x''+x'=0
x0(0)=2
x0'(0)=2
So if I am not wrong solution should be x(t)=C1+C2*e^(-t) And individual
solution will be
x(t)=4-2*e^(-t)
I tested it for T=1, in Wolfram x(T)=3.264241117657... and lsode and RK
gives 3.26424 which is great and my hopeless Verlet 3.76570. It is quite
close. But when I try with my first equatation diffrence is much bigger. Now
I've discovered that for small *k* like 0.5 or less Verlet and RK4 gives
almost identical results(for my primary equatation). I may assume that my
implementation is fine, and it's fault of algorithm?
--
View this message in context:
http://octave.1599824.n4.nabble.com/Solving-2nd-degree-differntial-equatation-tp4677408p4677436.html
Sent from the Octave - General mailing list archive at Nabble.com.
Re: Solving 2nd degree differntial equatation, Juan Pablo Carbajal, 2016/06/04