MATLAB: Integration using Legendre elliptical function

integration

i am trying to perform integrate f(x)=1/sqrt(1-(k^2)*sin(x)*sin(x)) , where k is a constant 0<k<1 and limit of x is 0 to pi/2. and f(x) is found by substituting w=sin(x) in dw/sqrt((1-w*w)(1-k*k*w*w)) this is a Legendre elliptical integral but i am not getting answer is this is possible to get f(x) in terms of k after integration and what will be expression for this.i have to find f(k) after integration

Best Answer

f=@(k)ellipke(k^2/(k^2-1))/sqrt(1-k^2)
Best wishes
Torsten.