# constraint – differential equation with a condition

I'm trying to solve a harmonic oscillator equation with a (real) time-dependent frequency,

$$v & # 39; ( tau) + omega ^ 2 ( tau) v (k) = 0$$.

This equation has a two-dimensional space of solutions $${v_k, v_k ^ * }$$.
To specify the mode function $$v$$ I have to impose the following conditions,

$$v

$$lim _ { tau rightarrow- infty} v_k = frac {1} { sqrt {2k}} exp[- i k tau]$$.

Naively, I tried to implement these conditions in the ParametricNDSolveValue function, but I received the following message:

Do you have any idea how to impose these conditions? I've also tried using only the second condition and its derivative, but the solution then violates the first condition, which should be valid at all times.

I would really appreciate any comments you can give me.