3
$\begingroup$

I am trying to verify my hand solution to an ODE. The solution I got is in terms of Bessel functions. Maple gives same solution.

Mathematica gives the solution in terms of ParabolicCylinderD which I have not used before and not familiar with.

I am assuming both solutions are Mathematically equivalent.

But I am not able to transform the solution from ParabolicCylinderD to Bessel function. I tried FunctionExpand and tried MeijerGReduce but no luck.

ode = y''[x] + x^2 *y[x] == 0;
sol = DSolve[ode, y[x], x]

Mathematica graphics

While in Maple

Mathematica graphics

This is what I tried in Mathematica

 FunctionExpand[sol]

Mathematica graphics

 MeijerGReduce[FunctionExpand[sol], x]

Mathematica graphics

And I do not know what to do next. Any suggestions?

Mathematica 12.0 on windows 10.

https://reference.wolfram.com/language/ref/ParabolicCylinderD.html

$\endgroup$
4
$\begingroup$
$Version

(* "12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)" *)

Clear["Global`*"]

ode = y''[x] + x^2*y[x] == 0;

sol = DSolve[ode, y, x][[1]]

(* {y -> Function[{x}, 
   C[2] ParabolicCylinderD[-(1/2), (-1 + I) x] + 
    C[1] ParabolicCylinderD[-(1/2), (1 + I) x]]} *)

Verifying that sol satisfies ode

ode /. sol // FullSimplify

(* True *)

y1[x_] = y[x] /. sol;

The Maple solution you gave is

y2[x_] = C[3] Sqrt[x] BesselJ[1/4, x^2/2] +
   C[4] Sqrt[x] BesselY[1/4, x^2/2];

Verifying that y2 satisfies the ode

ode /. y -> y2 // FullSimplify

(* True *)

Equate the functions (y1 and y2) and their derivatives at x = 0 to find the relations between the arbitrary constants.

const = Solve[{
     (Limit[y1[x], x -> 0, Direction -> "FromAbove"] // Simplify) ==
      Limit[y2[x], x -> 0, Direction -> "FromAbove"],
     (y1'[0] // Simplify) ==
      (Limit[y2'[x], x -> 0, Direction -> "FromAbove"] // FullSimplify)}, 
      {C[1], C[2]}][[1]] // FullSimplify

(* {C[1] -> -((2^(1/4) (C[3] + (2 - I) C[4]))/Sqrt[π]), 
 C[2] -> (2^(1/4) (C[3] - I C[4]))/Sqrt[π]} *)

Rewriting the arbitrary constants in y1

y3[x_] = (y1[x] /. const // FunctionExpand // FullSimplify)

(* Sqrt[x] (-Sqrt[2] BesselJ[-(1/4), x^2/2] C[4] + 
   BesselJ[1/4, x^2/2] (C[3] + C[4])) *)

Verifying that y3 satisfies the ode

ode /. y -> y3 // FullSimplify

(* True *)

y3 expresses the solution in terms of Bessel functions although in a slightly different form than that provided by Maple.

EDIT: Verifying that y2 and y3 are equal

y2[x] == y3[x] // FullSimplify

(* True *)
$\endgroup$

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.