# PART CMD

Jaime shared this idea 6 years ago
Completed

Hi, I want to get the first part of the factorization (x - 3) * (x + 1) -> (x - 3) on row #4 , xCAS have a command called PART, but it seems that it is not available in GG, please GG Development group, add this super important function

Thanks

PART CMD info

CAS VIEW (GG)

1: x^2 = 2*x + 3 -> x^2 = 2*x + 3

2: \$1 - (2x + 3) -> x^(2) - (2 * x) - 3 = 0

3: Factor[LeftSide[\$2]] -> (x - 3) * (x + 1)

4: part( (x - 3) * (x + 1), 1 ) -> (x - 3)

1

You like the Parisse's job within giac, you'll like the Parisse's and other developers job within GeoGebra

Try :

4: Element[\$3,1]

and/or :

4:Element[Factors[LeftSide[\$2]],1,1]

1

Ok, the following sequence of statements, show step by step the solution of a simple list of equations.

In line 10 , how can I get "9=9 -> true" by manipulating the responses of the previous outputs.

Try the following but fail

LeftSide[\$9] ≟ RightSide[\$9]

1. { y = x^2, y = 2*x + 3 } -> { y = x^2, y = 2*x + 3 }
2. Substitute[Element[\$1,2],Element[\$1,1]] -> x^(2) = (2 * x) + 3
3. \$2 - (2x + 3) -> x^(2) - (2 * x) - 3 = 0
4. Factor[LeftSide[\$3]] -> ((x - 3) * (x + 1))
5. {Element[\$4,1] = 0, Element[\$4,2] = 0} -> {x - 3 = 0, x + 1 = 0}
6. {Element[\$5,1] + 3, Element[\$5,2] - 1} -> {x = 3, x = (-1)}
7. Substitute[Element[\$1,1],Element[\$6,1]] -> y=9
8. Substitute[Element[\$1,2],Element[\$6,1]] -> y=9
9. Substitute[Element[\$1,1],{\$8, Element[\$6,1]}] -> 9=9
10. \$9 -> true

1

Hi, I don't understand why

LeftSide[\$9] ≟ RightSide[\$9]

and LeftSide[\$9] ≟ RightSide[\$9]+0

fail while :

LeftSide[\$9]+0 ≟ RightSide[\$9]

and LeftSide[\$9] - RightSide[\$9] ≟ 0

work fine

1

then, Is an interpretation not yet incorporated or bug?

For GG TEAM

To check this type of expression, please include the EvalBoolean command of Xcas

Xcas: CAS view

1: 9=9 returns 9=9

2: evalb(ans(-1) ) returns 1 -> true

full sample

1. x^2 = 2*x + 3 returns x^2=(2*x+3)
2. ans(-1) - (2*x + 3) returns x^2-2*x-3=0
3. factor(ans(-1)) returns (x-3)*(x+1)=0
4. [ part(left(ans(-1)),1)=0, part(left(ans(-1)),2)=0 ] returns [x-3=0,x+1=0]
5. ans(-1)(1)+3, ans(-1)(2)-1 ] returns [x=3,x=-1]
6. subst(y=x^2,ans(-1)(1)) returns y=9
7. subst(y=2*x + 3,ans(-2)(1)) returns y=9
8. subst(y=2*x + 3,[ans(-3)(1),ans(-1)]) returns 9=9
9. evalb(ans(-1)) returns 1 (true)

1

I think this is what you need:

1. \$7==\$8

Please make sure you use the new version (5.0.354.0) which has a couple of related bugs fixed

1

In the version (5.0.354.0) works correctly

1. 9=9 returns 9=9
2. LeftSide[\$1] ≟ RightSide[\$1] true

As an additional idea, please GG TEAM add the ANSWER[row] command as synonymous with the \$row command to make the instruction sequences in the CAS view more understandable

with \$ cmd

1. { y = x^2, y = 2*x + 3 } { y = x^2, y = 2*x + 3 }
2. Substitute[Element[\$1,2],Element[\$1,1]] x^(2) = (2 * x) + 3
3. \$2 - (2x + 3) x^(2) - (2 * x) - 3 = 0
4. Factor[LeftSide[\$3]] ((x - 3) * (x + 1))
5. {Element[\$4,1] = 0, Element[\$4,2] = 0} {x - 3 = 0, x + 1 = 0}
6. {Element[\$5,1] + 3, Element[\$5,2] - 1} {x = 3, x = (-1)}
7. Substitute[Element[\$1,1],Element[\$6,1]] y=9
8. Substitute[Element[\$1,2],Element[\$6,1]] y=9
9. Substitute[Element[\$1,1],{\$8, Element[\$6,1]}] 9=9
10. LeftSide[\$9] ≟ RightSide[\$9] -> true

1. { y = x^2, y = 2*x + 3 } { y = x^2, y = 2*x + 3 }
3. answer[2] - (2x + 3) x^(2) - (2 * x) - 3 = 0
4. Factor[LeftSide[answer[3]]] ((x - 3) * (x + 1))
5. {Element[answer[4],1] = 0, Element[answer[4],2] = 0} {x - 3 = 0, x + 1 = 0}
6. {Element[answer[5],1] + 3, Element[answer[5],2] - 1} {x = 3, x = (-1)}