Adept Scientific - English
The world's best software and hardware for research, science and engineering.
flag arrow
clearclear

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKdedksvnofi
Home
Products
Training
Events
 Buy Online
Downloads
Academic Discounts
Support
My Adept
International |  About Us |  Adept Scientific Blog |  Contact Us |  Press Room |  Jobs
Adept Scientific on Facebook Adept Scientific on Twitter Adept Scientific on YouBube Adept Scientific on LinkedIn


The Next Steps

• Ask us a question
• Watch Maple Video Demonstrations
• Buy Maple Now
• View Maple Pricing
• Download a Brochure
• Request an Evaluation
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 17 Overview
Maple 17 Professional
Maple 17 Academic
Maple 17 Student Use
What's New in Maple 17
Maple Features
Maple History
Recorded Online Seminars

MapleSim
MapleNet
Maple T.A.
BlockImporter™
Maple Toolboxes
The Möbius Project

Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

Latest Information

New Features: Professional
New Features: Academic
Maple Features
The Maple Reporter Online

Service & Support

Maple Primes
blogs, forums etc

Elite Maintenance Program
Application Centre
Powertools
Search the Knowledge Base
Technical Support request

List Archives >  Maple User Group List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[MUG] plot after assume

Search email archive for  

[MUG] plot after assume
Author: Matthias Kawski    Posted: Fri, 3 May 2002 12:08:47 -0700 (

>> From: Matthias Kawski />
I believe I should know this -- but continue to repeatedly run into
problems with "assume". The following is a toy example -- in my real
work I often need to "assume" properties in order to simplify big
expressions. But after having done so, I have trouble evaluating,
integrating, plotting etc.
The particularly annoying thing is when recalculating some (but not
all prior sections) I get different results, in the toy example mi-
micked by a second copy of the statements. It seems to be that there
are more than 2 x's here -- and somehow I don't know how to access
the right x in the second slot of e.g. plot(,.,.), or int(.,.).

I am looking for some general advice how to avoid such trouble --
sometimes it is not very obvious that things are wrong the 2nd time.
The constraints are that I rarely know what assumptions I will have
to make later on -- i.e. I cannot just put all assume(...) into the
first paragraph, and I often need to go back a page or two, and re-
execute lengthy calculations (e.g. with slight changes).... apparently
this can work if I take care to not reexecute any of the assume(..);
commands [[generally, there is no need to reset all assumed x:='x';
at the beginning of the pages that I need to reexecute]]. Redoing the
entire worksheet is often completely impractical.

> restart;
> y:=x^2;
> assume(x>0);
> int(y,x);
> plot(y,x);
2
y := x

3
1/3 x~

[[ the plot is OK with x~ along first axis ]]
> y:=x^2;
> assume(x>0);
> int(y,x);
> plot(y,x);
2
y := x~

2
x~ x~
Plotting error, empty plot

Matthias
**********************************************************
Matthias Kawski http://math.asu.edu/~kawski
Dept. of Mathematics and Statistics /> Arizona State University office: (480) 965 3376
Tempe, Arizona 85287-1804 home: (480) 893 0107
**********************************************************



[MUG] Re: plot after assume
Author: Maple User Group    Posted: Fri, 10 May 2002 16:57:54 -0400

>> From: Maple User Group />
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Thu, 09 May 2002 17:22:56 -0500
From: "Robert J. Lopez" /> To: /> Subject: plot after assume

Here is what I have found useful in my work with assumptions in Releases
prior to 7.

1) make the assumption
2) execute the required calculations; let's say that expr is the desired
result
3) remove assumptions
4) execute the following line

parse(convert(expr,string));

This is the equivalent of re-typing the expression back into Maple. This
gives you a copy of expr without assumptions and without tildes.

There may have been better ways of working with assumed variables, but I
never found them. This was the only way I could ever manage to continue
using variables with assumptions on them. Of course, in Maple 7 and
beyond, the use of assuming provides a mechanism of "local assumptions"
and the problem has virtually disappeared.

Robert

--
Robert J. Lopez
Department of Mathematics
Rose-Hulman Institute of Technology
Terre Haute, IN 47803

812 877-8396 (office)
812 877-8883 (Department fax)

