Hello. Matlab's hypergeom() function seems to have some problems. It has difficulty computing hypergeom(a1, [b1 b2], z) for some {a1, b1, b2, z}; for instance, hypergeom(67/2, [69/2 67], -(15^2)) and hypergeom(16.5, [17.5 1530], -12500). I've tried using a symbolic taylor expansion (which involves using the built-in pochhammer function), but this doesn't always solve the problem. If it ever does give a result, the result is not always accurate; for example a=6.5, b=[13 7.5 ], z=-10000. Please help. Thanks. Below is my code
function F_12 = hypergeom1F2(a,b1,b2,z)
syms k
F_12=symsum((z^k)/sym('k!')*(pochhammer(a,k)/pochhammer(b1,k)/pochhammer(b2,k)), k, 0, Inf);

댓글 수: 2

Walter Roberson
Walter Roberson 2015년 5월 26일
That is an appropriate symbolic formula for hypergeom([a],[b1,b2],z). Keep in mind though that symsum is going to recognize it as that and is going to convert it to a hypergeom() call, so if the hypergeom() call itself is getting the wrong answer, the symsum will get the wrong answer.
I do not have the MATLAB Symbolic Toolbox to test with. What results is it giving for the hypergeom calls?
Walter Roberson
Walter Roberson 2015년 5월 26일
You might be interested in this File Exchange contribution

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

태그

질문:

2015년 5월 26일

댓글:

2015년 5월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by