ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 12 Jul 2020 10:21:08 +0200substitute complex number form in a functionhttps://ask.sagemath.org/question/52435/substitute-complex-number-form-in-a-function/Hi
how can i do so that there is no more $x_0$ nor $y_0$ in f
but that $ f (z, \bar z)$ , with $ z=x_0+y_0*I$?
var('Z,z,x_0,y_0,r,rho,theta')
assume(Z,'complex') ;assume(z,'complex')
assume(x_0,'real') ;assume(y_0,'real')
Zr(x_0,y_0,r) = -sqrt(((r^2/(x_0^2 + y_0^2) - 1)*x_0 + r*sqrt(-r^2/(x_0^2 + y_0^2) + 1)*y_0/sqrt(x_0^2 + y_0^2))^2 + (r*sqrt(-r^2/(x_0^2 + y_0^2) + 1)*x_0/sqrt(x_0^2 + y_0^2) - (r^2/(x_0^2 + y_0^2) - 1)*y_0)^2)*sqrt(-r^2/(x_0^2 + y_0^2) + 1)*x_0/sqrt(x_0^2 + y_0^2) + x_0
Zi(x_0,y_0,r)=-I*sqrt(((r^2/(x_0^2 + y_0^2) - 1)*x_0 + r*sqrt(-r^2/(x_0^2 + y_0^2) + 1)*y_0/sqrt(x_0^2 + y_0^2))^2 + (r*sqrt(-r^2/(x_0^2 + y_0^2) + 1)*x_0/sqrt(x_0^2 + y_0^2) - (r^2/(x_0^2 + y_0^2) - 1)*y_0)^2)*sqrt(-r^2/(x_0^2 + y_0^2) + 1)*y_0/sqrt(x_0^2 + y_0^2) + I*y_0
show("Zr",(Zr).simplify_full())
show("Zi",(Zi).simplify_full())
Zr0=(Zr).subs(x_0 + I*y_0==z,x_0^2+y_0^2==z*(z.conjugate()))
#show("Zr0",(Zr0).simplify_full())
Zi0=(Zi).subs(x_0 + I*y_0==z,x_0^2+y_0^2==z*(z.conjugate()))
#show("Zi0",(Zi0).simplify_full())
f=Zr0+Zi0
show("f : ",f.simplify_full())ortolljSun, 12 Jul 2020 10:21:08 +0200https://ask.sagemath.org/question/52435/Echelon form over finite fieldshttps://ask.sagemath.org/question/48420/echelon-form-over-finite-fields/ I need to get the transformation matrix from echelon form reduction over finite fields but I found in the documentation the following statement:
*The matrix library used for Z/p-matrices does not return the transformation matrix, so the transformation option is ignored.*
More specifically, the call:
> M.echelon_form(transformation=True)
returns only the echelon matrix E but not the transformation matrix T, so that T*M=E, when M is over a finite field.
Is there any workaround? Can I get the transformation matrix over QQ and then reduce it over the finite field?
Any advice is much appreciated.
Thanks,
BoyanBoyanSat, 19 Oct 2019 05:21:24 +0200https://ask.sagemath.org/question/48420/smith form, gaussian integershttps://ask.sagemath.org/question/36958/smith-form-gaussian-integers/ Hello there,
I would like to be able to compute smith normal forms for matrices with coefficients in some specific ring, to be choosen each time.
I am not able to properly creat a matrix in $\mathbb{Z}[\sqrt{-1}]$. For instance
`M=matrix([[2+I,0],[0,1]])` then
`M.change_ring(ZZ[I])`
Would lead to an error. On the ogher hand, `M=matrix([[2+I,0],[0,1]])` followed by `M.smith_form()` would lso lead to an error since this time my matrix has coefficients in `SR`, the symbolic ring, and the `normal_form()`is not implemented.
However,
`A = QQ['x']` #delcaring the ring
`M=matrix(A,[[x-1,0,1],[0,x-2,2],[0,0,x-3]])` # building the matrix
`M.smith_form()`# computing the normal form
Actually works.
JCBRWed, 15 Mar 2017 21:27:39 +0100https://ask.sagemath.org/question/36958/Give a Sage sketch of the solid formed by revolving the region bounded by y=h(x), y=0, x = 2 and x = 7 around the x-axis. Use the disc method.https://ask.sagemath.org/question/36431/give-a-sage-sketch-of-the-solid-formed-by-revolving-the-region-bounded-by-yhx-y0-x-2-and-x-7-around-the-x-axis-use-the-disc-method/the equation is h(x)=e^(cos(x))+1
& how would I find its volume.GabyWed, 01 Feb 2017 23:33:21 +0100https://ask.sagemath.org/question/36431/