Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Another question about Factor
Replies: 13   Last Post: Nov 23, 2012 6:11 PM

 Messages: [ Previous | Next ]
 Nasser Abbasi Posts: 6,494 Registered: 2/7/05
Re: Another question about Factor
Posted: Nov 22, 2012 7:02 PM

On 11/22/2012 5:31 PM, Tang Laoya wrote:
> Dear Dr. M. Abbasi,

Please just call me Nasser. I am not a Dr, just a busy student.

>
> Thank you very much for your kindly reply. I wish mathematica
>give me an express which I can code by Fortran with smallest
>number of floating operations. For example, if I have:
>
> bb1 = -Det[{{1, 1, 1}, {y2, y3, y4}, {z2, z3, z4}}];
>
> the result by mathematica is:
> y3 z2 - y4 z2 - y2 z3 + y4 z3 + y2 z4 - y3 z4
>
> I wish it output the result like this:
> z2 (y3-y4) - z3 (y2-y4) + z4 (y2-y3)
>
>
> What should I do?
>

Try

------------------------
HornerForm[-Det[{{1, 1, 1}, {y2, y3, y4}, {z2, z3, z4}}], {z2, z3, z4}]
------------------------

(y3 - y4)*z2 + (-y2 + y4)*z3 + (y2 - y3)*z4

--Nasser

Date Subject Author
11/22/12 Tang Laoya
11/22/12 Nasser Abbasi
11/22/12 Nasser Abbasi
11/22/12 Tang Laoya
11/22/12 Nasser Abbasi
11/22/12 Tang Laoya
11/22/12 Nasser Abbasi
11/22/12 Tang Laoya
11/22/12 Tang Laoya
11/22/12 Nasser Abbasi
11/22/12 Tang Laoya
11/23/12 Peter Pein
11/23/12 Tang Laoya
11/23/12 Richard Fateman