Ask Your Question
1

How can one use maxima kummer confluent functions in sage

asked 2012-02-21 05:20:27 +0200

god.one gravatar image

updated 2024-04-20 08:07:55 +0200

FrédéricC gravatar image

Hi, here is my piece of code

var('x,m')
assume(m, 'integer')
y = function('y', x)
desolve(diff(y,x,2) + 2*x*diff(y,x) - 4*m*y, y,contrib_ode=true,ivar=x)

which yields

[y(x) == k1*kummer_m(-m, 1/2, -x^2) + k2*kummer_u(-m, 1/2, -x^2)]

Internet(Wikipedia) sais that the solutions to this differential equation are the Kummer functions or Confluent_hypergeometric_functions. I now want to know how I can use these functions in sage since they must be defined in maxima.

Thanks in advance

edit retag flag offensive close merge delete

Comments

@kcrisman Can you tell me what you did change in my question?

god.one gravatar imagegod.one ( 2012-02-22 01:28:34 +0200 )edit

I'm not even sure! You can click "edit" to see the previous versions, but it doesn't give you a thing that shows what has *changed*.

kcrisman gravatar imagekcrisman ( 2012-02-22 12:48:53 +0200 )edit
kcrisman gravatar imagekcrisman ( 2012-02-22 12:50:37 +0200 )edit

Okay, they followed up. If you click on the hyperlink where it says "updated Feb 21", you can see that I added "kummer confluent " to the title of the post. Very hard to find...

kcrisman gravatar imagekcrisman ( 2012-02-27 13:25:28 +0200 )edit

Good, very good indeed. Thanks for the info and the effort.

god.one gravatar imagegod.one ( 2012-02-28 03:59:17 +0200 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2012-02-21 09:09:48 +0200

kcrisman gravatar image

The short answer is "we don't have this yet".

The long answer is that we have the kummer_u function implemented (search for hypergeometric_U), but not the kummer_m function in question, and the former only as a numerical function.

You can always access Maxima stuff in a roundabout way, though I couldn't do more than

sage: maxima_calculus('load(contrib_ode)')
\"/Users/.../sage-4.8/local/share/maxima/5.23.2/share/contrib/diffequations/contrib_ode.mac\"
sage: maxima_calculus('kummer_m(-1,1/2,-1)')
kummer_m(-1,1/2,-1)

Note that

The only use of this function is in solutions of ODEs returned by odelin and contrib_ode. The definition and use of this function may change in future releases of Maxima.

and I couldn't get it to evaluate numerically, though maybe it does.

Also, mpmath has both solutions so we could easily implement this symbolically in Sage. I've updated the Trac wiki about this, though my guess is that we will focus first on getting some of the more well-known special functions more fully supported in Sage. You can get the numerics now by doing

sage: mpmath.hyp1f1(2,-1/3,3.25)
mpf('-2815.9568569248172')

Finally, if you want to make your own symbolic function now for this, you can follow some of the examples like our new beta function, which has positive review, and it would be possible to just add your own custom code for this by cutting and pasting.

edit flag offensive delete link more

Comments

Thank you for the fast answer.

god.one gravatar imagegod.one ( 2012-02-22 01:26:47 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-02-21 05:20:27 +0200

Seen: 1,864 times

Last updated: Feb 21 '12