Suppose I have: $$\frac{p}{[K(p)-K(\frac{-\pi}{2},p)]^2} = x$$
$K(p)$ being the complete elliptic function of the first kind and $K(\theta,p)$ the incomplete elliptic function of the first kind.
How could I determine $p$ as a function of $x$?
I'm using scipy, I'm more of a programmer that a classical mathematician.
I've been looking into the Jacobian elliptic functions but as I understand it, it's used to determine the angle of the elliptic function knowing the parameter.
EDIT 1
As Claude Leibovici noticed, $K(-\frac{\pi}{2},p) = -K(p)$
So now I'm looking for $p$, knowing $y$ in:$$y = \frac{p}{K(p)^2}$$
Using Python, you can firstly plot $y$ in function of $p$:
Say you want the values $p$ giving $y=0.12$. This graphic allows you to get an idea of the values of $p$, say $0.4$ and $0.9$. Then you can use
fsolve