I have a differential equation: $x^2 \frac{d^2 y}{dx^2} +(x^2-3)y=0$

I solved it and obtained:

y[x] -> Sqrt[x] BesselJ[Sqrt[13]/2, x] C[1] + Sqrt[x] BesselY[Sqrt[13]/2, x] C[2]

Now I'm trying to find the value for C[2] and C[1] when y[x]=0 at x=0 and 1 at x=1.

I tried using simultaneous equations using the Solve[ ] function such as:

eq1 = Sqrt[x] BesselJ[Sqrt[13]/2, x] C[1] = 0
eq2 = Sqrt[x] BesselJ[Sqrt[13]/2, x] C[1] = 1
Solve[{eq1, eq2}, C[1]]

It appears that x=0 is a singular point for this. We can go about it less directly.

yx = 
 DSolveValue[{x^2*D[y[x], {x, 2}] + (x^2 - 3)*y[x] == 0, y[1] == 1}, 
  y[x], x]

(* Out[524]= 1/
  1] (Sqrt[x] BesselY[Sqrt[13]/2, x] + 
   Sqrt[x] BesselJ[Sqrt[13]/2, x] BesselY[Sqrt[13]/2, 1] C[1] - 
   Sqrt[x] BesselJ[Sqrt[13]/2, 1] BesselY[Sqrt[13]/2, x] C[1]) *)

(Something like the above, maybe without the IC, should have been in the original post by the way. I really do not like to do unnecessary typing.)

So now we have one free parameter. We can get a general sort of solution for the case where y[x]==x, then extract an appropriate limit. First solve for when the expression in x is equal to x.

csmall = C[1] /. First[Solve[yx == x, C[1]]]

(* Out[543]= (Sqrt[x] BesselY[Sqrt[13]/2, 1] - BesselY[Sqrt[13]/2, x])/(
BesselJ[Sqrt[13]/2, x] BesselY[Sqrt[13]/2, 1] - 
 BesselJ[Sqrt[13]/2, 1] BesselY[Sqrt[13]/2, x]) *)

Now see if we can evaluate for x==0. Just plugging in will give an indeterminate form, so I take a limit instead.

c0 = Limit[csmall, x -> 0]

(* Out[544]= 1/BesselJ[Sqrt[13]/2, 1] *)

Now use that for the remaining constant.

yxComplete = yx /. C[1] -> c0

(* Out[547]= (Sqrt[x] BesselJ[Sqrt[13]/2, x])/BesselJ[Sqrt[13]/2, 1] *)
  • $\begingroup$ What about a value for C[2]? Thanks for the answer by the way $\endgroup$ – Ray Jan 19 '20 at 1:17
  • $\begingroup$ There is no C[2] (check Out[524]). I used one boundary condition so there was only one undetermined parameter. $\endgroup$ – Daniel Lichtblau Jan 19 '20 at 15:54

Your Answer

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

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