Mathematica or (preferably) maxima display exanded form

In summary, the conversation is about finding a way to display the less factored form of an expression involving matrices for geometrical optics. The speaker is having trouble with their answers appearing "ugly" and believes that in some cases, the fully expanded form may be neater. They suggest manually deciding what to factor out, but later realize they can use the command "expand(A)".
  • #1
richyw
180
0
Is it possible to get either one to display the less factored form of an expression? what I am doing is multiplying matrices together for geometrical optics but my answers keep coming out really ugly. For example I have

[tex]d-d\left(\frac{2d}{r}-1\right)[/tex] I don't think a person would ever write it like that. This is not a bad example but in some cases its doing just really ugly things where the neatest form is (at least close to) the fully expanded form. I'd rather see my answer expanded and then manually make the decision on what to factor out if that makes any sense?

thanks!
 
Physics news on Phys.org
  • #2
nevermind, I figured it out. I typed "expand(A)". who would have thunk?
 

1. What is Mathematica?

Mathematica is a computational software program used for mathematical and scientific calculations, data analysis, and visualization. It is also commonly used for creating simulations and developing algorithms.

2. What is Maxima?

Maxima is a computer algebra system (CAS) used for symbolic mathematical calculations. It is an open-source software and is often used for solving complex equations, differentiation, integration, and other mathematical operations.

3. How do I display expanded form in Mathematica or Maxima?

To display expanded form in Mathematica, you can use the Expand command. For example, if you have the expression (x+y)^2, you can use the command Expand[(x+y)^2] to display the expanded form x^2+2xy+y^2. In Maxima, you can use the command expand() to achieve the same result.

4. Can Mathematica or Maxima perform calculations with variables?

Yes, both Mathematica and Maxima are designed to handle variables in calculations. You can define variables using the "=" symbol and perform operations with them. For example, you can define x=2 and y=3, and then use the command Expand[(x+y)^2] to display the expanded form 25.

5. Is there a difference between Mathematica and Maxima?

While both Mathematica and Maxima are used for mathematical calculations, they have some differences. Mathematica has a user-friendly interface and offers a wide range of functions and features, making it suitable for beginners and advanced users. Maxima, on the other hand, has a command-line interface and is more focused on symbolic mathematical operations.

Similar threads

  • Cosmology
Replies
5
Views
1K
  • Biology and Chemistry Homework Help
Replies
1
Views
626
  • Calculus and Beyond Homework Help
Replies
6
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Introductory Physics Homework Help
Replies
16
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
17
Views
45K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
Replies
3
Views
795
Replies
6
Views
1K
  • Beyond the Standard Models
Replies
2
Views
2K
Back
Top