2
$\begingroup$

I need to solve a system of linear first order ODEs with boundary conditions in JAVA. I was wondering if any of you know of a JAVA package with the capability of solving a boundary value problems? (i.e. a solver using finite differences or finite elements)

The type of equation I want to solve is of the following type: $$ n''(x) = -D(x)n(x) + n'(x)/x \\ n'(0) = 0 \\ n(1) = 0 $$ Through substitution this equation can be transformed into two first order differential equations.

I know there is the ode solver of Apache commons but it can only solve initial value problems. I have also read about the numerical methods but would preferably use existing code.

$\endgroup$
5
  • 1
    $\begingroup$ Side question: why do you want to use JAVA? $\endgroup$
    – VoB
    May 28, 2021 at 12:38
  • $\begingroup$ I am implementing a module in an already existing code which is written in JAVA. I tested and solved my problem in python using scipy and now I want to port this to JAVA. $\endgroup$
    – bluesky
    May 28, 2021 at 12:40
  • $\begingroup$ If you have a working version in scipy, you could use it through Jython with the Jython Native Interface. $\endgroup$
    – Tyberius
    May 28, 2021 at 16:58
  • $\begingroup$ If you have access to an initial value solver you could use the shooting method. $\endgroup$
    – nicoguaro
    May 28, 2021 at 17:08
  • $\begingroup$ Thank you for comments I will try these ideas! $\endgroup$
    – bluesky
    May 31, 2021 at 7:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.