0
$\begingroup$

I defined a function composed of Mathieu's periodic functions:

    a[t_, \[Rho]_] := 
  (-2*I*q*Subscript[v, F]*MathieuC[-((2*(-2*Pi*q^2*Subscript[v, F]^2 - q^2*Subscript[v, F]*\[Rho]))/
         (Pi*\[Omega]^2)), (q^2*Subscript[v, F]*\[Rho])/(Pi*\[Omega]^2), 0]*
      MathieuS[-((2*(-2*Pi*q^2*Subscript[v, F]^2 - q^2*Subscript[v, F]*\[Rho]))/(Pi*\[Omega]^2)), 
       (q^2*Subscript[v, F]*\[Rho])/(Pi*\[Omega]^2), (t*\[Omega])/2] + 
     \[Omega]*MathieuC[-((2*(-2*Pi*q^2*Subscript[v, F]^2 - q^2*Subscript[v, F]*\[Rho]))/(Pi*\[Omega]^2)), 
       (q^2*Subscript[v, F]*\[Rho])/(Pi*\[Omega]^2), (t*\[Omega])/2]*MathieuSPrime[
       -((2*(-2*Pi*q^2*Subscript[v, F]^2 - q^2*Subscript[v, F]*\[Rho]))/(Pi*\[Omega]^2)), 
       (q^2*Subscript[v, F]*\[Rho])/(Pi*\[Omega]^2), 0])/
    (\[Omega]*MathieuC[-((2*(-2*Pi*q^2*Subscript[v, F]^2 - q^2*Subscript[v, F]*\[Rho]))/(Pi*\[Omega]^2)), 
      (q^2*Subscript[v, F]*\[Rho])/(Pi*\[Omega]^2), 0]*MathieuSPrime[
      -((2*(-2*Pi*q^2*Subscript[v, F]^2 - q^2*Subscript[v, F]*\[Rho]))/(Pi*\[Omega]^2)), 
      (q^2*Subscript[v, F]*\[Rho])/(Pi*\[Omega]^2), 0]) /. {Subscript[v, F] -> 1, \[Omega] -> 1}

It is the solution of this differential equation:

`DSolve[{Derivative[2][a][t] + Subscript[v, F]^2*q^2*(1 + (\[Rho]/(2*Pi*Subscript[v, F]))*(1 - Cos[\[Omega]*t]))*
       a[t] == 0, a[0] == 1, Derivative[1][a][0] == (-I)*Subscript[v, F]*q}, a[t], t][[1,1,2]]`

but in dimensionless form. I would like to calculate this quantity:

v = (1/2)*a[t, 0.5] - (I/(2*q))*D[a[t, 0.5], t]; numq = FullSimplify[ComplexExpand[Abs[v]^2]]

and eventually calculate and plot the time average of numq with respect to variable q as defined above:

averq = (1/(4*Pi))*Integrate[ComplexExpand[Abs[v]^2], {t, 0, 4*Pi}]
Plot[(1/(4*Pi))*Integrate[ComplexExpand[Abs[v]^2], {t, 0, 4*Pi}], {q, 0, 1}]

However, I noticed ComplexExpand does not really simplify here. And eventually the integration process generates the error message:

NIntegrate::inumr: The integrand 0. +<<12>>+<<191>> has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,12.5664}}.

What should I do to evaluate and plot this observable?

$\endgroup$

1 Answer 1

3
$\begingroup$

If I understand correctly.

Using your a

v = (1/2)*a[t, 0.5] - (I/(2*q))*D[a[t, 0.5], t] // FullSimplify

numq[q_, t_] = FullSimplify[ComplexExpand[Abs[v]^2]]

averq[q_] := (1/(4*Pi))*NIntegrate[numq[q, t] // Chop, {t, 0, 4*Pi}]


Plot[averq[q], {q, 0, 1}]

enter image description here

I mainly just added arguments to your functions.

$\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.