From NDSolve, I got this:

{{a1 -> InterpolatingFunction[{{0., 40.}}, "<>"]}}

What would be a sensible approach to getting the complex conjugate of this function, particularly bearing in mind that we might have to deal with derivatives higher than the zeroth and that the (possibly nonuniform) sampling of the interpolation should be respected?

  • 1
    $\begingroup$ I edited your question to try to clarify some of the issues. If I misunderstood your purpose, please say so. $\endgroup$ Commented Apr 20, 2014 at 4:53

1 Answer 1


Perhaps conjugating the data in the IF:

sol = NDSolveValue[{y'[x] == I y[x], y[0] == 1}, y, {x, 0, 1}]

solbar = ReplacePart[sol, {4, 3} -> Conjugate[sol[[4, 3]]]]

ReImPlot[{sol[t], solbar[t]}, {t, 0, 1}, 
 PlotStyle -> {AbsoluteThickness[4], AbsoluteThickness[2]}]

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.