I am trying to solve

-D[((α + γ/2)*a + β/(2*a) - R*a^3)*p[a], a] + 0.5*D[(γ*a^2 + β)*p[a], {a, 2}] == 0

with DSolve, but it does not work. If I let R = 0, then I am able to obtain an explicit solution for p[a].

    -(-3 a^2 R + α - β/(2 a^2) + γ/2) p[a] - 
    (-a^3 R + β/(2 a) + a (α + γ/2)) Derivative[1][p][a] + 
    0.5 (2 γ p[a] + 4 a γ Derivative[1][p][a] + (β + a^2 γ) (p^′′)[a]) == 0, 
  p[a], a]

Can someone kindly help me on this.


I evaluated

DSolve[-2 D[((α + γ/2) a + β/(2 a) - R a^3)*p[a], a] + D[(γ a^2 + β) p[a], {a, 2}] == 0, 
  p[a], a]

which is equivalent to the first formulation of your problem, but which eliminates the approximate coefficient (i.e., 0.5). Mathematica V9.0.1 returned

{{p[a] -> 
  a*E^(-((a^2*R)/γ) + ((R*β + α*γ - γ^2)*Log[β + a^2*γ])/γ^2)*C[1] + 
  a*E^(-((a^2*R)/γ) + ((R*β + α*γ - γ^2)*Log[β + a^2*γ])/γ^2)*C[2]*
    Integrate[E^((R*K[1]^2)/γ - ((R*β + α*γ)*Log[β + γ*K[1]^2])/γ^2)/K[1], 
      {K[1], 1, a}]}}

Does this result work for you, or do you find it unsatisfactory? If unsatisfactory, please explain why.

  • $\begingroup$ thanks a lot for this....I did not know that I needed to get rid of the 0.5. Regards! $\endgroup$ – Stoc Jun 12 '14 at 15:00
  • $\begingroup$ although it should be possible to solve this ODE by hand...is it possible that Mathematica can show me the steps involved? As wolframalpha does? $\endgroup$ – Stoc Jun 12 '14 at 15:16
  • $\begingroup$ @Stoc. I don't know a way to instruct Mathematica to show how it gets its results in a step-by-step way. My understanding is that its methods are not much like the ones humans use and would be unreadable to us humans. I have heard that Wolfram|Alpha can produce step-by-step results, but have no personal experience with that. $\endgroup$ – m_goldberg Jun 12 '14 at 20:16
  • 1
    $\begingroup$ @Stoc. I think I should mention that it's not so much a matter of "need[ing] to get rid of the 0.5", but of replacing any approximate numbers with integers or rationals. Changing 0.5 to 1/2 would have worked just as well as multiplying by integer 2. $\endgroup$ – m_goldberg Jun 12 '14 at 20:22

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.