prime:misctips

**This is an old revision of the document!**

Note that there is a shortcut to STRING(V) by just doing T:=“”+V; However, STRING(V) is faster and uses less RAM.

Indefinite integral has an implicit “+ constant” at the end of the results. In some CAS systems it's mentioned, but in the PRIME, it isn't. Note that this is so the result can be cut and pasted without having to delete the extra text, which is preferred.

When working with trigonometric functions, there are a group of functions that can allow for simplification of terms, or expansion in a particular direction. trigcos() will try to express the expression in terms of cosines, similarly with trigsin, trigtan. Likewise, there are a set of functions to convert between exponents, trig and ln functions. simplify and trigexpand can be useful in such cases too. tcollect() can convert an expression involving powers of trig functions to functions of nx. Note that some of these functions can result in a constant at the end of the expression and if this is an indefinite integral result, then this constant can be thrown away without error. ratnormal() can combine multiple fractions into one simplest irreducible fraction.
E.g. integrate^{1)}^8+4*(sin(2*x))^6-1)/48. If we wished, we could drop the 1/48 term, since it's an indefinite integral. So, dropping the constant and calling trigexpand on this, the result is -16*(cos(x)^8)*(sin(x)^8)-(16/3)*(cos(x)^6)*(sin(x)^6). Likewise, taking the original integral result and calling tcollect() on it, the result is -(3/256)*cos(4*x)-(1/512)*cos(8*x)-(1/768)*cos(12*x)-(1/2048)*cos(16*x)-(73/6144).
Again, since it's an indefinite integral, the constant term at the end can be dropped.

cos(2*x)^3)*(sin(2*x)^5),x) results in -(1/16)*cos(2*x)^3-(1/6)*cos(2*x)^6-(1/8)*cos(2*x)^4. trigsin() of this result gives -(1/16)*sin(2*x)^8-(1/12)*sin(2*x)^6-(1/48). Calling ratnormal() on this gives us (-3*(sin(2*x

prime/misctips.1508465154.txt.gz · Last modified: 2017/10/19 19:05 by webmasterpdx