1
$\begingroup$

I want to solve the following differential equation

enter image description here

with the initial condition

enter image description here

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?

$\endgroup$
12
  • $\begingroup$ 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! $\endgroup$
    – user9660
    Commented Mar 2, 2016 at 8:37
  • $\begingroup$ In your initial condition, isn't t equal to 0? If so, then it would be y[0] = 1 $\endgroup$
    – Jason B.
    Commented Mar 2, 2016 at 8:50
  • $\begingroup$ No, in fact t is not equal to 0. $\endgroup$
    – mzar
    Commented Mar 2, 2016 at 8:54
  • $\begingroup$ @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? $\endgroup$
    – Jason B.
    Commented Mar 2, 2016 at 9:00
  • $\begingroup$ So let's consider this initial condition: y[-[Infinity]]=E^(-I k t) $\endgroup$
    – mzar
    Commented Mar 2, 2016 at 9:05

1 Answer 1

1
$\begingroup$

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!

$\endgroup$
9
  • $\begingroup$ 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? $\endgroup$
    – mzar
    Commented Mar 2, 2016 at 9:00
  • $\begingroup$ @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. $\endgroup$
    – Jason B.
    Commented Mar 2, 2016 at 9:05
  • $\begingroup$ So let's consider this initial condition: y[-[Infinity]]=E^(-I k t) $\endgroup$
    – mzar
    Commented Mar 2, 2016 at 9:07
  • $\begingroup$ @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. $\endgroup$ Commented Mar 2, 2016 at 9:11
  • $\begingroup$ @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? $\endgroup$ Commented Mar 2, 2016 at 9:13

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.