# Solve differential equations with an initial condition in the form of a limit as $t\rightarrow \infty$

I want to solve the following differential equation

with the initial condition

This is known as the Bunch-Davies vacuum, and the above are equations (4.1) and (3.37) from this paper

Here is what I have tried so far,

eq = {y''[t] + (k^2 - 2/t) y[t] == 0, y[-∞] == Exp[I*k*t], y'[-∞] == 0};
NDSolve[eq, y[t], t]


However, I do not know how to input this initial condition in NDSolve.

Thanks!

Please let write my equation in the new form:

 eq = {y''[t] + (k^2 - 2/t) y[t] == 0, y[-\[Infinity]] == Exp[I*k*t], y'[-\      [Infinity]] == 0};
NDSolve[eq, y[t], t]


How can solve this one?

• Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 Mar 2 '16 at 8:37
• In your initial condition, isn't t equal to 0? If so, then it would be y[0] = 1 – Jason B. Mar 2 '16 at 8:50
• No, in fact t is not equal to 0. – mzar Mar 2 '16 at 8:54
• @mzar, sorry if I am being dense, but you are solving for y[t], right? So what, then, does y[0] mean if not the value of y when t is equal to 0? – Jason B. Mar 2 '16 at 9:00
• So let's consider this initial condition: y[-[Infinity]]=E^(-I k t) – mzar Mar 2 '16 at 9:05

After correcting few elementary syntax errors you might try this:

 eq = {y''[t] + (k^2 - 2/t) y[t] == 0, y[0] == Exp[I*k*t], y'[0] == 0};
DSolve[eq, y[t], t]

(*
{{y[t] -> -E^(-Sqrt[k^2] t + (-Sqrt[-k^2] + Sqrt[k^2]) t) t C[
1] (Hypergeometric1F1[
1 + (-4 Sqrt[k^2] - 2 (-2 - 2 Sqrt[k^2]))/(4 Sqrt[-k^2]), 2,
2 Sqrt[-k^2] t] HypergeometricU[
1 + (-4 Sqrt[k^2] - 2 (-2 - 2 Sqrt[k^2]))/(4 Sqrt[-k^2]), 2,
0] - HypergeometricU[
1 + (-4 Sqrt[k^2] - 2 (-2 - 2 Sqrt[k^2]))/(4 Sqrt[-k^2]), 2,
2 Sqrt[-k^2] t])}}

*)


with a warninhg: "Unable to resolve some of the arbitrary constants in the general solution using the given boundary conditions....". The warning indicates that the initial conditions should be chosen more carefully.

Have fun!

• Thank you, but I wanted to use the NDSolve not DSolve. As well as, is it possible to extend it to the parametricNDSolve and then for example plot y in terms of k? – mzar Mar 2 '16 at 9:00
• @mzar, keep in mind that the solution here is contradictory to the initial conditions you gave. If you substitute t=0 in the solution here, it gives 0. – Jason B. Mar 2 '16 at 9:05
• So let's consider this initial condition: y[-[Infinity]]=E^(-I k t) – mzar Mar 2 '16 at 9:07
• @mzar Keep also in mind that the above solutionwas unable to resolve an arbitrary constant. As I already have written something here is wrong either with the equation or with the initial conditions. To plot it you (1) need to fix this constant/initial condition question and (2) you cannot plot a complex function straightforwardly. You need then think, what precisely would you like to plot? And this is up to you, not up to me. Or, otherwise, you need to fix somehow a real initial condition. It is again up to you. – Alexei Boulbitch Mar 2 '16 at 9:11
• @mzar By the way, in a hurry I did not noticed that the initial condition is formulated incorrectly: how is it that it depends upon t in your case? – Alexei Boulbitch Mar 2 '16 at 9:13