[Date Index]
[Thread Index]
[Author Index]
real valued expressions in Mathematica 4.0
*To*: mathgroup at smc.vnet.net
*Subject*: [mg18461] real valued expressions in Mathematica 4.0
*From*: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
*Date*: Wed, 7 Jul 1999 00:11:41 -0400
*Sender*: owner-wri-mathgroup at wolfram.com
In general I am rather impressed with the new ability of Mathemaitca 4.0 to
handle assumptions (it was possible to do most of these things in 3.0 but
only by using the AlgebraicInequalities package, Groebner basis and doing a
bit of programming). In particular Mathematica 4.0 can now decide that
certain symbolic expressions are always real for real values of parameters.
On example, which I used a while ago when "complaining" about v.3.0
inability to do this was:
ComplexExpand[a + Sqrt[-b^2 - 1] + Conjugate[a + Sqrt[-b^2 - 1]
In version 4.0
In[1]:=
Simplify[ComplexExpand[a + Sqrt[-b^2 - 1] +
Conjugate[a + Sqrt[-b^2 - 1]]],
Element[a,Reals] && Element[b,Reals]]
Out[1]=
2 a
gives the nicest possible answer.
However, there are still some simplifications which are pretty obvious to
humans that Mathematica seems unable to manage. For example, It is easy to
prove that if f is a function holomorphic in some domain containing a real
interval and symmetric with respect to conjugation and if f takes real
values on the real interval within its domain then
f[Conjugate[z]] == Conjugate[f[z]] and hence f[z]+f[Conjugate[z]] is always
real. For example
Sqrt[a+b*I]+Sqrt[a-b*I] is always real if a and b are real and a is
positive. Mathematica does seem to
know this:
In[2]:=
In[1]:=
FullSimplify[ComplexExpand[Sqrt[a + b*I] + Sqrt[a - b*I],
TargetFunctions -> {Re, Im}] \[Element] Reals,
a > 0 && b \[Element] Reals]
Out[1]=
2 2 1/4 1 1
(a + b ) (Cos[- ArcTan[a, -b]] + Cos[- ArcTan[a, b]] +
2 2
1 1
I (Sin[- ArcTan[a, -b]] + Sin[- ArcTan[a, b]])) \[Element] Reals
2 2
2 2
However, Mathematica can manage some simpler cases:
In[3]:=
Simplify[ComplexExpand[Sqrt[1 + b*I] + Sqrt[1 - b*I],
TargetFunctions -> {Re, Im}] \[Element] Reals, b \[Element] Reals]
Out[3]=
True
It comes tantalizingly close to getting the general case right if one
writes the experssion in a slightly
different form:
In[4]:=
FullSimplify[
ComplexExpand[Sqrt[a]*(Sqrt[1 + (b/a)*I] + Sqrt[1 - (b/a)*I]),
TargetFunctions -> {Re, Im}] \[Element] Reals,
a > 0 && b \[Element] Reals]
Out[4]=
True
(One has to use FullSimplify here. Plain Simplify won't work)
This is certainly much better than version 3 but it seems that human
mathematicians still need not worry about becoming redundant.
P.S. In case somebody takes this last remark seriously, I actually do not
think that what Mathematica does is "mathematics", but this list in not the
right place to discuss such matters.
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp
Prev by Date:
**Mathematica -> HPF**
Next by Date:
**Absence of Compile warning in Mathematica 4**
Previous by thread:
**Mathematica -> HPF**
Next by thread:
**Re: real valued expressions in Mathematica 4.0**
| |