2
$\begingroup$

Here's my code for what I'm working on:

ode = l1*(1 + 2*β^2 + 3*β*Cos[θ])*f[θ] + (1/2)*l2*(1 + 3*β*Cos[θ] + 2*β^2*Cos[2*θ])*Sin[2*θ]*Derivative[1][f][θ] + 
     l2*(1 + β^2 + 3*β*Cos[θ] + β^2*Cos[2*θ])*Sin[θ]^2*Derivative[2][f][θ] == 0; 

ics1 = {f[θ0] == 0, Derivative[1][f][θ0] == 1}; 

Block[
{l1 = 100, l2 = 1, β = 0.5, f0 = 1, fp0 = 1, θ0 = 2}, 
  eqn0 = ode; 
Show[
{
ListLinePlot[NDSolveValue[{eqn0, ics1}, f, {θ, 0, Re[ArcCos[-β^(-1)]]}], 
      PlotRange -> {{0, Re[ArcCos[-β^(-1)]]}, {-5, 5}}], 

Graphics[{Red, Dashed, Line[{{Re[ArcCos[-β^(-1)]], -15}, {Re[ArcCos[-β^(-1)]], 15}}]}, 
      PlotRange -> {{-0.5, 1 + 0.2}, Automatic}], Graphics[{Orange, Dashed, Line[{{2, -15}, {2, 15}}]}, 
      PlotRange -> {{-0.5, 1 + 0.2}, Automatic}]
}
]
]

Essentially, l1 and l2 are parameters that define an infinite set of solutions. It may be insightful to play with them to see how the endpoints of the solution change. I've found that they appear bounded for β = 0.5 and a large l1 compared to l2. When I zoom in on my plot, at extremely small values of theta near zero, such as 10^-9, the solution isn't plotted exactly all the way to zero.

Here's a picture of l1 = 100, l2 = 1, and beta = 0.5 zoomed in to the range (10^-9,10^-8):

enter image description here

Looking at other choices of l1, l2, and beta, you'll find that the solution isn't bounded.

$\endgroup$

1 Answer 1

3
$\begingroup$

Because of your inner bcs you might consider two initial value problems and exclude the singularities \[Theta]==0,\[Theta]==Pi in a small eps-environment:

    sol = Block[{l1 = 100, l2 = 1, \[Beta] = 0.5, f0 = 1, 
   fp0 = 1, \[Theta]0 = 2, eps = 10^-5}, eqn0 = ode;
  sol0 = NDSolveValue[{eqn0, ics1}, f, {\[Theta], eps, \[Theta]0 } ]; 
  sol1 = NDSolveValue[{eqn0, ics1}, 
    f, {\[Theta], \[Theta]0, Re[ArcCos[-\[Beta]^(-1)]] - eps} ] ;
  {sol0, sol1}]

    Show[{Plot[
   Evaluate[ sol[[1]][\[Theta]] ], {\[Theta], 
    sol[[1]]["Domain"][[1, 1]], sol[[1]]["Domain"][[ 1, -1]]}, 
   PlotStyle -> {Thickness[Large], Blue}  ], 
  Plot[Evaluate[ sol[[2]][\[Theta]] ], {\[Theta], 
    sol[[2]]["Domain"][[1, 1]], sol[[2]]["Domain"][[ 1, -1]]}, 
   PlotStyle -> {Thickness[Large], Red}  ]}, PlotRange -> {-1, 1}]

enter image description here

$\endgroup$
3
  • $\begingroup$ but no matter what, since the coefficient of the second derivative f''(theta) is singular at theta = 0, there are still technically asymptotes at the endpoints yes? $\endgroup$
    – DingleGlop
    Commented Jul 31 at 8:27
  • 1
    $\begingroup$ Coefficients of f''[teta] are zero for teta==0 and(!) teta=Pi $\endgroup$ Commented Jul 31 at 10:25
  • 1
    $\begingroup$ @DingleGlop Perhaps MichealE2's answer in this link What is the reason for failing to solve the following equation? might help $\endgroup$ Commented Jul 31 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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