extending mathematica's functionality
- To: mathgroup at christensen.cybernetics.net
- Subject: extending mathematica's functionality
- From: Jack Goldberg <Jack.Goldberg at math.lsa.umich.edu>
- Date: Tue, 18 Oct 1994 16:42:50 -0400 (EDT)
In a recent note to sci.math.symbolic, Richard Chen at Yale (I believe
this is correct) asked how to simplify the output of
Integrate[sec[x],{x,0,ArcCos[s]}]
This output leaves much to be desired in terms of simplicity. It appears
to me that the difficulty in simplifying the output is due to a more
pervasive issue which I would like to raise. There are two parts:
(1) There is no single command which combines sums of
logarithms into the logarithm of their product. That is, Log[a]+Log[b]
cannot be written as Log[a*b] without some sort of programming. The
command PowerExpand does the opposite: PowerExpand[Log[a*b]] =
Log[a]+Log[b]. Such a command would help in Chen's problem but I think
item (2) to follow is also necessary.
(2) Without the assist of PowerExpand, Log[Exp[x]] = x and
Sqrt[x^2] = x would not be possible without programming. But PowerExpand
will not simplify
ArcTrig[Trig[x]] = x, where Trig is any of Cos, Sin, Tan etc.
There is no single command that does this but I think there
ought to be. I'll go one step further. Let f be a function with an
inverse, InverseFunction[f]. Now f[InverseFunction[f][x]] = x but
this simplification does not occur in the other order
InverseFunction[f][f[x]]
I would like to see GeneralPowerExpand which leads to
GeneralPowerExpand[InverseFunction[f][f[x]]] = x
If such an operation were available, Chen's problem would vanish.
While I'm on the topic of what I would like to see in Mathematica,
let me raise the following problem which I stumbled upon quite recently.
Let y = Sqrt[x/(1-x)]. Then
Integrate[y,x] = (x-1)y[x]-1/2ArcTan[y[x]*(1-2x)/2x]
This antiderivative of y[x] is correct subject to various comments about
where x is and which value of the multivalued functions you take.
However, Derive and Maple V2 give much simpler answers. Both contain the
term (x-1)*y[x], but the more complicated term in MMA's answer is
replaced by a signficantly simpler expression which differs (as it must)
from Mma's by a constant. I was unable to use Mma to simplfy the
expression involving ArcTan and found myself manipulating inverse trig
functions until at last I showed that all three answers do differ by a
constant. (Of course I graphed all three answers and differentiated all
3 to confirm my conclusion before I undertook the painstaking task of
manipulating them.) One of the reasons I was unsuccessful in using Mma
for this task is due to the fact that Mma is missing a package like
`trigonometry.m for the inverse trig functions.
Has anyone out there undertaken this chore or will inverse trig
functions always remain poor relatives.?
Please scatter amoung my sentences an appropriate number of "I
think", "if I'm not mistaken", "this is probably well-known" and so
forth.