Hi.

When we write programs, sometimes we obtain some formulas in real or integer moods.

For instance in Integer mood:

formula with integer coefficients: (1 -2x2+1 x2^2+x1 (-2+4 x2-2 x2^2)+x1^2 (1 -2 x2+1 x2^2)).

When we use FullSimplify , we have :

Input: FullSimplify[(1 -2x2+1 x2^2+x1 (-2+4 x2-2 x2^2)+x1^2 (1 -2 x2+1 x2^2))]

Output: (-1+x1)^2 *(-1+x2)^2 .

It works well here. But when we have the formula by real coefficients and use FullSimplify command:

formula with real coefficients: (1. -2. x2+1. x2^2+x1 (-2.+4. x2-2. x2^2)+x1^2 (1. -2. x2+1. x2^2))

Input: FullSimplify[(1 -2x2+1 x2^2+x1 (-2+4 x2-2 x2^2)+x1^2 (1 -2 x2+1 x2^2))]

Output: 1. +x2 (-2.+1. x2)+x1 (-2.+x2 (4. -2. x2))+x1^2 (1. +x2 (-2.+1. x2)).

We obtain a bad form of formula. How to solve this problem so that we can have the simplest form of a formula by real coefficients?

More Mohsen Keikhaie's questions See All
Similar questions and discussions