# Problem of Encountered non-numerical value for a derivative at t == 0

I try to solve this equation numerically :

eq= z''[t] + (2691+ D[Log[Abs[z'[t]^2]],t]) (z'[t]^2 + Abs[z'[t]]^2 ) == 0;


By NDSolveValue with arbitrary initial conditions:

NDSolveValue[{eq, z[0]==0.1, z'[0]==1}, z, {t,0,25}]


But this gives an error:

Encountered non-numerical value for a derivative at t == 0..

Declaration:

The error goes when I remove the Abs function, I.e., writing z'[t]^2 instead of Abs[z'[t]]^2 .

However the function z[t] is complex and I want to keep solving in case of Abs[z'[t]]^2. Any idea how to write this in a better syntax so that Mathematica can find numerical values?

Thanks

• However the function z[t] is complex but this is the function you are solving for. How do you know it is complex before solving for it? It is better to just solve for z[t] and after finding the solution you could look at its abs, real part or imaginary part and so on. – Nasser Jul 7 '20 at 12:52
• I know the function is complex because I'm studing, so in my analytic calculations there are z[t] and $z^*[t]$ . But I wanna to avoid using Conjugate[z[t]] in NDSolve so I'm using Abs instead. – Dr. phy Jul 7 '20 at 13:26

One way is to use RealAbs :
eq = z''[t] + (2691 + D[Log[RealAbs[z'[t]^2]], t]) (z'[t]^2 + RealAbs[z'[t]]^2) == 0;

• Thanks @rmw , but RealAbs is for real numbers, so the result is the same as if I used z'[t] ^2` . I just think numeric solving for complex numbers in Mathemtica is not trivial – Dr. phy Jul 7 '20 at 13:33