Message from discussion
Maple does not simplify if variables have "assume"s on them
Received: by 10.224.176.203 with SMTP id bf11mr7859918qab.4.1344999778163;
Tue, 14 Aug 2012 20:02:58 -0700 (PDT)
Path: c6ni112979908qas.0!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin2!goblin.stu.neva.ru!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail
From: Peter Pein <pet...@dordos.net>
Newsgroups: comp.soft-sys.math.maple
Subject: Re: Maple does not simplify if variables have "assume"s on them
Date: Fri, 10 Aug 2012 23:26:22 +0200
Organization: 1&1 Internet AG
Lines: 61
Message-ID: <k03u9v$72a$1@online.de>
References: <mMcVr.25958$Yf7.6482@newsfe16.iad> <a8l4kmFjq2U1@mid.individual.net> <daeVr.7237$RL6.5188@newsfe13.iad>
NNTP-Posting-Host: p4fc20f8d.dip0.t-ipconnect.de
Mime-Version: 1.0
X-Trace: online.de 1344633983 7242 79.194.15.141 (10 Aug 2012 21:26:23 GMT)
X-Complaints-To: abuse@einsundeins.com
NNTP-Posting-Date: Fri, 10 Aug 2012 21:26:23 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0
In-Reply-To: <daeVr.7237$RL6.5188@newsfe13.iad>
X-Antivirus: avast! (VPS 120810-1, 10.08.2012), Outbound message
X-Antivirus-Status: Clean
Bytes: 3662
X-Received-Bytes: 3710
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Am 10.08.2012 22:28, schrieb unruh:
> On 2012-08-10, Axel Vogt <&nore...@axelvogt.de> wrote:
>> On 10.08.2012 20:53, unruh wrote:
>>> I am having trouble with Maple not simplifying expressions with
>>> "assumes" on them.
>>>
>>> For example, the answer to one of my integrations was
>>> N12:=1/4 I (-epsilon~^2 -4IOmega~ +epsilon~^2)
>>>
>>> where the ~ are the expressions with "assume"
>>> (assume(epsilon>0);assume(Omega>0))
>>> The correct answer should be just Omega~, but there is no way I can get
>>> that answer no matter how many "simplify" or "expand" I put around the
>>> original expression of N12.
>>> Ie, maple seems to think that one of those epsilon~ is a different
>>> variable from the other one.
>>>
>>> If I copy that output to another input line, then maple simplifies the
>>> expression.
>>
>> It would help if you provide your full code (as far as needed),
>> otherwise it is hard to understand.
>>
>> PS: you may wish to provide it with all operational signs
>> (like multiplication etc), for copy & paste.
>>
>> It seems a bit that this may be the reason, since Maple
>> would simplify it to what you expect.
>
> OK. Here it is.
>
> > Gamma:=epsilon^2/2:assume(epsilon>0); assume(Omega>0); assume(t,real):
> > phi1:=proc(t,x); -epsilon/2*exp((I*Omega+Gamma)*(t-x)); end proc:
> > phi2:=proc(t,x); epsilon/2*exp((I*Omega-Gamma)*(t+x)); end proc:
> > pi1:=proc(t,x); diff (phi1(t,x),t);end proc:
> > pi2:=proc(t,x); diff (phi2(t,x),t);end proc:
> > q1:=proc(t); exp((I*Omega+Gamma)*t);end proc:q2:=proc(t);
> > exp((I*Omega-Gamma)*t);end proc:
> > p1:=proc(t); -diff(q1(t),t);end proc:
> > p2:=proc(t);-diff(q2(t),t);end proc:
> > N12:=simplify(I/2*
> ( 2*int(conjugate(phi1(t,x))*pi2(t,x)-conjugate(pi1(t,x))*phi2(t,x),x=0..infinity)
> +conjugate(q1(t))*p2(t)-conjugate(p1(t))*q2(t)
> +epsilon*(conjugate(phi1(t,0))*q2(t)-conjugate(q1(t))*phi2(t,0)) ));
>
> 2 2
> N12 := 1/4 I (-epsilon~ - 4 I Omega~ + epsilon~ )
>
Hi,
as it is almost midnight here, I do not have the patience to try it
myself - sorry.
I would guess that it makes sense to put all assumptions to the very
beginning of your code and to define Gamma later.
.. just a shot in the dark.
Good luck, Peter