About expand and combine
Let me enumerate some transforms used in mathematic calculus. I describe what I understand and insert questions with ???. I only details theses methods because they are very similar. 4 are called "expand" and 4 are called "combine". Both are used in mathematics. e^(2x) 1==============> (e^x)^2 (e^x)^2 2==============> e^(2x) cos(2*x) 3==============> cos(x)^2 - sin(x)^2 cos(x)^2 4==============> (cos(2*x)+1)/2 cosh(2*x) 5==============> cosh(x)^2 + sinh(x)^2 cosh(x)^2 6==============> (cosh(2*x)+1)/2 x^(2a) 7==============> (x^a)^2 (x^a)^2 8==============> x^(2a) I forget theses less common transforms, even if they are useful. sqrt(x)== x^(1/2) ln(ab) and ln a + ln b (n+1)! and (n+1) n! And I absolutely forget theses other transforms. sum(f+g) and sum f + sum g prod(f*g) and prod f * prod g int(f+g) and int f + int g diff(f+g) and diff f + diff g 1-3-5-7 : "expand" gives polynomial (or rational) results with less variables. tanh(x)+tan(2*x) == (exp(x)^2-1)/(exp(x)^2+1) + (...^4...) (A) expand_trig refers to 3=> and 5=>. chebyshev_T and chebyshev_U are related to this operation. Today with expand_trig in sage I only compute 3=> and 5=>. ??? How can I get (A) and 1=> with sage ? Maxima has a partial "exptsubst" variable for this. I feel it as a dirty tip. ??? I don't find the 7=> for power in sage. Theses 4 transforms are very similar. The name "expand" may strike with single polynomial expand. "expand_trig" or "trig_expand" is too limited to trigonometric function. I dislike too many names of functions, I forget them. I prefer only few names of functions, perhaps with parameters. ??? What same name can we give to this function (and theses 4 subfunctions) ? I don't separate in this description exact transforms in calculus and calculus with unusual branch-cut. It's possible to separate theses 2 casater es. I'll see it during tests. Now I look at the opposite transforms : 2-4-6-8. 2=> is automatic. 4=> and 6=> are normal (or canonical) forms (it looks like Fourier coefficients). There is only one result $1$ for formulas as (cos(x)^2+sin(x)^2)^10. 8=> in Sage seems to be "simplify". Others systems call this function "combine". I dislike the "simplify" name because there are maybe other operations in simplify. And sometimes a good "simplify" is an "expand" command : the opposite point of view. The name "combine" feels better. I hope to find theses complete end-users transforms in sage. I partially can use expand_trig or I'll begin to write such functions for my own use. But I feel it's important to have the right way before adding any function in the system. Concretely ??? I'll don't see how to operate over exp(2x) => exp(x)^2. ??? Is there a hold (or freeze) function in sage which remains exp(a)^2. Also look at integrate (exp(2*x)/(exp(3*x)+1), x). The changevar is y=exp(x) in y^2/(y^3+1). Maybe sage (or pyginac) has too haste to transform exp(a)^2 to exp(2a). ??? Might I have arguments about this choice ? [and I have no idea about the name of this function : not expand nor expand_trig] F. Very curious about Sage. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
