注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Mr.Right

不顾一切的去想,于是我们有了梦想。脚踏实地的去做,于是梦想成了现实。

 
 
 

日志

 
 
关于我

人生一年又一年,只要每年都有所积累,有所成长,都有那么一次自己认为满意的花开时刻就好。即使一时不顺,也要敞开胸怀。生命的荣枯并不是简单的重复,一时的得失不是成败的尺度。花开不是荣耀,而是一个美丽的结束,花谢也不是耻辱,而是一个低调的开始。

网易考拉推荐

为什么maple中包含pi的表达式不能化简?  

2012-03-24 10:25:26|  分类: 学习 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
restart;

Expressions containing the constant pi cannot be simplified
I can not simplify expressions containing the constant pi (3.1415...). I tried simplify(), evalf() and a few other commands but nothing seems to work. What am I doing wrong?

In Maple, "pi" and "PI" represent the lower and upper case Greek letters respectively. The constant 3.1415... is represented by "Pi". Maple does not simplify your expressions because it does not know what "pi" is.

Look at the following example:

> cos(pi); cos(PI); cos(Pi);

cos(pi)

cos(PI)

-1

In Maple, the constant 3.141592.... is represented as Pi.

For information about other initially-known names, please type:

?initialconstants;

 

 和matlab中一样 e 在maple中 是 exp(1)

验证: evalf(exp(1))

(* 我以前不知道maple中求值的函数除了evalf外还有value, 对于value(Pi*sqrt(5)*sqrt(7)*sqrt(exp(1)))是求不出值的,因为value - evaluate inert functions *)

value(e^(Pi*sqrt(2)));
evalf(e^(Pi*sqrt(2)));
evalf(exp(1)^(Pi*sqrt(2)));

value(Pi*sqrt(5)*sqrt(7)*sqrt(e));
combine(%);
evalf(Pi*sqrt(5)*sqrt(7)*sqrt(e));
evalf(Pi*sqrt(5)*sqrt(7)*sqrt(exp(1)));

 

value(Pi*sqrt(5)*sqrt(7)*sqrt(exp(1)));

evalf(%)

为什么maple中包含pi的表达式不能化简? - 阿英 - Mr.Right

 

Initially Known Names

Description

The following names are known, either as global or environment variables under user control or as names of constants known to certain functions.

Catalan

Catalan's constant = sum((-1)^i/(2*i+1)^2, i = 0 .. infinity) and evalf(Catalan) is approximately 0.915965594...

constants

See constants (default is the sequence: false, gamma, infinity, true, Catalan, FAIL, Pi )

Digits

number of digits carried in floats (default is 10). Digits is an environment variable.

FAIL

used by boolean evaluation as unknown truth for 3-valued logic.

false

the value false (false) in the context of Boolean evaluation.

gamma

Euler's constant = limit(sum(1/i, i = 1 .. n)-ln(n), n = infinity) and evalf(gamma) is approximately 0.5772156649...

gamma(n)

a series of constants such that gamma(n) = limit(sum(ln(k)^n/k, k = 1 .. m)-ln(m)^(n+1)/(n+1), m = infinity) . gamma(0) = gamma, Euler's constant.

I

complex number such that I^2 = -1 (i). Internally, I is represented as Complex(1).

infinity

name for infinity used by some library functions

integrate

initially assigned the function name int

lasterror

See lasterror

libname

path name which is the root of the standard Maple library

`mod`

initially assigned the function name modp; for symmetric representation, assign `mod` := mods; (mod is an operator). Mod is an environment variable.

NULL

initialized to the null expression sequence

Order

truncation order for series (default is 6); see also Order. Order is an environment variable.

Pi

math constant Pi (pi); use Pi for calculations. evalf(Pi) is approximately 3.14159265...

printlevel

See printlevel (default is 1).  Printlevel is an environment variable.

true

the value true (true) in the context of Boolean evaluation

undefined

name for undefined used by some library functions

  评论这张
 
阅读(1515)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016