I want to solve an ODE in Mathematica, but there is no response.

This is the code I used:

eqn = x'[y] - c + a x[y] Sin[y - y0]  == 0;
sol = DSolve[eqn, x, y]

Could anyone help me? Is there another function that solves the problem?


1 Answer 1


DSolve is hanging on a definite integral with symbolic parameters. We can temporarily inactivate and reactivate Integrate, which in this case causes DSolve to return an indefinite integral that doesn't hang.

eqn = x'[y] - c + a x[y] Sin[y - y0]  == 0;

Block[{Integrate = Inactive[Integrate]},
  DSolve[eqn, x[y], y]
] // Activate

enter image description here

  • $\begingroup$ What is C[1] in te final answer? $\endgroup$
    – sara nj
    Nov 8, 2016 at 11:41
  • $\begingroup$ @saranj it's an arbitrary constant. It's there because you had no initial condition. $\endgroup$
    – Greg Hurst
    Nov 8, 2016 at 13:46

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.