# DifferentialEquations.jl: Complex function results in Inexact Error

I am trying to solve a one dimensional Schrödinger equation which has been reduced to a first-order linear ODE of the kind \psi’(x) = f(x) \psi(x), where all functions have complex args (Complex{Float64}) I believe.

Either way, the solver (solve(::ODEProblem)) seems to be having a hard time dealing with the complex numbers because it spits out an Inexact Error. If I change the ode and take the absolute value of both sides, it does not complain…

So does anyone know what kind of setting of the solver I need to change to allow complex numbers?

Welcome @ess3sq! Please post a minimal working example when asking for help:

Having said this, are you initializing your variables (in the IC) as complex, floating-point numbers?

1 Like