Adept Scientific - English
The world's best software 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  
UKusdedksvnofi
Home
Products
Training
Consultancy
 Buy Online
Downloads
Education
Support
My Adept
International |  About Us |  Contact Us |  Press Room |  Jobs


The Next Steps

• Ask us a question
• Maple Product Tour
• Buy Maple Now
• View Maple Pricing
• Find out about Online Training
• Download a Brochure
• Request a Brochure
• Download a Demo
• Request a Demo
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 11 Professional
Maple 11 Academic
Maple 11 Student Use
Recorded Online Seminars
FREE Training Resources


MapleNet
Maple T.A.
MapleConnect
BlockImporter for Simulink
BlockBuilder for Simulink
Maple Toolboxes
Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

View Maple 10 in Action
Product Comparison Chart

Latest Information

New Features: Professional
New Features: Academic
The Maple Reporter
The Maple Reporter Online
Numerical Algorithms Group
(NAG)


Service & Support

Maple 10 Training Videos
MaplePrimes, blogs, forums
Elite Maintenance Program
Application Centre
Powertools
Maple User Group (MUG)
Join the Maple User Group
(MUG)

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] 4 examples - an explanation?

Search email archive for  

[MUG] 4 examples - an explanation?
Author: Vladimir Bondarenko    Posted: Tue, 4 Jun 2002 05:48:38 +0400

>> From: Vladimir Bondarenko "vvb"

Hello,

These 2 examples are trivial.

>1956*(1+1)^2;

3825936

>1994*(diff(a,a)+y(z))^2;

1994*(1+y(z))^2


However, if I eliminate the multiplication operator, '*',


>1956(1+1)^2;

3825936 # = 1956^2

>1994(diff(aleph,a)+y(z)+ISSAC-2003)^2;

3976036 # = 1994^2

Could I hear an explanation?

Many thanks in advance.


Vladimir Bondarenko
Applied mathematician

[MUG] Re: 4 examples - an explanation?
Author: Maple User Group    Posted: Tue, 11 Jun 2002 17:30:57 -0400

>> From: Maple User Group "maple_gr"

> >> From: Vladimir Bondarenko "vvb"
> However, if I eliminate the multiplication operator, '*',
> >1956(1+1)^2;
> 3825936 # = 1956^2
> >1994(diff(aleph,a)+y(z)+ISSAC-2003)^2;
> 3976036 # = 1994^2
> Could I hear an explanation?

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

Date: Wed, 5 Jun 2002 13:26:57 -0700 (PDT)
From: Robert Israel "israel"
To: "maple-list"
Subject: 4 examples - an explanation?


Eliminating the * in a*(...) gives you a(...), which is interpreted
as the function a evaluated at "...". Numbers are considered as
constant functions when necessary. This allows algebra to be
performed on functions, e.g.
> g:= f^2 + 3*f + 2:
g(p);

2
f(p) + 3 f(p) + 2

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

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

Date: Wed, 05 Jun 2002 13:34:48 -0700
To: "maple-list"
From: David Harrington "dharr"
Subject: 4 examples - an explanation?


I think 1956() is a function that returns the constant 1956, no matter what
its argument is. You can see that type('1956()',function); returns true.
However, Maple immediately simplifies it to 1956 and it no longer behaves
like a function: type(1956(),function); returns false.
So 1956(1+1)^2; returns 1956^2 but 1956*(1+1)^2; returns 1956*4 (not 1956^2).



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

Date: Thu, 06 Jun 2002 09:33:38 +0200
From: Adri van der Meer "A.W.J.vanderMeer"
To: "maple-list"
Subject: 4 examples - an explanation?


If the `*` operator is omitted, the syntax becomes
"name(arguments)" that is a function call.
Maple accepts a constant as a procedurename, as can be
seen in:

> f := x -> 1956;

f := 1956

> 1956(x,y,z);

1956

This explains your results.

--
A. van der Meer
Dept. Applied Mathematics
University of Twente Phone +31 (53) 4893427
P.O. Box 217 Fax +31 (53) 4894824
7500 AE Enschede




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

From: "Dr Francis J. Wright" "F.J.Wright"
To: "\"Vladimir Bondarenko\"" "vvb"
Subject: 4 examples - an explanation?
Date: Thu, 6 Jun 2002 12:46:22 +0100

Maple treats the form `number(...)' as a constant function, which evaluates
to `number' (ignoring what appears within the parentheses). It performs
this calculation first, and then squares the result.

Francis



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

Date: Thu, 6 Jun 2002 16:17:25 +0100
To: "maple-list"
From: Nicolas PUECH "puech"
Subject: 4 examples - an explanation?

In the second series of examples, just as one uses to consider things in
mathematical notation, MAPLE considers that 1956(1+1) is the application of
the constant function x->1956 to the value 2 which leads to the result
1956. The same holds for 1994(diff.....)^2.

Nicolas PUECH
INFRES
Ecole Nationale Superieure des Telecommunications

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

From: Stanley J Houghton "S.J.Houghton"
Date: Fri, 7 Jun 2002 15:36:45 +0100
To: "maple-list" "vvb"
Subject: 4 examples - an explanation?

In Maple by definition

<number>(<anything>)

evaluates to <number>. Hence, 45(<anything>)= 45

I have encountered this as a rather involved bug (due to a mistyped
expression) and would prefer that error checking could be switched on
for this particular form (where a constant is in place of a
function). However, other manipulations may rely on the convention.

At least Maple is consistent in that

x->45

evaluates to 45 as well!

Can others help on this one?

Regards
Stan

Previous by date: [MUG] Re: Plotting a point, Maple User Group
Next by date: [MUG] Re: evalm and mapping of function, Maple User Group
Previous thread: [MUG] Assignment,  Edgar G Goodaire
Next thread: [MUG] evalm and mapping of function, Guy Gendron



Ready to buy?

Maple - single user licence
Add to shopping basket
$ 1,895.00
Upgrade to Maple 12 from v11
Add to shopping basket
$ 995.00
Upgrade to Maple 12 from v10 & below
Add to shopping basket
$ 1,395.00

Featured Downloads

What's New in Maple 11 for Professionals
Maple White Paper: Technical Knowledge - An Asset You Can Afford to Lose?
Maple in Electronics Application Pack
Maple in Robotics & Aerospace Application Pack
Maple in Finance Application Pack

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
adept

Top of the Page

Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2007, Adept Scientific plc.
Site designed and maintained by Adeptise

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