︠fe19d8d3-0dff-4901-9212-cb0d4d943f0ds︠
def argscript(self, *args): return "%s_{%s}"%(self.name(),','.join(map(repr, args)))
f=function('f', print_latex_func=argscript)
x,y=var('x,y')
show(f(x,y))
g=function('g', latex_name="\\mathcal{G}")
show(g(x,y))
︡adb449df-1fe6-4f75-bb56-dd39e2130fc7︡{"html":"
$\\displaystyle f_{x,y}$
"}︡{"html":"$\\displaystyle \\mathcal{G}\\left(x, y\\right)$
"}︡
︠8437662e-3451-441f-9d73-9719c19fd17es︠
# works
show(f(x,y).collect(x))
show(g(x,y).collect(x))
show(f(x,y).collect_common_factors())
show(g(x,y).collect_common_factors())
show(f(x,y).expand())
show(g(x,y).expand())
show(f(x,y).expand_rational())
show(g(x,y).expand_rational())
show(f(x,y).normalize())
show(g(x,y).normalize())
show(f(x,y).rational_expand())
show(f(x,y).simplify_hypergeometric())
show(g(x,y).simplify_hypergeometric())
show(f(x,y).simplify_rectform())
show(g(x,y).simplify_rectform())
︡f4b35865-9857-4580-b011-d165c7477540︡{"html":"$\\displaystyle f_{x,y}$
"}︡{"html":"$\\displaystyle \\mathcal{G}\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f_{x,y}$
"}︡{"html":"$\\displaystyle \\mathcal{G}\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f_{x,y}$
"}︡{"html":"$\\displaystyle \\mathcal{G}\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f_{x,y}$
"}︡{"html":"$\\displaystyle \\mathcal{G}\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f_{x,y}$
"}︡{"html":"$\\displaystyle \\mathcal{G}\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f_{x,y}$
"}︡{"html":"$\\displaystyle f_{x,y}$
"}︡{"html":"$\\displaystyle \\mathcal{G}\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f_{x,y}$
"}︡{"html":"$\\displaystyle \\mathcal{G}\\left(x, y\\right)$
"}︡
︠f7372723-a6de-48c7-85dd-2447c73b6332s︠
# fail
show(f(x,y).canonicalize_radical())
show(g(x,y).canonicalize_radical())
show(f(x,y).combine())
show(g(x,y).combine())
show(f(x,y).expand_log())
show(g(x,y).expand_log())
show(f(x,y).expand_sum())
show(g(x,y).expand_sum())
show(f(x,y).expand_trig())
show(g(x,y).expand_trig())
show(f(x,y).factor())
show(g(x,y).factor())
show(f(x,y).factorial_simplify())
show(g(x,y).factorial_simplify())
show(f(x,y).full_simplify())
show(g(x,y).full_simplify())
show(f(x,y).log_expand())
show(g(x,y).log_expand())
show(f(x,y).log_simplify())
show(g(x,y).log_simplify())
show(f(x,y).rational_simplify())
show(g(x,y).rational_simplify())
show(f(x,y).reduce_trig())
show(g(x,y).reduce_trig())
show(f(x,y).simplify())
show(g(x,y).simplify())
show(f(x,y).simplify_factorial())
show(g(x,y).simplify_factorial())
show(f(x,y).simplify_full())
show(g(x,y).simplify_full())
show(f(x,y).simplify_log())
show(g(x,y).simplify_log())
show(f(x,y).simplify_rational())
show(g(x,y).simplify_rational())
show(f(x,y).simplify_real())
show(g(x,y).simplify_real())
show(f(x,y).simplify_trig())
show(g(x,y).simplify_trig())
show(f(x,y).trig_expand())
show(g(x,y).trig_expand())
show(f(x,y).trig_reduce())
show(g(x,y).trig_reduce())
show(f(x,y).trig_simplify())
show(g(x,y).trig_simplify())
︡15406936-9cbb-4c7b-9414-3dccff8cd999︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle f\\left(x, y\\right)$
"}︡{"html":"$\\displaystyle g\\left(x, y\\right)$
"}︡
︠78112978-75bc-477a-a508-adaabaf59fe5︠