leif wrote:
leun...@gene.com wrote:
Q2: I tried to follow the online sage tutorial
(http://www.sagemath.org/doc/tutorial/tour_algebra.html). The session
of using maxima to do laplace transform. I copied the exact command
de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
lde1 = de1.laplace("t","s"); lde1
but it does not work in my 5.1.3 virtual box version. Why is that? See
the attach jpg for the error. I cannot find where is my syntax error.
I tried to define s and t as variable first but it does not help
either. I do not know what syntax error I made....
error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_7.py", line 10, in <module>
exec compile(u'open("__code__.py","w"),write("# -*- coding: utf-8
-*- ...................I skip typing the rest
File "", line 1, in <module>
File "/tmp/tmpQapKht/__code__.py", line 3
del = maxima("2*diff(x(t),t,2)+6*x(t)-2*y(t)")
^
SyntaxError: invalid syntax
Well, 'del' is a Python keyword ("delete"), so renaming the variable to
something else will probably work.
P.S.: In the example you "copied", it's 'de1' (d--e--*one*), not 'del'.
-leif
--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.