/>


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Thu, 9 May 2002 17:37:41 -0700 (PDT)
From: Robert Israel /> To: /> Subject: plot after assume

In Maple 7 and 8, the best thing to do might be to use "assuming" which
makes a temporary assumption on variables for evaluating one expression
without making permanent changes. Otherwise, you can use the rather
clumsy work-around suggested in the "Changing assumptions and names"
page in my Maple Advisor Database (http://www.math.ubc.ca/~israel/advisor):

> oldx:= x:
> assume(x > 0);
> assign(oldx,x):

Robert Israel /> Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Thu, 09 May 2002 16:41:03 +0200
From: Preben Alsholm /> To: /> Subject: plot after assume

Each time you make an assumtion about x a new local variable x~ is
created. In your situation it therefore seems a good to make assignments
that refer to the original global x and not to the local variable created
by assume.
Consider first the following:


> restart;

> y:=x^2: #y is assigned the global x, squared.

> assume(x>0);

> y-x^2; #y evaluates to the global x (^2), which in turn evaluates to the
local x (^2)

0

> type(x,`local`);

true

> z:=x^3: #z is assigned the local x cubed.

> assume(x>0); #A new local x is created

> z-x^3; # Two different locals are involved

3 3
x~ - x~

> y-x^2; #No problem here since y first evaluates to the global x

0

> type(x,`local`);

true

> convert(z-x^3,`global`);

0

> convert('plot'(z,x=0..1),`global`): %;

While the last two lines are interesting they are probably not what you
are looking for.
So here is an idea. We start as before:
> restart;
> y:=x^2:
> assume(x>0);
>
> y-x^2;

0

> z:='x'^3: #This assigns to z the global name x cubed.

> z-x^3;

0

> assume(x>0);
>
> z-x^3;

0

> y-x^2;

0

--
Preben Alsholm
Institut for matematik (Department of Mathematics)
DTU (Technical University of Denmark)



Previous by date: [MUG] Reading the Date from a txt File, Juan Navarro
Next by date: [MUG] Re: Hopfu.mws,  Douglas B Meade
Previous thread: [MUG] declaration of procedure-type, Stefano Sofia
Next thread: [MUG] Hopfu.mws, C W



Ready to buy?

Maple Professional
Add to shopping basket
£ 1,695.00
Maple - for academic use
Add to shopping basket
£ 940.00
Maple - for registered students
Add to shopping basket
£ 95.00

Featured Downloads

Maplesoft Product Catalogue
Maple Player for iPad - Datasheet
Maple 17 What's New datasheet
Maple 17 Professional Datasheet
Maple Whitepaper: Driving Innovation - How mathematical modeling and optimisation increase efficiency and productivity in vehicle design.
MapleSim Whitepaper - Technological Superiority in Multi-Domain Physical Modelling and Simulation

Latest Downloads

Maple - Global Optimization Toolbox
The Möbius Project - Create it, Share it, Grade it
Maple 17 Programming Guide
Maple 17 User Manual
Maplesoft Product Catalogue - Academic Maths

Product Reviews

"Without the Maple software, we would have to spend weeks generating the equations of motion for every experiment. Then the chances that we did it right would basically be near zero. There would always be a mistake somewhere. It is very difficult to set up a dynamic motion model by hand."
- Jean-Claude PiedBeouf, Ph.D Manager of Robotics, Canadian Space Agency

"Its very good - highly accurate and easy to use. The speed of Maple allows me to change equations and quickly reintegrate them into the application, so more possibilities can be explored to achieve the precise effect desired."
Shawn Neely, Senior R & D Director for PDI/Dreamworks

Latest News

Global Optimization Toolbox: Better Optimization to Solve More Problems, Faster
Global Optimization Toolbox: Better Optimization to Solve More Problems, Faster
New MapleSim release delivers advanced model development and analysis, extended toolchain connectivity and quicker results
Maple 17 offers advanced solving and application development capabilities
New release of Maple advances teaching and research
adept

Top of the Page

Popular Links: ChemDraw | ChemOffice | Data Acquisition | Data Analysis | EndNote | Maple | MapleSim | Mathcad | MathType | Quality Analyst | Reference Manager | VisSim

EU ePrivacy Directive | Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2013, Adept Scientific Ltd.
Site designed and maintained by Lyndon Ash

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055