如何运用Mathematica软件计算

来源:百度知道 编辑:UC知道 时间:2024/05/22 17:50:12
1. 定义a=3,b=4,c=5,然后用a与b的和乘以b与c的和,只显示最后的结果。
2. 给出常数e的25位小数的近似值。
3. 计算12乘以6的结果,然后再计算15乘以7的结果,接着用%和%%把两个结果加在一起。

4. 查找Mathematica命令Factorial的帮助信息,并利用它计算100!。
5. 一个骰子有六个面,编号分别为1到6,每个面出现的概率是相同的,对四次掷骰子的过程进行模似。
要求每题都有程序和运算结果.

我输入我再Mathematica运行的结果。其中,“In[]:=”是Mathematica自动显示的。你输入时不要输入,只输入下面一行的东西就是了。

问题1

In[1]:=
a=3;b=4;c=5;
(a+b)(b+c)

Out[2]=
63

问题2

In[3]:=
N[E,25]

Out[3]=
2.718281828459045235360287

问题3

In[4]:=
12*6

Out[4]=
72

In[5]:=
15*7

Out[5]=
105

In[6]:=
%+%%

Out[6]=
177

问题4:

In[7]:=
?Factorial

运行后会显示,

"n! gives the factorial of n. More..."

In[8]:=
??Factorial

运行后会显示,

"n! gives the factorial of n. More..."

Attributes[Factorial]={Listable,NumericFunction,Protected}

In[9]:=
Factorial[100]

Out[9]=
933262154439441526816992388562667004907159682643816214685929638952175999932299\
15608941463976156518286253697920827223758251185210916864000000000000000000000