0
$\begingroup$

I have just started using Mathematica. I want to solve a differential equation numerically with NDSolve. I have to specify an "initial condition" at -Infinity (note that the parameter t goes from -Infinity to 0) but I don't know how to do that. I've tried as shown below, but it gives me the following error: "Cannot find starting value for the variable y". Thanks in advance!

enter image description here,enter image description here

eq = NDSolve [{y''[t] + (k^2 - 2/t^2) y[t] == 0, 
 y[-Infinity] == 1/Sqrt[2 k], y'[-Infinity] == -ik/Sqrt[2 k]}, 
 y, {t, -100, 0} ]

I know that this equation has an analytical solution, but I would like to solve it with NDSolve in order to be able to apply this method where there are not.

$\endgroup$
  • 1
    $\begingroup$ Eventually, mathematica.stackexchange.com/a/130823/42934 could be of help. The solution to your differential equation without boundary conditions can be obtained analytically: DSolve[y''[t] + (k^2 - 2/t^2) y[t] == 0, y[t], {t, -Infinity, 0}] resulting in y(t)->(I Sqrt[2/\[Pi]] ((Subscript[c, 2] k t-Subscript[c, 1]) sin(k t)+(Subscript[c, 1] k t+Subscript[c, 2]) cos(k t)))/((-k)^(3/2) t). Could you continue from here by bringing your boundary conditions into a similar form and dermining your unknown coefficients then? $\endgroup$ – gothicVI Nov 13 '18 at 15:32
  • $\begingroup$ You'll need two boundary conditions to specify your solution, since you have a second-order ODE. What's your other one? $\endgroup$ – Michael Seifert Nov 13 '18 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.