0

I want to try to solve a system of ordinary differential equations, perhaps parallelized and came across Julia and DifferentialEquations.jl. the system looks like

x'(t) = f(t)*z(t)
y'(t) = g(t)*z(t)
z'(t) = f(t)*(1-2*x(t))/(2) -g(t)*y(t)

over 10^2 < t < 10^14, but my initial boundary conditions are

x(10^14) == 0
y(10^14) == 0
z(10^14) == 0

Could someone please explain to me how to setup this problem in julia? I checked the documentation and could only find u0 as a parameter, but it doesn't give details on choosing for a right handed set of boundary conditions Many thanks!

MKF
  • 105
  • 7

1 Answers1

1

You're looking to solve a boundary value problem (BVP). While this area is currently less developed than other areas of DifferentialEquations.jl, there are methods which exist for this which are shown in the tutorial on solving BVPs. The MIRK4 method may be the one to try.

I will note however that your timescale is quite large and may lead to numerical errors. Either using higher precision numbers (BigFloat, ArbFloat, DoubleFloat) may be required for handling that range, or you may want to rescale time in your equations so that way it better fits for standard double precision floating point numbers (Float64).

Chris Rackauckas
  • 18,645
  • 3
  • 50
  • 81
  • Hi Chris that's great, I'll check it out, yeah transforming time is my bet too so I'll play around a bit more with the method. By any chance, do you know if Julia has the homotopy analysis method as a numerical method available? Given its large radii of convergence for many problems, I was going to try write something in Julia that indeed could implement this method if there isn't use of it already – MKF Jul 29 '18 at 11:55
  • I don't think that it has been implemented in Julia. If you make one, I could help you add it to the Julia common interface so that way it can easily be swapped in for other methods. A quick read of it made it sound interesting! – Chris Rackauckas Jul 29 '18 at 12:07
  • Sure, that would be great, just need to get used to the syntax first, Julia Is very new to me :) – MKF Jul 29 '18 at 12:59
  • If you need help, feel free to join the [Julia Slack](https://slackinvite.julialang.org/) and the channel `#diffeq-bridged` (or the [JuliaDiffEq Gitter](https://gitter.im/JuliaDiffEq/Lobby) which is the same channel). Additionally there's the [Julia Discourse](https://discourse.julialang.org/). We can help you get the ball rolling in Julia dev! – Chris Rackauckas Jul 29 '18 at 13:01
  • sounds like a plan! – MKF Jul 29 '18 at 13:02