login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for ElementaryFunctionStructurePackage example revision 1 of 1

1
Editor: test1
Time: 2019/05/10 17:50:54 GMT+0
Note:

changed:
-
In FriCAS expression are represented as rational functions in kernels.
exp(2*x) and exp(x) are different kernels, so
\begin{axiom}
exp(2*x) - exp(x)^2
\end{axiom}
gives nonzero result.  To recognize that this is really 0 we need
to perform extra computation.  In this case normalize is enough
\begin{axiom}
normalize(exp(2*x) - exp(x)^2)
\end{axiom}
In general, to express function in terms of algebraically independent kernels
one can use rischNormalize.  It takes two arguments, the first argument is list
of expressions to analize, the second is list of variables
(rischNormalize treats variables and constants in slightly different way).
For example:
\begin{axiom}
rischNormalize([exp(2*x), exp(x)],[x])
\end{axiom}
The result has three parts.  First is list of rewritten expression.  Second is list
of kernels that were rewritten.  The third is list of values assigned to kernels.

In FriCAS expression are represented as rational functions in kernels. exp(2*x) and exp(x) are different kernels, so

fricas
(1) -> exp(2*x) - exp(x)^2

\label{eq1}{{e}^{2 \  x}}-{{{e}^{x}}^{2}}(1)
Type: Expression(Integer)

gives nonzero result. To recognize that this is really 0 we need to perform extra computation. In this case normalize is enough

fricas
normalize(exp(2*x) - exp(x)^2)

\label{eq2}0(2)
Type: Expression(Integer)

In general, to express function in terms of algebraically independent kernels one can use rischNormalize. It takes two arguments, the first argument is list of expressions to analize, the second is list of variables (rischNormalize treats variables and constants in slightly different way). For example:

fricas
rischNormalize([exp(2*x), exp(x)],[x])

\label{eq3}\left[{funcs ={\left[{{{e}^{x}}^{2}}, \:{{e}^{x}}\right]}}, \:{kers ={\left[{{e}^{2 \  x}}\right]}}, \:{vals ={\left[{{{e}^{x}}^{2}}\right]}}\right](3)
Type: Record(funcs: List(Expression(Integer)),kers: List(Kernel(Expression(Integer))),vals: List(Expression(Integer)))

The result has three parts. First is list of rewritten expression. Second is list of kernels that were rewritten. The third is list of values assigned to kernels.