2 ms·
> Why not? They don't explain this very well, I think. Take the ordinary differential equation x'(t) = x^2(t), with initial condition x(0)=1. It has the solut
by credit_guy 4y ago
> Why not?
They don't explain this very well, I think.
Take the ordinary differential equation x'(t) = x^2(t), with initial condition x(0)=1. It has the solution 1/(1-t) which blows up to infinity when t tends to 1.
If you try to solve it numerically, using, let's say Euler's method, then this is how you go about it. You pick a step size, let's say 0.1. And iterate this way: you know x(0) = 1, and you also know its derivative x'(0) = x^2(0) = 1. You assume x follows a straight line, so you get x(0.1) = 1 + 0.1 = 1.1. At the next step you add more because x'(0.1) is now 1.21, so x(0.2) = 1.1 + 0.121 = 1.221.
You keep going like that.
The numbers will go bigger and bigger, but they will never be infinite. Of course, floating numbers with double precision overflow around 10^308, but if you use a multiple precision library you'll be able to keep going forever and ever.
If you make the time step smaller, the solution will be closer to the actual solution, but still, the algorithm will produce finite values at all times (until it hits overflow).