I have the following ODE:

$$\frac{d y}{d x}=y^2-(A \csc^2 x+B^2 \sin^2 x-C)$$

where $A,B,C$ are constants.

Can one come up with an appropriate integrating factor to make it exact?

I have been trying various ways such as change of variable: $y=z \sqrt{A \csc^2 x + B^2 \sin ^2 x-C}$, but none of them seem to work.


As pointed out in the comment, I am sorry to not have linked my duplicate question in MSE in the first place. I had already asked the same question in MSE, and as I was not getting any response I thought of asking here.

Duplicate question in MSE:



The Maple 2018.0 command

dsolve(diff(y(x), x) = y(x)^2-A*csc(x)^2-B^2*sin(x)^2+C);


{y(x) = (1/2)*(4*cos(x)^2*HeunCPrime(0, 1/2, (1/2)*(4*A+1)^(1/2), -(1/4)*B^2, 3/8+(1/4)*B^2+(1/4)*A+(1/4)*C, cos(x)^2)*_C1+4*cos(x)*HeunCPrime(0, -1/2, (1/2)*(4*A+1)^(1/2), -(1/4)*B^2, 3/8+(1/4)*B^2+(1/4)*A+(1/4)*C, cos(x)^2)+2*HeunC(0, 1/2, (1/2)*(4*A+1)^(1/2), -(1/4)*B^2, 3/8+(1/4)*B^2+(1/4)*A+(1/4)*C, cos(x)^2)*_C1)*sin(x)/(cos(x)*HeunC(0, 1/2, (1/2)*(4*A+1)^(1/2), -(1/4)*B^2, 3/8+(1/4)*B^2+(1/4)*A+(1/4)*C, cos(x)^2)*_C1+HeunC(0, -1/2, (1/2)*(4*A+1)^(1/2), -(1/4)*B^2, 3/8+(1/4)*B^2+(1/4)*A+(1/4)*C, cos(x)^2))+(1/2)*((-(4*A+1)^(1/2)*_C1-_C1)*HeunC(0, 1/2, (1/2)*(4*A+1)^(1/2), -(1/4)*B^2, 3/8+(1/4)*B^2+(1/4)*A+(1/4)*C, cos(x)^2)*cos(x)^2+(-(4*A+1)^(1/2)-1)*HeunC(0, -1/2, (1/2)*(4*A+1)^(1/2), -(1/4)*B^2, 3/8+(1/4)*B^2+(1/4)*A+(1/4)*C, cos(x)^2)*cos(x))/((cos(x)*HeunC(0, 1/2, (1/2)*(4*A+1)^(1/2), -(1/4)*B^2, 3/8+(1/4)*B^2+(1/4)*A+(1/4)*C, cos(x)^2)*_C1+HeunC(0, -1/2, (1/2)*(4*A+1)^(1/2), -(1/4)*B^2, 3/8+(1/4)*B^2+(1/4)*A+(1/4)*C, cos(x)^2))*sin(x))}

in terms of Heun function.

  • 2
    $\begingroup$ So, Maple is, in this respect, better. Mathematica, after DSolve[y'[x] == (y[x])^2 - A (Csc[x])^2 + B (Sin[x])^2 + C, y, x], gives the answer "Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information." $\endgroup$
    – user539887
    May 29 '18 at 8:05

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.