create a random expression similar to the one given
GenerateSimilar( expr )
integer, float, polynomial, or general expression
The GenerateSimilar command produces a new expression that is similar to the given expression expr. The structure and variables in the original expression are preserved, but new constants and coefficients replace the initial ones. The random floating-point numbers and integers in the new expression are the same magnitude as in the original.
Trig functions are not always preserved: sin and cos can switch, sec and csc can switch, and tan and cot can switch. The inverse trig functions are paired and can switch in the same way.
Inputting a polynomial that can be factored and has integer roots returns a polynomial of the same order that can be factored and has integer roots.
If a polynomial is input without integer roots then a polynomial up to the same degree as the input polynomial with random coefficients up to the same order of magnitude as the largest integer in the input expression is returned.
Numerators and denominators of input rational expressions are replaced in the same way as polynomials with the additional feature that if the numerator and denominator have a common root then the returned rational expression also has a shared root in its numerator and denominator.
If a singular square matrix is input then a singular square matrix is output. Inputting upper triangular, lower triangular, diagonal, symmetric, hermitian, or antisymmetric matrices returns the same type. Otherwise the elements of the output matrix are generated individually from each element of the input matrix.
Rational and integer exponents of functions or expressions (other than exponential functions) are preserved.
If an integral is passed into the function then the resultant integral will be solvable using the same integration technique (u substitution, partial fractions, trig substitution, integration by parts).
If an equation is passed into GenerateSimilar then a similar equation is output: radical equations produce radical equations, polynomial equations produce polynomial equations, logarithmic equations produce logarithmic equations, and exponential equations produce exponential equations.
Sums over values of binomial or poisson probability distributions produce sums over values of binomial or poisson probability distributions respectively.
Expectation value of a function over a binomial or poisson probability distribution returns an expectation value of a similar function over a binomial or poisson probability distribution respectively.
Integrals over values of exponential or gaussian probability distributions return integrals over values of exponential or gaussian probability distributions respectively.
Expectation value of a function over an exponential or gaussian probability distribution returns an expectation value of a similar function over an exponential or gaussian probability distribution respectively.
Parametrizations of circles, ellipses and cycloids return parametrizations of circles, ellipses and cycloids.
Differential equations should not be input into GenerateSimilar; for differential equations use GenerateSimilarODE.
The cube on the sin function is preserved.
Inputting a factorable polynomial returns a factorable polynomial..
A polynomial without integer roots returns a polynomial with random coefficients
Factorable numerators and denominators remain factorable and if a factor is shared between the numerator and denominator then the resultant rational function will share a factor between numerator and denominator.
Singular matrices return singular matrices.