Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168756
Image: ubuntu2004
x2 = vector([-574.9,0.0,1544.8])
x2
(-574.900000000000, 0.000000000000000, 1544.80000000000)
x1 = vector([-799.8,0.0,1980.0])
L=x2-x1
L
(224.900000000000, 0.000000000000000, -435.200000000000)
L_mag = sqrt(L.dot(L))
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/sage/sagenb/sage_notebook/worksheets/crmccreary/0/code/6.py", line 6, in <module> exec compile(ur'L_mag = sqrt(L.dot(L))' + '\n', '', 'single') File "", line 1, in <module> AttributeError: 'sage.modules.free_module_element.FreeModuleElement' object has no attribute 'dot'
L_mag = sqrt(L.dot_product(L))
L_mag
489.876566085785
u1 = vector([7.47,0.0,-0.6])
u2 = vector([5.45,0.0,-1.22])
DeltaU = u2 - u1
Lprime_mag = sqrt(L.dot_product(L) + 2*L.dot_product(DeltaU) + DeltaU.dot_product(DeltaU))
Lprime_mag
489.504409377485
L_mag-Lprime_mag
0.372156708299940