Skip to main content
improved formatting
Source Link
bbgodfrey
  • 62.1k
  • 18
  • 92
  • 160

Why not solve the problem exactly?

You will find that the asymptotics does not fit what you requested but contains an additional logarithmic phase.

yy[r_] = y[r] /. 
   DSolve[y''[r] + (1 + 1/r) y[r] == 0 && y[0] == 0 && y'[0] == 5, y[r], 
     r][[1]] // Quiet

(*
Out[151]= 5 E^(-I r) r Hypergeometric1F1[1 + I/2, 2, 2 I r]
*)

Checking the intial values: OK

{yy[0], yy'[0]}

(* Out[152]= {0, 5} *)

The asymptotic expansion is

s = Series[yy[r], {r, \[Infinity], 1}] // Normal

(*
Out[156]= E^(-I r) r^(-(I/
  2)) ((5 (-2 I)^(-1 - I/2))/Gamma[1 - I/2] + (
   5 (2 I)^(-1 + I/2) E^(2 I r) r^I)/Gamma[1 + I/2])
*)

Letting

z = (5 ((-2 I)^(-1 - I/2)) )/Gamma[1 - I/2];

and defining modulus [Rho]ρ and phase [Delta]]δ of z by

z = \[Rho]ρ Exp[I \[Delta]];δ];

the asymptotic expansion becomes

s1 = \[Rho]ρ Cos[r + 1/2 Log[r] - \[Delta]];δ];

The numeric values are

{\[Rho]ρ, \[Delta]δ} = {1.3796613460821034, 0.9801644376094962};

Why not solve the problem exactly?

You will find that the asymptotics does not fit what you requested but contains an additional logarithmic phase.

yy[r_] = y[r] /. 
   DSolve[y''[r] + (1 + 1/r) y[r] == 0 && y[0] == 0 && y'[0] == 5, y[r], 
     r][[1]] // Quiet

(*
Out[151]= 5 E^(-I r) r Hypergeometric1F1[1 + I/2, 2, 2 I r]
*)

Checking the intial values: OK

{yy[0], yy'[0]}

(* Out[152]= {0, 5} *)

The asymptotic expansion is

s = Series[yy[r], {r, \[Infinity], 1}] // Normal

(*
Out[156]= E^(-I r) r^(-(I/
  2)) ((5 (-2 I)^(-1 - I/2))/Gamma[1 - I/2] + (
   5 (2 I)^(-1 + I/2) E^(2 I r) r^I)/Gamma[1 + I/2])
*)

Letting

z = (5 ((-2 I)^(-1 - I/2)) )/Gamma[1 - I/2];

and defining modulus [Rho] and phase [Delta]] of z by

z = \[Rho] Exp[I \[Delta]];

the asymptotic expansion becomes

s1 = \[Rho] Cos[r + 1/2 Log[r] - \[Delta]];

The numeric values are

{\[Rho], \[Delta]} = {1.3796613460821034, 0.9801644376094962};

Why not solve the problem exactly?

You will find that the asymptotics does not fit what you requested but contains an additional logarithmic phase.

yy[r_] = y[r] /. 
   DSolve[y''[r] + (1 + 1/r) y[r] == 0 && y[0] == 0 && y'[0] == 5, y[r], 
     r][[1]] // Quiet

(*
Out[151]= 5 E^(-I r) r Hypergeometric1F1[1 + I/2, 2, 2 I r]
*)

Checking the intial values: OK

{yy[0], yy'[0]}

(* Out[152]= {0, 5} *)

The asymptotic expansion is

s = Series[yy[r], {r, , 1}] // Normal

(*
Out[156]= E^(-I r) r^(-(I/
  2)) ((5 (-2 I)^(-1 - I/2))/Gamma[1 - I/2] + (
   5 (2 I)^(-1 + I/2) E^(2 I r) r^I)/Gamma[1 + I/2])
*)

Letting

z = (5 ((-2 I)^(-1 - I/2)) )/Gamma[1 - I/2];

and defining modulus ρ and phase δ of z by

z = ρ Exp[I δ];

the asymptotic expansion becomes

s1 = ρ Cos[r + 1/2 Log[r] - δ];

The numeric values are

{ρ, δ} = {1.3796613460821034, 0.9801644376094962};
Source Link

Why not solve the problem exactly?

You will find that the asymptotics does not fit what you requested but contains an additional logarithmic phase.

yy[r_] = y[r] /. 
   DSolve[y''[r] + (1 + 1/r) y[r] == 0 && y[0] == 0 && y'[0] == 5, y[r], 
     r][[1]] // Quiet

(*
Out[151]= 5 E^(-I r) r Hypergeometric1F1[1 + I/2, 2, 2 I r]
*)

Checking the intial values: OK

{yy[0], yy'[0]}

(* Out[152]= {0, 5} *)

The asymptotic expansion is

s = Series[yy[r], {r, \[Infinity], 1}] // Normal

(*
Out[156]= E^(-I r) r^(-(I/
  2)) ((5 (-2 I)^(-1 - I/2))/Gamma[1 - I/2] + (
   5 (2 I)^(-1 + I/2) E^(2 I r) r^I)/Gamma[1 + I/2])
*)

Letting

z = (5 ((-2 I)^(-1 - I/2)) )/Gamma[1 - I/2];

and defining modulus [Rho] and phase [Delta]] of z by

z = \[Rho] Exp[I \[Delta]];

the asymptotic expansion becomes

s1 = \[Rho] Cos[r + 1/2 Log[r] - \[Delta]];

The numeric values are

{\[Rho], \[Delta]} = {1.3796613460821034, 0.9801644376094962};