AlgebraicNumber to simple number in Mathematica

  • Mathematica
  • Thread starter zplot
  • Start date
  • Tags
    Mathematica
In summary: Bill.In summary, the conversation is about a user trying to get "i/4" as output from some matrix operations, but instead getting "AlgebraicNumber[-4 I, {0, -(1/16)}]". The user has tried using "N" and "Im" but has not been successful. They are seeking help from others to find a solution.
  • #1
zplot
17
0
Hello,

From some matrix operations I get "AlgebraicNumber[-4 I, {0, -(1/16)}]" as output.

I need to get i/4 and I don't know how. If I write "N[AlgebraicNumber[-4 I, {0, -(1/16)}]]",
I get 0. + 0.25 i but it is not what I want neither. I would like to get just i/4 as output.

Can anybody help?
Thank you in advance.
 
Physics news on Phys.org
  • #2
zplot said:
From some matrix operations I get "AlgebraicNumber[-4 I, {0, -(1/16)}]" as output.

I need to get i/4 and I don't know how.

That seems odd because this
http://reference.wolfram.com/mathematica/ref/AlgebraicNumber.html
under More Information says
"AlgebraicNumber objects representing integers or rational numbers are automatically reduced to explicit integer or rational form."
Perhaps that implies that complex are not automatically reduced to explicit form.

What do you get with Im[AlgebraicNumber[-4 I, {0, -(1/16)}]]

What do you get with Simplify[AlgebraicNumber[-4 I, {0, -(1/16)}]]
 
  • #3
Thank you Bill.

With
Im[AlgebraicNumber[-4 I, {0, -(1/16)}]]
I get
Im[AlgebraicNumber[-4 I, {0, -(1/16)}]]
and with
Simplify[AlgebraicNumber[-4 I, {0, -(1/16)}]]
I get
AlgebraicNumber[-4 I, {0, -(1/16)}]

so no solution yet.

Any other idea?

Thanks a lot.
 
  • #4
Unfortunately I can't test that for you at the moment and that severely restricts what I can find.

You might post it here
http://forums.wolfram.com/student-support/discussions/4/

This is very very odd and looks like a limitation that should not be there.
The URL I posted previously seemed like it said I am should have worked.
 
  • #5
Thank you
 

1. How do I convert an algebraic number to a simple number in Mathematica?

To convert an algebraic number to a simple number in Mathematica, you can use the ToRadicals function. This will convert the algebraic number into its simplest form, which may include irrational numbers.

2. Can I convert a complex algebraic number to a simple number in Mathematica?

Yes, you can convert a complex algebraic number to a simple number in Mathematica using the ToRadicals function. However, the result may still include complex numbers if the original algebraic number was complex.

3. What is the difference between an algebraic number and a simple number in Mathematica?

An algebraic number is a number that can be expressed as the root of a polynomial equation with integer coefficients. A simple number, on the other hand, is a number that can be written without any square roots or other mathematical symbols. In Mathematica, simple numbers are often referred to as "explicit" numbers.

4. Can I convert an algebraic number to a decimal approximation in Mathematica?

Yes, you can use the N function in Mathematica to convert an algebraic number to a decimal approximation. This will give you a numerical value for the algebraic number, but it may not be exact due to rounding errors.

5. How can I check if a number in Mathematica is algebraic or simple?

You can use the Element function in Mathematica to check if a number is an element of the algebraic numbers or the simple numbers. For example, Element[Sqrt[2], AlgebraicNumbers] will return True while Element[Pi, SimpleNumbers] will return False.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
399
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
246
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
887
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
Back
Top