Using this code in Spyder 4.2.5 with IPython 8.2.0:
from sympy import init_printing, symbols
from sympy import sqrt, diff
init_printing()
x = symbols('x')
g = 1 - x
u = sqrt(g)
h = 1 + x
v = sqrt(h)
y = u / v
y_d = diff(y)
print(y_d) # <--- prints text mode in IPython console
display(y_d) # <--- outputs a picture in Plots
I'd like to print the symbolic output on the IPython console. I tried:
printbut it outputs a text.displaybut while it outputs a symbolic output, this output goes to thePlottab.
So I'm looking for a combination of the two. A symbolic output can be displayed in the console, as visible on the picture, by typing y_d at the console prompt. What is the equivalent Python instruction?
