1
$\begingroup$

I have following equation:

$\int^{\delta_c}_{\delta_c-\pi}\sqrt{h^2_c(\cos(\delta_c)^2-\cos(\delta)^2+\Omega_c(\delta_c-\delta)}\text{d}\delta=\pi$,
where $\delta_c=\frac{1}{2}\arcsin\left(\frac{\Omega_c}{h^2_c}\right)$ and I want to make a $\Omega_c(h_c)$ plot.

I have tried to solve it via NIntegrate and NSolve.

function[a_, b_, \[Delta]_] := NIntegrate[Sqrt[b(Cos[1/2 ArcSin[a/b]]^2 - Cos[\[Delta]]^2) + a (1/2 ArcSin[a/b] - \[Delta])], {\[Delta], 1/2 ArcSin[a/b] - \[Pi], 1/2 ArcSin[a/b]}]

NSolve[function[a, 0.1, \[Delta]] == \[Pi], a, Reals]

$\endgroup$
  • $\begingroup$ If you have tried something, please add it to the question. You're significantly more likely to get help if people don't have to redo all the things you did (starting already from copying the equation into MMA by hand, as there's no code for it) $\endgroup$ – Lukas Lang Jun 13 '18 at 10:43
  • 2
    $\begingroup$ conflict: Functionparameter \Delta and integrationvariable \Delta. You should omit the parameter in the functiondefinition. $\endgroup$ – Ulrich Neumann Jun 13 '18 at 11:20
1
$\begingroup$
function[Ω_?NumericQ, h_?NumericQ] := 
NIntegrate[Sqrt[h^2 (Cos[1/2 ArcSin[Ω/h^2]]^2 - Cos[δ]^2) + Ω *(1/2 ArcSin[Ω/h^2] - δ)],
{δ, 1/2 ArcSin[Ω/h^2] - π, 1/2 ArcSin[Ω/h^2]}, 
Method -> "AdaptiveQuasiMonteCarlo"];

I used Method -> "AdaptiveQuasiMonteCarlo" in NDSolve,because is fast.

ContourPlot[function[Ω, h] == Pi, {h, -2, 2}, {Ω, -1/10, 1}, FrameLabel -> Automatic, 
PlotPoints -> 10] // Quiet

enter image description here

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