from Hacker News

Solving First Order Differential Equations with Julia

by __rito__ on 3/3/25, 6:41 PM with 39 comments

  • by forgotpwd16 on 3/6/25, 2:36 AM

    The first example is also the very first example in the docs[1], but rather f!(du,u,p,t) that modifies du, it passes f(u,p,t) that returns du. Searching the help for ODEProblem() function, it's explained[2] that the first way is more memory-efficient, but if mutation is not allowed, the second way is more suitable. It will be of interest to write a follow-up post elaborating on this part.

    [1]: https://docs.sciml.ai/DiffEqDocs/stable/examples/classical_p... [2]: https://docs.sciml.ai/DiffEqDocs/stable/types/ode_types/#Sci...

  • by anigbrowl on 3/5/25, 11:16 PM

    X^2 - 3x - 18 =0

    [...]

    This is how the equation is created: x(x+3) = 18

    wat

    Maybe don't do very fast recaps if you're not going to proofread them. Incidentally I assume the formulae in this article were done with MathJax or its Julia equivalent, they render great but can't be copied from the text.

    Overall a good article (and a great ad for Julia) but stumbling blocks like the one above ensure some readers won't make it any farther.

  • by sundarurfriend on 3/7/25, 9:46 PM

    doggo dot jl mention!

    Thanks for the article. It gave me a little bit of familiarity with the DiffEq side of Julia, but even more valuable to me was the comparison between ordinary equations and diffeqs:

    > In normal equations, we solve the equation to find out values of variables previously unknown to us. In case of Differential Equations, we solve to find out functions previously unknown to us.

    That's a simple, easy to remember nugget of information that gives me some context to this whole field.

  • by nxpnsv on 3/6/25, 7:07 AM

    I didn't find a link to the package in the article. It seems to be a quite capable package, and the given two examples that are trivial to solve analytically don't really do it justice.
  • by fussypart on 3/6/25, 5:26 AM

    can anyone recommend a good textbook on differential equations?