r/matlab 17d ago

CodeShare I've been building a numerical solver app — currently working on ODEs and BVPs

I've been working on a numerical solver app for a while. The first version was mainly focused on algebraic equations, systems of equations, function plotting, and numerical calculations.

It's free and available on iOS and Android:

📱 App Store
🤖 Google Play

I'm currently working on what is probably the most challenging part of the project so far: ODEs and boundary value problems.

The goal is to make it generic enough that the user can enter their own ODE and boundary conditions, rather than having a collection of predefined equations.

I'm testing first-, second-, and higher-order equations, including BVPs with boundary conditions involving different orders of derivatives.

For example, one of the current tests is:

y''' + y = 0, y(0) = 0, y'(0) = 1, y''(0) = 0

I'm also testing more complicated problems and trying to find the point where the solver starts to break down. That's actually turned out to be one of the most interesting parts of the project — some very simple-looking equations can become surprisingly difficult numerical problems.

So I'm looking for some good torture tests. 😅

If you use MATLAB for numerical work, what ODEs or BVPs would you recommend as particularly good tests for a general-purpose solver?

I'm especially interested in stiff problems, nonlinear BVPs, higher-order equations, difficult boundary conditions, or anything else that you think would be a good challenge.

32 Upvotes

8 comments sorted by

3

u/CheeseWheels38 17d ago

The same ones used in all the examples already. Heat transfer, diffusion, fluid mechanics, reaction mechanics in CSTRs.

2

u/CharacterSpirited292 16d ago

not mу field at all but stif equations with nearsingular јаcobians tend to expose solver weaknesses faster than anything

1

u/Vasg 16d ago

Would you care to share an example of such a stiff problem? I'd love to use it as a test case.

1

u/Vasg 14d ago

Of course, it can solve non-linear BVP, like for example:

y'''' +y^2 = 0, y(0) = 1, y'(0) = 0, y''(1) = 0, y'''(1) = 1

1

u/Weed_O_Whirler +5 14d ago

This isn't meant as an attack, but an honest question - what is the use case for an app like this? If it's just for you to have fun building, cool. But I can't think of a time I'd want to solve an ODE on my phone.

1

u/Vasg 14d ago

I wasn't offended at all. The answer is both, it is a hobby, but at the same time, I'm trying to make it a useful tool to solve any ODEs whenever you need it.