The example below works but I would like to do something like fvec=vector([tt*sin(tt),tt*cos(tt),sqrt(tt)]) in stead of fvecx=tt*sin(tt) fvecy=tt*cos(tt) fvecz=sqrt(tt) Is that possible? If yes, how?
Poul Riis from math import * from sympy import * tt=Symbol('tt') fvecx=tt*sin(tt) fvecy=tt*cos(tt) fvecz=sqrt(tt) fvecxlambdified = lambdify(tt, fvecx) fvecylambdified = lambdify(tt, fvecy) fveczlambdified = lambdify(tt, fvecz) fvecxdiff=fvecx.diff(tt) fvecxdifflambdified=lambdify(tt,fvecxdiff) fvecydiff=fvecy.diff(tt) fvecydifflambdified=lambdify(tt,fvecydiff) fveczdiff=fvecz.diff(tt) fveczdifflambdified=lambdify(tt,fveczdiff) print("fx(1)=",fvecxlambdified(1)) print("fy(1)=",fvecylambdified(1)) print("fz(1)=",fveczlambdified(1)) print("fx'(1)=",fvecxdifflambdified(1)) print("fy'(1)=",fvecydifflambdified(1)) print("fz'(1)=",fveczdifflambdified(1)) -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/9050bf01-19e2-423a-8467-f2175e21275f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.