login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Square root

fricas
ksqrt:=kernels(sqrt(x))(1)

\label{eq1}\sqrt{x}(1)
Type: Kernel(Expression(Integer))
fricas
name(ksqrt)

\label{eq2}nthRoot(2)
Type: Symbol
fricas
argument(ksqrt)

\label{eq3}\left[ x , \: 2 \right](3)
Type: List(Expression(Integer))

fricas
)di op nthRoot
There is one exposed function called nthRoot : [1] (D,Integer) -> D from D if D has RADCAT
There is one unexposed function called nthRoot : [1] (Factored(D4),NonNegativeInteger) -> Record(exponent: NonNegativeInteger,coef: D4,radicand: List(D4)) from FactoredFunctions(D4) if D4 has INTDOM

Positive nthRoot is primmitive

fricas
nthRoot(x,3)

\label{eq4}\root{3}\of{x}(4)
Type: Expression(Integer)
fricas
nthRoot(x,2)

\label{eq5}\sqrt{x}(5)
Type: Expression(Integer)
fricas
nthRoot(x,1)

\label{eq6}x(6)
Type: Expression(Integer)

Strange library message

fricas
nthRoot(x,0)
>> Error detected within library code: not invertible

Negative nthRoot is not primitive

fricas
nthRoot(x,-1)

\label{eq7}1 \over x(7)
Type: Expression(Integer)
fricas
nthRoot(x,-2)

\label{eq8}1 \over{\sqrt{x}}(8)
Type: Expression(Integer)
fricas
nthRoot(x,-3)

\label{eq9}1 \over{\root{3}\of{x}}(9)
Type: Expression(Integer)
fricas
msqrt:=kernels(nthRoot(x,-3))(1)

\label{eq10}\root{3}\of{x}(10)
Type: Kernel(Expression(Integer))
fricas
name(msqrt)

\label{eq11}nthRoot(11)
Type: Symbol
fricas
argument(msqrt)

\label{eq12}\left[ x , \: 3 \right](12)
Type: List(Expression(Integer))

Powers are roots

fricas
psqrt:=kernels(x^(1/2))(1)

\label{eq13}\sqrt{x}(13)
Type: Kernel(Expression(Integer))
fricas
name(psqrt)

\label{eq14}nthRoot(14)
Type: Symbol
fricas
argument(psqrt)

\label{eq15}\left[ x , \: 2 \right](15)
Type: List(Expression(Integer))

Complex roots

fricas
complexNumeric(nthRoot(complex(-1,0),2))

\label{eq16}i(16)
Type: Complex(Float)
fricas
nthRoot(%,2)

\label{eq17}{0.7071067811 \<u> 865475244}+{{0.7071067811 \</u> 865475244}\  i}(17)
Type: Complex(Float)
fricas
recip %

\label{eq18}{0.7071067811 \<u> 865475244}-{{0.7071067811 \</u> 865475244}\  i}(18)
Type: Union(Complex(Float),...)
fricas
complexNumeric(nthRoot(complex(-1,0),3))

\label{eq19}{0.5}+{{0.8660254037 \<u> 8443864676}\  i}(19)
Type: Complex(Float)
fricas
recip %

\label{eq20}{0.5}-{{0.8660254037 \<u> 8443864676}\  i}(20)
Type: Union(Complex(Float),...)
fricas
complexNumeric(nthRoot(complex(-1,0),4))

\label{eq21}{0.7071067811 \<u> 865475244}+{{0.7071067811 \</u> 865475244}\  i}(21)
Type: Complex(Float)
fricas
conjugate %

\label{eq22}{0.7071067811 \<u> 865475244}-{{0.7071067811 \</u> 865475244}\  i}(22)
Type: Complex(Float)




  Subject:   Be Bold !!
  ( 13 subscribers )  
Please rate this page: