0

I am trying to execute the following code.

g = 1
a = 1.4 + 4.4*x/Pi
V = Integrate[r a, x] 
DSolve[
  (V Sin[x] + H Cos[x]) y'[x] + y[x] (a r x Cos[x] + (g a r - H ) Sin[x]) == 
    g a Sin[x] (a^2/12 + r^2), 
  y[x], x]

DSolve in the above code keeps running indefinitely. Kindly help.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
  • 2
    Are you even sure this DE has a closed form solution? – J. M.'s missing motivation Oct 12 '17 at 14:20
  • No. I developed the differential equation and now trying to find a closed form solution. With g=1 and a=CONSTANT it forms a exact differential equation for which I have extracted the solution. But for 'a' as above it keeps running indefinitely. – Pranav Suresh Oct 12 '17 at 14:24

1 Answers1

5

Looks like Integrate is hanging. If you don't care about unevaluated integrals, you could use withTimedIntegrate.

g = 1;
a = 7/5 + 22/5*x/Pi;
V = Integrate[r a, x];

withTimedIntegrate[
  DSolveValue[(V Sin[x] + H Cos[x]) y'[x] + y[x] (a r x Cos[x] + (g a r - H) Sin[x]) == g a Sin[x] (a^2/12 + r^2), y[x], x], 
  1
] // TraditionalForm

enter image description here

Greg Hurst
  • 35,921
  • 1
  • 90
  • 136