I think that your code doesn’t do what you think it does. Note for example that your declarations are self-contradicting :
Pasting code; enter '--' alone on the line to stop or use Ctrl-D.
:function("xp yp zp tp f")
:var("x y z t v c")
:--
(xp, yp, zp, tp, f)
(x, y, z, t, v, c)
sage: xp.parent()
<class 'sage.symbolic.function_factory.function_factory.<locals>.NewSymbolicFunction'>
sage: xp = (x - v * t) / sqrt(1 - v^2 / c^2)
sage: xp.parent()
Symbolic Ring
What you intend to do isn’t really clear… Could you try and clear your goals ?
HTH,
What you intend to do isn’t really clear… Could you try and clear your goals ?
Sage has recently acquired a large set of tools relative to manifolds. A look at these tools and related tutorials/references may be in order…
HTH,
--
You received this message because you are subscribed to a topic in the Google Groups "sage-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-support/TDseIA1M7vY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/068e5ac0-1d78-453f-a465-bc84e1d1fc90n%40googlegroups.com.
Probably because “the given second derivative” has a “computed operator”…
BTW :
var("x,y,z,t,v,c")
f=function("f")
xp=(t-v*x)/sqrt(1-v^2/c^2)
yp=y
zp=z
tp=(t-v*x/c^2)/sqrt(1-v^2/c^2)
foo=(sum(map(lambda u:derivative(f(xp,yp,zp,tp),u,2), (x, y, z)))-derivative(f(xp,yp,zp,tp),t,2)/c^2).factor()
view(foo.simplify_full())
does partially what you mean…
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/ee8a8ac7-0505-4b3d-bd57-f4d7f01aa3c6n%40googlegroups.com.
Secondly, what are you trying to collect? The D[0,0] terms or
f(xp, yp, zp, tp), x, 2) which are two different things?
Given
what you are trying to do I guess it is the first one, in which
case you should have tried
sage: term = f(x,y,z,t).derivative(x,2).subs(x=xp,y=yp,z=zp,t=tp)
Is this the same as derivative(f(xp(x, y, z, t), yp(x, y, z, t), zp(x, y, z, t), tp(x, y, z, t)) , x, 2)?