- #1
maistral
- 240
- 17
So I've been programming the BDF methods and for some reason I have an issue with the Backward Euler technique.
Given the differential equation y" + y = 0 (with y(0) = 2, y'(0) = 0), my backward Euler solution goes like this:
Obviously this is not possible as the function should be a well-behaved periodic. So I tried running my BDF2 and BDF4 on it, and this happens:
So yeah. What the actual flying


. I have had this issue since about a week and a half now and I am running out of ideas. I made sure that my backward Euler code isn't the problem as I used test functions from different literature like those in Chapra and such other examples available; and the results from my code and those in examples are practically identical to the last digit in those examples.
What's stranger is the fact that I used the same Backward Euler code in order to generate the initial points for BDF2/BDF4! I am totally confused and appalled.
Is there something with the backward Euler and periodic functions that I am missing?
Given the differential equation y" + y = 0 (with y(0) = 2, y'(0) = 0), my backward Euler solution goes like this:
Obviously this is not possible as the function should be a well-behaved periodic. So I tried running my BDF2 and BDF4 on it, and this happens:
So yeah. What the actual flying




What's stranger is the fact that I used the same Backward Euler code in order to generate the initial points for BDF2/BDF4! I am totally confused and appalled.
Is there something with the backward Euler and periodic functions that I am missing?