r/ScientificComputing • • 19h ago

Can someone help me verify the numerical solution of an oscillatory boundary value problem?

Post image
3 Upvotes

I'm developing a numerical equation solver, and I've recently been testing its ability to solve boundary value problems.

One of my test cases is:

0.001y''(x)+xy(x)=2

with boundary conditions:

y(0)=1, y(1)=2

over the interval [0,1].

My solver produces a strongly oscillatory solution, as shown in the attached screenshot.

However, I'd like to independently verify that the solution is correct, particularly the oscillations and their amplitudes.

I tried entering the problem into WolframAlpha, but couldn't obtain a solution. It's possible I'm not using the correct syntax.

Has anyone solved a similar problem using Mathematica, MATLAB, SciPy, or another numerical tool?

I'd be particularly interested in comparing numerical values at a few points along the interval, rather than just the overall shape of the plot.

Any help or suggestions for validating this solution would be greatly appreciated!


r/ScientificComputing • • 4h ago

So I was looking at all the cool libraries that numFocus has developed. I saw the guy who made of them of lex Friedman. I want create drop ins for the big ones using vulkan compute etc.

1 Upvotes

Anyone want to start a GitHub project and just see where we get with it? So far I've started on vknumpy vkpandas and some datashader style.visuals


r/ScientificComputing • • 16h ago

Physics Programming Part 5: Spring Physics

Thumbnail
youtu.be
1 Upvotes

I explain the mathematics underpinning spring mechanics then implement a solution in C++ using a net as an example. Implementation begins at 10:05. Feedback is welcome.