4
$\begingroup$

How do I obtain a spectrum of eigenvalues for my system of coupled differential equations?

$$ kf''(\theta) + \epsilon_{1} f(\theta) + a\cos(b \theta + c) g(\theta) = \lambda f(\theta),\\ a\cos(b \theta + c) f(\theta) + k g''(\theta) + \epsilon_{2}g(\theta) = \lambda g(\theta) $$

The system has periodic boundary conditions:

$$ f(\theta +2\pi) = f(\theta)\\ g(\theta +2\pi) = g(\theta) $$

I have tried using NDEigensystem, but I would like to plot a spectrum of the eigen values with varying parameters $ \left[ k, \epsilon_{1},\epsilon_{2},a,b,c \right] $. Here is a bit of code that I tried, but it doesn't work the way I want.

eqns= {k f''[\[Theta]] + Subscript[\[Epsilon], 1 ] f[\[Theta]] + a Cos[b \[Theta] + c] g[\[Theta]],
k g''[\[Theta]] + Subscript[\[Epsilon], 2 ] g[\[Theta]] + a Cos[b \[Theta] + c] f[\[Theta]] }
bc =  PeriodicBoundaryCondition[g[\[Theta]], \[Theta] == 2 \[Pi],Function[\[Theta], \[Theta] - 2 \[Pi]]]
{vals,funs}= NDEigensystem[{eqns,bc}/.{k->1,Subscript[\[Epsilon], 1 ]->1,Subscript[\[Epsilon], 2 ]->1,a->1,b->1,c->1},{f[\[Theta]], g[\[Theta]]}, {\[Theta], 0, 2\[Pi]}, 50]

I am looking for a way to vary the variable I previously mentioned and see how they change using a function similar to Manipulate.

$\endgroup$
3
  • 1
    $\begingroup$ Would be a good idea to give some Mathematica code for the equations. $\endgroup$
    – SPPearce
    Commented Nov 26, 2018 at 9:43
  • $\begingroup$ @VijayMocherla Can you add a minimal working code example of what you tried in your question? This makes it much easier for people to see what you were trying to do and give you a helpful answer. $\endgroup$ Commented Nov 26, 2018 at 19:19
  • 1
    $\begingroup$ @ThiesHeidecke Thanks for the suggestion. I have just added that to my original question. $\endgroup$
    – Fracton
    Commented Nov 27, 2018 at 14:16

1 Answer 1

3
$\begingroup$

How about this as a start:

Manipulate[
 {vals, funs} = 
  NDEigensystem[{eqns, bc} /. {k -> kk, 
     Subscript[\[Epsilon], 1] -> ee1, Subscript[\[Epsilon], 2] -> ee2,
      a -> 1, b -> 1, c -> 1}, {f[\[Theta]], g[\[Theta]]}, {\[Theta], 
    0, 2 \[Pi]}, 5];
 Plot[funs, {\[Theta], 0, 2 \[Pi]}]
 , {kk, 1/2, 2}
 , {ee1, 1/2, 2}
 , {ee2, 1/2, 2}
 ]
$\endgroup$

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.