If I get the answer for a differential equation in terms of HypergeometricU, is there a way to convert that expression so that it uses Hypergeometric1F1 instead (and Gamma)?

I'm thinking about this well-known (Kummer) differential equation:

DSolve[x y''[x] + (b - x) y'[x] - a y[x] == 0, y[x], x]

Which Mathematica solves,

{{y[x] -> C[1] HypergeometricU[a, b, x] + C[2] LaguerreL[-a, -1 + b, x]}}

But which I'd like to see expressed in terms of Kummer confluent hypergeometric function Hypergeometric1F1.


You could use some of the identities available from the Wolfram Functions site. Either using the built in MathematicalFunctionData or something like my old FunctionsWolfram code. Using the latter, the identities you need are available as the replacement rules
FunctionsWolfram["", RuleForm]
and FunctionsWolfram["", RuleForm]

Using these rules (and assuming nice things about $a$ and $b$) I get

$$c_1 U(a,b,x)+c_2 L_{-a}^{b-1}(x)=\frac{c_2 (b)_{-a} \, _1F_1(a;b;x)}{\Gamma (1-a)}+\frac{c_1 x^{1-b} \Gamma (b-1) \, _1F_1(a-b+1;2-b;x)}{\Gamma (a)}+\frac{c_1 \Gamma (1-b) \, _1F_1(a;b;x)}{\Gamma (a-b+1)}$$

Which is ugly, but you can check that it solves the original DE.

You can also get the same result by just using FullSimplify with the appropriate ComplexityFunction

cf[expr_] := 100 Count[expr,_HypergeometricU|_LaguerreL|_Hypergeometric1F1Regularized,
FullSimplify[DSolveValue[x y''[x]+(b-x) y'[x]-a y[x]==0,y[x],x],ComplexityFunction->cf]

This works completely without the need for explicit rules applied manually or in the TransformationFunction option. This is probably the better method!

| improve this answer | |
  • $\begingroup$ It's nice to see you posting again, Simon. :-) $\endgroup$ – Mr.Wizard Jun 11 '17 at 13:20
  • $\begingroup$ @Mr.Wizard - Thanks! It's nice to see you're still here and that the site is going well. But it's just a little procrastination... I barely use Mathematica at the moment, so don't have much reason to visit the site. $\endgroup$ – Simon Jun 11 '17 at 13:26
  • $\begingroup$ Fair enough; life moves on. I hope things are well with you. $\endgroup$ – Mr.Wizard Jun 11 '17 at 13:27
  • $\begingroup$ Thanks Simon, that's what I was looking for. $\endgroup$ – Frank Jun 11 '17 at 15:25

Here is a slightly indirect method using MeijerGReduce[]:

MeijerGReduce[DSolveValue[x y''[x] + (b - x) y'[x] - a y[x] == 0, y[x], x], x] // Activate
   (C[2] Gamma[-a + b] Hypergeometric1F1Regularized[a, b, x])/Gamma[1 - a] +
   C[1] HypergeometricU[a, b, x]

   (C[2] Gamma[-a + b] Hypergeometric1F1[a, b, x])/(Gamma[1 - a] Gamma[b]) +
   C[1] HypergeometricU[a, b, x]
| improve this answer | |

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.