%load_ext py2tex from math import * %%tex a=1.0 b = -1.0 c = -1.0 x_1=(-b+sqrt(b**2-4*a*c))/(2*a) x_2=(-b-sqrt(b**2-4*a*c))/(2*a) varphi = x_1 %texnr x_1_2=x_1+x_2 %texformat %.3e %%tex alpha = pi/3 cos(alpha)**2+sin(alpha)**2 sin(alpha) from unum.units import * %texformat %.3f %%texnr t = 3.0*s a = 4.5*(m/s**2) v_0 = 2*(m/s) %tex x = v_0*t+(a*t**2)/2