def differentiate(self, *, equation : str):
'''
Differentiate an equation
with respect to x (dx)
'''
x = sympy.symbols('x')
try:
await self.bot.embed_reply("`{}`".format(sympy.diff(equation.strip('`'), x)), title = "Derivative of {}".format(equation))
except Exception as e:
await self.bot.embed_reply(py_code_block.format("{}: {}".format(type(e).__name__, e)), title = "Error")
评论列表
文章目录