ComputationalScienceLaboratory / ODE-Test-Problems

A MATLAB suite of initial value problems
https://computationalsciencelaboratory.github.io/ODE-Test-Problems/
MIT License
9 stars 2 forks source link

Exact solutions #40

Closed Steven-Roberts closed 1 year ago

Steven-Roberts commented 1 year ago

It would be nice to support exact solutions via a problem function y = solveExactly(t) which supports vector t. I see 2 approaches

  1. Create an interface with a solveExactly function and only problems with exact solution implement it
  2. Make solveExactly a Problem function that, by default, throws an errors that an exact solution is unavailable. Subclasses can override as needed.

I favor the latter. The list of problems with exact solutions is

AndreyAPopov commented 1 year ago

I like that and I think it is the simplest solution. There are some other equations that can have non-closed form exact solutions in terms of infinite series (not polynomial), I would have to look into which specifically. The trouble with those is that they will be defined for particular initial conditions, and not in general.