#16671: implement harmonic number function H(n,m)
-------------------------------------+-------------------------------------
Reporter: rws | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: symbolics | Resolution:
Keywords: special, log | Merged in:
Authors: Ralf Stephan | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/rws/implement_harmonic_number_function_h_n_m_|
e263ac41caa14a9ba4b537f0f5091cf012d64c3b
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nbruin):
Ouch, given what we've just run into on #16697 with derivatives, our
`_maxima_init_evaled_` hack for swapping arguments would fail in the
presence of derivatives:
{{{
maxima_calculus(harmonic_number(x,y).diff(x))
}}}
Should we disallow differentiating harmonic numbers? Otherwise I think we
need to rewrite how differential operators get translated. Currently,
given:
{{{
D[0,1,2](f)(u,v,w)
}}}
gets translated basically to
{{{
"diff("+"f"+"(u,v,w)"+",u,1,v,1,w,1)"
}}}
Instead, we could make the *expression* f(u,v,w) and convert that to a
maxima string *as a whole* and compose that with the rest. Then we WOULD
be going through `_maxima_init_evaled_` etc. There are situations where
this is a little more complicated: when "u,v,w" are not pure, distinct,
variables, then sage needs to substitute temporary place holder variables
in order to express the `D[0,1,2]` operator in Leibnitz notation. (and
then, after differentiation, substitute the values). Example:
{{{
sage: function('f')
sage: diff( f(x+1),x)._maxima_init_()
"at(diff(''f(t0), t0, 1), [t0 = x + 1])"
sage: maxima_calculus(diff( f(x+1),x))
?%at('diff(f(t0),t0,1),[t0=x+1])
}}}
Presently, those temporary variables `t0` do not live in Sage at all. With
this change, we would have to instantiate them as symbolic variables in
sage to get them converted. (I have checked before, and the `at`
substitutions in maxima happen simultaneously, so symbol clashes shouldn't
be an issue, other than the possibility of assumptions interfering)
--
Ticket URL: <http://trac.sagemath.org/ticket/16671#comment:21>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.