Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to solve the following differential equation

DSolve[y''[x] == (λ y[x])/Sqrt[-1 + x], y[x],x]

But do not know how to actually solve it. Any suggestion?

share|improve this question
1  
I suspect you need to do this numerically. Do you have some reason to expect an analytic solution? –  george2079 Apr 9 at 19:39
    
Are you have any answer to numerical solution? –  Bahram Apr 9 at 19:43
    
Basically the same, use NDSolve and you need to specify lambda and provide initial/boundary conditions. –  george2079 Apr 9 at 20:04

3 Answers 3

up vote 2 down vote accepted

A simpler direct solution is the following:

Ignoring the -1 for a moment, i.e. replacing Sqrt[x-1] by Sqrt[x], Mathematica solves the resulting ODE easily

sol = DSolve[z''[x] == \[Lambda] z[x]/Sqrt[x], z[x], x]

(*
Out[1]= {{z[x] -> (2/3)^(2/3) Sqrt[x] \[Lambda]^(1/3)
      BesselI[-(2/3), 4/3 x^(3/4) Sqrt[\[Lambda]]] C[1] Gamma[1/3] + ((-2)^(
     2/3) Sqrt[x] \[Lambda]^(1/3)
      BesselI[2/3, 4/3 x^(3/4) Sqrt[\[Lambda]]] C[2] Gamma[5/3])/3^(2/3)}}
*)

Now we restore the -1 and get

y[x_] = z[x] /. sol[[1]] /. x -> x - 1

(*
Out[2]= (2/3)^(2/3) Sqrt[-1 + x] \[Lambda]^(1/3)
   BesselI[-(2/3), 4/3 (-1 + x)^(3/4) Sqrt[\[Lambda]]] C[1] Gamma[1/
   3] + ((-2)^(2/3) Sqrt[-1 + x] \[Lambda]^(1/3)
   BesselI[2/3, 4/3 (-1 + x)^(3/4) Sqrt[\[Lambda]]] C[2] Gamma[5/3])/3^(2/3)
*)

Finally we check that y[x] really solves the original ODE

y''[x]/(\[Lambda] y[x]) // FullSimplify

(*
Out[3]= 1/Sqrt[-1 + x]
*)

Check ok. Done.

share|improve this answer

Mathematica can also solve this differential equation if you help it with the choice of variable substitution:

Clear[y,λ,x,z,u,v]
eqn = y''[x] == λ y[x]/Sqrt[-1 + x]
(* ==> (y^\[Prime]\[Prime])[x] == (λ y[x])/Sqrt[-1 + x] *)

u[x_] := Sqrt[x - 1]
y[x_] := z[u[x]]
eqn2 = Simplify[eqn /. x -> InverseFunction[u][v], v > 0]
(*
==> 4 v^2 λ z[v] + Derivative[1][z][v] == 
 v (z^\[Prime]\[Prime])[v]
*)

zSolution[v_] = z[v] /. First[DSolve[eqn2, z[v], v]]
(*
==> AiryAiPrime[2^(2/3) v λ^(1/3)] C[1] + 
 AiryBiPrime[2^(2/3) v λ^(1/3)] C[2]
*)

ySolution[x_] = zSolution[u[x]]
(*
==> AiryAiPrime[2^(2/3) Sqrt[-1 + x] λ^(1/3)] C[1] + 
 AiryBiPrime[2^(2/3) Sqrt[-1 + x] λ^(1/3)] C[2]
*)

Block[{y}, Simplify[eqn /. y -> ySolution]]
(* ==> True *)

All I did here was to define a new function z through the substitution of variable $u = \sqrt{x-1}$. The original differential equation eqn is then transformed into the new one, eqn2, which can be solved analytically with DSolve. Finally, I also check that the general solution obeys the original equation when substituting back the original independent variable x.

Edit: an alternate substitution

To get Bessel functions as solutions, instead of derivatives of Airy functions, the only change to the above would be to choose as our new variable $u = (x-1)^{(3/4)}$. This is shown here by repeating the same steps as before with that single change:

Clear[y, λ, x, z, u, v]
eqn = y''[x] == λ y[x]/Sqrt[-1 + x];
u[x_] := (x - 1)^(3/4)
y[x_] := z[u[x]]
eqn2 = Simplify[eqn /. x -> InverseFunction[u][v], v > 0];
zSolution[v_] = z[v] /. First[DSolve[eqn2, z[v], v]];
ySolution[x_] = zSolution[u[x]];   
Block[{y = ySolution}, FullSimplify[eqn]]
(* ==> True *)

TeXForm[ySolution[x]]

$$c_1 \sqrt{x-1} J_{\frac{2}{3}}\left(-\frac{4}{3 } i (x-1)^{3/4} \sqrt{\lambda }\right)+c_2 \sqrt{x-1} Y_{\frac{2}{3}}\left(-\frac{4}{3 } i (x-1)^{3/4} \sqrt{\lambda }\right)$$

This is an alternate general solution.

share|improve this answer
    
It seems that someone downvoted this answer. Is there any reason why one of my two approaches would be bad? –  Jens 11 hours ago

This is a Bessel type ODE. So it has solutions in terms of special Bessel functions. This can be done by hand using Frobenius series method if needed. You might want to do this to verify the solution below.

Here is the solution from Maple and I converted it to Mathematica syntax. The solution contains 2 arbitrary constants of integrations and use BesselI and BesselY both implemented in Mathematica. So direct translation was only needed

Mathematica graphics

Translate to Mathematica:

Clear[x, c1, c2, lam]
sol1 = Sqrt[x - 1] BesselJ[2/3, 4/3 Sqrt[-lam] (x - 1)^(3/4)];
sol2 = Sqrt[x - 1] BesselY[2/3, 4/3 Sqrt[-lam] (x - 1)^(3/4)];
fullSolution = c1 sol1 + c2 sol2

Mathematica graphics

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.