Skip to main content
15-Moonstone
March 6, 2016
Solved

Solving a stiff (?) ode

  • March 6, 2016
  • 1 reply
  • 2837 views

I have an old (10+ years) worksheet in which I solved an apparently stiff ode using Bulstoer (without using the Jacobian). Having a reason to resuscitate the worksheet I tried rewriting it using Odesolve, which worked for loading but not for unloading (look at worksheet to see what this means). Trying the different solvers in Odesolve did not help. Can someone give me some insight into what is going on? Maybe I was just smarter 10+ years ago, but I do not think I would have hit upon using Bulstoer if I had to do it over again.

Best answer by AlanStevens

John Rudnicki wrote:

Thanks, but I did not understand a comment in your worksheet.

Capture.PNG.

Ignore my comment - I misinterpreted Zu!!

And maybe my question was unclear. The result I get with Bulstoer was what I expected for this problem. But my question was more why I cannot get the same result with Odesolve since now (as opposed to 10 years ago) I never would have thought to use Bulstoer.

.

In a way you were lucky to get a result with Bulstoer.  If you'd tried to use npointsu = 200, for example, it would have failed.  There are numerical issues related to rapid gradients.  This is also true of Odesolve.  My version works with Radau, but not Adams/BDF unless I change the number of points!

Alan

1 reply

19-Tanzanite
March 9, 2016

The attached might help.

Alan.

15-Moonstone
March 9, 2016

Thanks, but I did not understand a comment in your worksheet.

Capture.PNG

And maybe my question was unclear. The result I get with Bulstoer was what I expected for this problem. But my question was more why I cannot get the same result with Odesolve since now (as opposed to 10 years ago) I never would have thought to use Bulstoer.

Capture1.PNG.

19-Tanzanite
March 9, 2016

John Rudnicki wrote:

Thanks, but I did not understand a comment in your worksheet.

Capture.PNG.

Ignore my comment - I misinterpreted Zu!!

And maybe my question was unclear. The result I get with Bulstoer was what I expected for this problem. But my question was more why I cannot get the same result with Odesolve since now (as opposed to 10 years ago) I never would have thought to use Bulstoer.

.

In a way you were lucky to get a result with Bulstoer.  If you'd tried to use npointsu = 200, for example, it would have failed.  There are numerical issues related to rapid gradients.  This is also true of Odesolve.  My version works with Radau, but not Adams/BDF unless I change the number of points!

Alan