Page 1 sur 1

factoring monomials

Publié : ven. oct. 11, 2024 2:12 am
par compsystems
Hello

factors cmd seems to work only with polynomials, that is, with more than 2 monomials.

for math classes it is important to show operations with monomials.

can the functionality of the factors be extended?

factor(6*x^2) -> (6) * (x*x)

there can be a second argument that forces to show in products and/or powers

factor(6*x^2, '^') -> (2*3^2) * (x*x)

factor(6*x^2, '*') -> (2*3*3) * (x*x)

Re: factoring monomials

Publié : lun. oct. 14, 2024 11:55 am
par parisse
Monomials are already factored, they should stay like they are after factor.
If you are looking to expand x^... as a product for teaching, then Xcas is probably too advanced. Or you have to write your own command to do that.

Re: factoring monomials

Publié : lun. oct. 14, 2024 3:36 pm
par compsystems
It is true that many monomials are already factored into their simplest terms, but the function can be extended to more extensive factorization, simply by adding a parameter.

I think that Xcas is an educational project and not an industrial one, I imagine that these suggestions that I make are easy to incorporate into the source code.

I could program them externally, but when starting the execution of Xcas I would have to load libraries and that is what the students would have to do at home and for an initial course it would demotivate them.

Although it may seem contradictory, most engineering students do not like mathematics, I try to accompany the class with software to motivate them and show them that if a machine can do it, why not us who program them?

I would like Xcas functions to perform operations closer to the manual process. I would like more.

Re: factoring monomials

Publié : lun. oct. 14, 2024 4:56 pm
par parisse
What is the level you are teaching?
Understanding that x^2 is the same as x*x is something that should be taught to early teenagers, that should be ok after 15 years old and that should be straightforward to engeneering students.

Re: factoring monomials

Publié : lun. oct. 14, 2024 7:13 pm
par compsystems
Extended factorization would serve to visualize different concepts, for example, in the topic of factorization, it is important, for example, to show that different representations of products of factors, to make simplifications in fractions by grouping of factors, of powers, basis of simplification by GCD


(x^4)/(x^3) => (x*x*x*x)/(x*x*x) => x

factor(x^4, '*') => x*x*x*x // '*' => Extended factorization
factor(x^3, '*') => x*x*x

factor(x^4, '^') => (x^2*x^2)
factor(x^3, '^') => (x^2*x)

factor(x^4, '*')/factor(x^4, '*') => (x*x*x*x)/(x*x*x) => (x/x) * (x/x) * (x/x) * x => 1*1*1*x => x
factor(x^3, '^')/factor(x^2, '^') => (x^2*x^2)/(x^2*x) => (x^2/x^2) * (x^2/x) => 1*x => x

gcd(x^4,x^3) => x^2

(x^4/x^2) ÷ (x^3/x^2) => x^2/x => x

I'm looking for something similar, but with symbolic expressions.

ifactors(18,'*') [Enter] Returns 2*3*3
ifactor(18) [Enter] Returns 2*3^2