M_Tx = piecewise([[[0, l1], M_t], [(l1, l1+l2), 0]])
M_by = piecewise([[[0, l1], -A_z * x], [(l1, l1+l2), -B_z * (l1+l2-x)]])
M_bz = piecewise([[[0, l1], A_y * x], [(l1, l1+l2), B_y * (l1+l2-x)]])
N_x = piecewise([[[0, l1], -A_x], [(l1, l1+l2), 0]])
Q_y = piecewise([[[0, l1], -A_y], [(l1, l1+l2), B_y]])
Q_z = piecewise([[[0, l1], -A_z], [(l1, l1+l2), B_z]])
M_vec(x) = vector([M_Tx, M_by, M_bz]).column()
show(r"$\vec M=\left(\begin{array}{c} M_{Tx} \\ M_{by} \\ M_{bz} \end{array}\right)=$", M_vec(x = l1).n(digits=4), "kN $=$", round(M_vec(x = l1).norm(), 4), "kN")
Error in lines 27-27
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 996, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "sage/structure/element.pyx", line 838, in sage.structure.element.Element.n (/ext/sage/sage-8.0/src/build/cythonized/sage/structure/element.c:7961)
return self.numerical_approx(prec, digits, algorithm)
File "sage/symbolic/expression.pyx", line 5718, in sage.symbolic.expression.Expression.numerical_approx (/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/expression.cpp:35056)
x = x._convert(kwds)
File "sage/symbolic/expression.pyx", line 1261, in sage.symbolic.expression.Expression._convert (/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/expression.cpp:10465)
cdef GEx res = self._gobj.evalf(0, kwds)
File "sage/libs/pynac/pynac.pyx", line 1343, in sage.libs.pynac.pynac.py_float (/ext/sage/sage-8.0/src/build/cythonized/sage/libs/pynac/pynac.cpp:15280)
return p.complex_field()(n)
File "sage/structure/category_object.pyx", line 823, in sage.structure.category_object.CategoryObject.__getattr__ (/ext/sage/sage-8.0/src/build/cythonized/sage/structure/category_object.c:7662)
return self.getattr_from_category(name)
File "sage/structure/category_object.pyx", line 838, in sage.structure.category_object.CategoryObject.getattr_from_category (/ext/sage/sage-8.0/src/build/cythonized/sage/structure/category_object.c:7826)
attr = getattr_from_other_class(self, cls, name)
File "sage/structure/misc.pyx", line 294, in sage.structure.misc.getattr_from_other_class (/ext/sage/sage-8.0/src/build/cythonized/sage/structure/misc.c:1866)
raise dummy_attribute_error
AttributeError: 'ComplexField_class_with_category' object has no attribute 'complex_field'
M_vec(x) = vector([M_Tx(x), M_by(x), M_bz(x)]).column()
M_vec(x = l1)
M_vec_l1 = vector([M_Tx(l1), M_by(x=l1), M_bz(x=l1)]).column()
M_vec_l1
[ piecewise(x|-->238.732400000000 on [0, 200], x|-->0 on (200, 450); x)]
[ piecewise(x|-->-4.27033333333333*x on [0, 200], x|-->3.41626666666667*x - 1537.32000000000 on (200, 450); x)]
[piecewise(x|-->-0.983311111111111*x on [0, 200], x|-->1.07628888888889*x - 484.330000000000 on (200, 450); x)]
[ 238.732400000000]
[-854.066666666667]
[-196.662222222222]
Is it that piecewise functions are not yet fully fledged out,