On Saturday, May 4, 2013 6:46:40 PM UTC-7, nonlinear wrote:
>
> How do I convert g to a symbolic form where dx, dy, and dz are also 
> symbolic variables? I need to assign values to all variables via a for 
> loop.  Also, is it possible for g to be a 3x3 symbolic matrix?  Thanks 
> much, mahlon
>
If you read the documentation of DifferentialForms you see examples that 
g[0],g[1] etc. allow you to fetch the coefficients in front of the forms. 
Once you can do that you can pick apart and reassemble your one-forms in 
whatever way you see fit:
 
sage: var('dx,dy,dz')
(dx, dy, dz)
sage: L=[dx,dy,dz]
sage: sum(g[i]*L[i] for i in range(3))
2*dx*x + dz*cos(z) + dy
 
(this last expression is now just a symbolic expression)

If you want to put these components in a matrix you can do that as well.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to